Skip to content

Commit 5c8518f

Browse files
committed
moved SystemBarProtection.kt into its own package & simplified layout of system_bar_protection.xml
1 parent 4b4bcc4 commit 5c8518f

File tree

2 files changed

+13
-19
lines changed

2 files changed

+13
-19
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.example.example.snippet.views.appwidget
17+
package insets
1818

1919
import android.os.Bundle
2020
import android.view.View

views/src/main/res/layout/system_bar_protection.xml

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,22 @@
1717
1818
-->
1919

20-
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
20+
<!-- [START android_system_bar_protection_xml] -->
21+
<androidx.core.view.insets.ProtectionLayout
22+
xmlns:android="http://schemas.android.com/apk/res/android"
23+
android:id="@+id/list_protection"
2124
android:layout_width="match_parent"
22-
android:layout_height="match_parent"
23-
android:orientation="vertical">
25+
android:layout_height="match_parent">
2426

25-
<!-- [START android_system_bar_protection_xml] -->
26-
<androidx.core.view.insets.ProtectionLayout
27-
android:id="@+id/list_protection"
27+
<ScrollView
28+
android:id="@+id/item_list"
29+
android:clipToPadding="false"
2830
android:layout_width="match_parent"
2931
android:layout_height="match_parent">
3032

31-
<ScrollView
32-
android:id="@+id/item_list"
33-
android:clipToPadding="false"
34-
android:layout_width="match_parent"
35-
android:layout_height="match_parent">
33+
<!--items-->
3634

37-
<!--items-->
35+
</ScrollView>
3836

39-
</ScrollView>
40-
41-
</androidx.core.view.insets.ProtectionLayout>
42-
<!-- [END android_system_bar_protection_xml] -->
43-
44-
</LinearLayout>
37+
</androidx.core.view.insets.ProtectionLayout>
38+
<!-- [END android_system_bar_protection_xml] -->

0 commit comments

Comments
 (0)