۱۳۹۴/۱۲/۱۶, ۰۶:۳۰ ب.ظ
سلام این هم کل xml خدمت شما.
فقط من از دو تا textview استفاده کردم. textview بیرونی مربوط به عنوان صفحه و textview داخل اسکرول مربوط به متن است.
ضمنا من از کلاس TextviewEx برای justify شدن مظالب استفاده کردم.
این نکته رو هم بگم که این xml و کدهام در بیشتر فراخوانی ها از db به درستی تا آخر اسکرول ویو رو نشون میده.
تنها بعضی متن ها( بعضی ها طولانی و بعضی ها هم نه) تا آخر دیده نمیشن.
فقط من از دو تا textview استفاده کردم. textview بیرونی مربوط به عنوان صفحه و textview داخل اسکرول مربوط به متن است.
ضمنا من از کلاس TextviewEx برای justify شدن مظالب استفاده کردم.
این نکته رو هم بگم که این xml و کدهام در بیشتر فراخوانی ها از db به درستی تا آخر اسکرول ویو رو نشون میده.
تنها بعضی متن ها( بعضی ها طولانی و بعضی ها هم نه) تا آخر دیده نمیشن.
کد پیاچپی:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:padding="5dp"
android:orientation="vertical">
<my_packagename.TextViewEx
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:textSize="18sp"
android:layout_margin="3dp"
android:textStyle="bold"
android:textColor="#F4F4F4"
android:background="@drawable/title"
android:textDirection="rtl" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/body"
android:layout_marginRight="3dp"
android:layout_marginLeft="3dp"
android:layout_marginBottom="3dp"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:id="@+id/sv">
<my_packagename.TextViewEx
android:id="@+id/body"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textSize="18sp"
android:lineSpacingExtra="1sp"
android:textColor="#4b4b4b"
android:textDirection="rtl" />
</ScrollView>
</LinearLayout>