Просмотр исходного кода

公告支持多选显示并上下滑动

zengjiebin лет назад: 8
Родитель
Сommit
be928efc59
1 измененных файлов с 38 добавлено и 30 удалено
  1. 38 30
      app/src/main/res/layout/act_notice.xml

+ 38 - 30
app/src/main/res/layout/act_notice.xml

@@ -6,44 +6,52 @@
 
 
     <include layout="@layout/title" />
     <include layout="@layout/title" />
 
 
-    <LinearLayout
+    <ScrollView
         android:layout_width="match_parent"
         android:layout_width="match_parent"
         android:layout_height="0dp"
         android:layout_height="0dp"
         android:layout_weight="1"
         android:layout_weight="1"
         android:layout_margin="@dimen/content_padding_10"
         android:layout_margin="@dimen/content_padding_10"
-        android:padding="@dimen/content_padding_10"
-        android:background="@drawable/x_shap_shadow_bg_rectgangle_white"
-        android:orientation="vertical">
+        android:background="@drawable/x_shap_shadow_bg_rectgangle_white">
 
 
-        <TextView
-            android:id="@+id/act_notice_title_tv"
+        <LinearLayout
             android:layout_width="match_parent"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginStart="2dp"
-            android:textSize="15sp"
-            android:textColor="#444444"
-            android:text="@string/app_name"/>
-        <TextView
-            android:id="@+id/act_notice_time_tv"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="2dp"
-            android:layout_marginTop="8dp"
-            android:textSize="12sp"
-            android:textColor="#afafaf"
-            android:text="@string/app_name"/>
-        <TextView
-            android:id="@+id/act_notice_content_tv"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="16dp"
-            android:lineSpacingExtra="5dp"
-            android:text="@string/app_name"
-            android:textSize="13sp"
-            android:textColor="#939393"/>
-    </LinearLayout>
+            android:orientation="vertical"
+            android:padding="@dimen/content_padding_10">
+
+            <TextView
+                android:id="@+id/act_notice_title_tv"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="2dp"
+                android:text="@string/app_name"
+                android:textColor="#444444"
+                android:textSize="15sp" />
+
+            <TextView
+                android:id="@+id/act_notice_time_tv"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="2dp"
+                android:layout_marginTop="8dp"
+                android:text="@string/app_name"
+                android:textColor="#afafaf"
+                android:textSize="12sp" />
+
+            <TextView
+                android:id="@+id/act_notice_content_tv"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="16dp"
+                android:lineSpacingExtra="5dp"
+                android:text="@string/app_name"
+                android:textColor="#939393"
+                android:textSize="13sp" />
+        </LinearLayout>
+    </ScrollView>
+
     <TextView
     <TextView
         android:id="@+id/act_notice_back_tv"
         android:id="@+id/act_notice_back_tv"
         style="@style/style_button"
         style="@style/style_button"
-        android:text="返回小绵羊"/>
+        android:text="返回小绵羊" />
 </LinearLayout>
 </LinearLayout>