詹子聪 hace 5 años
padre
commit
8afd0fe4ed

+ 5 - 4
app/src/main/java/com/miekir/eden/ui/home/about/AboutFragment.java

@@ -3,6 +3,7 @@ package com.miekir.eden.ui.home.about;
 import android.content.DialogInterface;
 import android.text.TextUtils;
 import android.view.View;
+import android.widget.LinearLayout;
 import android.widget.TextView;
 
 import androidx.appcompat.app.AlertDialog;
@@ -30,7 +31,7 @@ public class AboutFragment extends BaseMVPFragment implements View.OnClickListen
     private String TITLE_FORMAT;
 
     private TextView tv_title;
-    private TextView tv_desc;
+    private LinearLayout ll_desc;
     private TextView tv_active;
     private View ll_about;
 
@@ -42,7 +43,7 @@ public class AboutFragment extends BaseMVPFragment implements View.OnClickListen
         TITLE_FORMAT = StringTool.getString(R.string.about_title);
 
         tv_title = rootView.findViewById(R.id.tv_title);
-        tv_desc = rootView.findViewById(R.id.tv_desc);
+        ll_desc = rootView.findViewById(R.id.ll_desc);
         tv_active = rootView.findViewById(R.id.tv_active);
         ll_about = rootView.findViewById(R.id.ll_about);
         TextView tv_email = rootView.findViewById(R.id.tv_email);
@@ -69,10 +70,10 @@ public class AboutFragment extends BaseMVPFragment implements View.OnClickListen
                 StringTool.getString(R.string.about_active) : StringTool.getString(R.string.about_not_active));
         tv_title.setText(title);
         if (isActive) {
-            tv_desc.setVisibility(View.GONE);
+            ll_desc.setVisibility(View.GONE);
             tv_active.setVisibility(View.GONE);
         } else {
-            tv_desc.setVisibility(View.VISIBLE);
+            ll_desc.setVisibility(View.VISIBLE);
             tv_active.setVisibility(View.VISIBLE);
         }
     }

+ 24 - 17
app/src/main/res/layout/fragment_about.xml

@@ -48,26 +48,33 @@
         </LinearLayout>
 
 
-        <TextView
+        <LinearLayout
+            android:id="@+id/ll_desc"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:paddingStart="@dimen/margin_default"
-            android:paddingEnd="@dimen/margin_default"
-            android:text="@string/about_attention"
-            android:textColor="@color/red_droid"
-            android:textSize="@dimen/text_normal"
-            android:layout_marginTop="@dimen/margin_s"/>
+            android:orientation="vertical">
+            <TextView
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:paddingStart="@dimen/margin_default"
+                android:paddingEnd="@dimen/margin_default"
+                android:text="@string/about_attention"
+                android:textColor="@color/red_droid"
+                android:textSize="@dimen/text_normal"
+                android:layout_marginTop="@dimen/margin_s"/>
+
+            <TextView
+                android:id="@+id/tv_desc"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:paddingStart="@dimen/margin_default"
+                android:paddingEnd="@dimen/margin_default"
+                android:text="@string/about_description"
+                android:textColor="@color/black_droid_text"
+                android:textSize="@dimen/text_normal"
+                android:layout_marginTop="@dimen/margin_s"/>
+        </LinearLayout>
 
-        <TextView
-            android:id="@+id/tv_desc"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:paddingStart="@dimen/margin_default"
-            android:paddingEnd="@dimen/margin_default"
-            android:text="@string/about_description"
-            android:textColor="@color/black_droid_text"
-            android:textSize="@dimen/text_normal"
-            android:layout_marginTop="@dimen/margin_s"/>
 
 
         <LinearLayout