Added scroll view in MainActivity and remove rotation lock on demo-app

This commit is contained in:
2022-10-01 03:40:12 +08:00
parent ec829a85af
commit a1d2d7ddf0
2 changed files with 99 additions and 86 deletions

View File

@@ -12,8 +12,7 @@
<activity <activity
android:name=".ui.activity.MainActivity" android:name=".ui.activity.MainActivity"
android:exported="true" android:exported="true">
android:screenOrientation="behind">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
@@ -25,7 +24,6 @@
<activity <activity
android:name=".ui.activity.MainActivity$MultiProcessActivity" android:name=".ui.activity.MainActivity$MultiProcessActivity"
android:exported="false" android:exported="false"
android:process=":multi_process" android:process=":multi_process" />
android:screenOrientation="behind" />
</application> </application>
</manifest> </manifest>

View File

@@ -55,93 +55,108 @@
android:textColor="@color/colorTextDark" android:textColor="@color/colorTextDark"
android:textSize="13sp" /> android:textSize="13sp" />
<TextView <androidx.core.widget.NestedScrollView
android:id="@+id/throw_runtime_button"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:fadingEdgeLength="10dp"
android:layout_marginRight="10dp" android:fillViewport="true"
android:layout_marginBottom="10dp" android:paddingBottom="10dp"
android:background="@drawable/bg_button_round" android:requiresFadingEdge="vertical"
android:gravity="center" android:scrollbars="none">
android:padding="10dp"
android:singleLine="true"
android:text="@string/throw_runtime"
android:textColor="@color/colorTextGray"
android:textSize="15sp" />
<TextView <LinearLayout
android:id="@+id/throw_illegal_state_button" android:layout_width="match_parent"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_height="wrap_content" android:orientation="vertical">
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="10dp"
android:background="@drawable/bg_button_round"
android:gravity="center"
android:padding="10dp"
android:singleLine="true"
android:text="@string/throw_illegalstate"
android:textColor="@color/colorTextGray"
android:textSize="15sp" />
<TextView <TextView
android:id="@+id/throw_null_pointer_button" android:id="@+id/throw_runtime_button"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
android:background="@drawable/bg_button_round" android:background="@drawable/bg_button_round"
android:gravity="center" android:gravity="center"
android:padding="10dp" android:padding="10dp"
android:singleLine="true" android:singleLine="true"
android:text="@string/throw_nullpointer" android:text="@string/throw_runtime"
android:textColor="@color/colorTextGray" android:textColor="@color/colorTextGray"
android:textSize="15sp" /> android:textSize="15sp" />
<TextView <TextView
android:id="@+id/throw_exception_button" android:id="@+id/throw_illegal_state_button"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
android:background="@drawable/bg_button_round" android:background="@drawable/bg_button_round"
android:gravity="center" android:gravity="center"
android:padding="10dp" android:padding="10dp"
android:singleLine="true" android:singleLine="true"
android:text="@string/throw_exception" android:text="@string/throw_illegalstate"
android:textColor="@color/colorTextGray" android:textColor="@color/colorTextGray"
android:textSize="15sp" /> android:textSize="15sp" />
<TextView <TextView
android:id="@+id/throw_native_error_button" android:id="@+id/throw_null_pointer_button"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
android:background="@drawable/bg_button_round" android:background="@drawable/bg_button_round"
android:gravity="center" android:gravity="center"
android:padding="10dp" android:padding="10dp"
android:singleLine="true" android:singleLine="true"
android:text="@string/throw_native_error" android:text="@string/throw_nullpointer"
android:textColor="@color/colorTextGray" android:textColor="@color/colorTextGray"
android:textSize="15sp" /> android:textSize="15sp" />
<TextView <TextView
android:id="@+id/throw_multi_process_error_button" android:id="@+id/throw_exception_button"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
android:background="@drawable/bg_button_round" android:background="@drawable/bg_button_round"
android:gravity="center" android:gravity="center"
android:padding="10dp" android:padding="10dp"
android:singleLine="true" android:singleLine="true"
android:text="@string/throw_multi_process_error" android:text="@string/throw_exception"
android:textColor="@color/colorTextGray" android:textColor="@color/colorTextGray"
android:textSize="15sp" /> android:textSize="15sp" />
<TextView
android:id="@+id/throw_native_error_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="10dp"
android:background="@drawable/bg_button_round"
android:gravity="center"
android:padding="10dp"
android:singleLine="true"
android:text="@string/throw_native_error"
android:textColor="@color/colorTextGray"
android:textSize="15sp" />
<TextView
android:id="@+id/throw_multi_process_error_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="@drawable/bg_button_round"
android:gravity="center"
android:padding="10dp"
android:singleLine="true"
android:text="@string/throw_multi_process_error"
android:textColor="@color/colorTextGray"
android:textSize="15sp" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout> </LinearLayout>