Skip to content

Commit 61f5e23

Browse files
committed
Add alternate layouts for recycler view and item
Provide better support for bottom sheets.
1 parent 9c9e4dd commit 61f5e23

File tree

2 files changed

+104
-0
lines changed

2 files changed

+104
-0
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2018-2022 Pranav Pandey
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
18+
<com.pranavpandey.android.dynamic.support.widget.DynamicFrameLayout
19+
xmlns:android="http://schemas.android.com/apk/res/android"
20+
xmlns:app="http://schemas.android.com/apk/res-auto"
21+
style="?attr/ads_widgetContentCardClickableBackground"
22+
android:id="@+id/ads_item_root">
23+
24+
<LinearLayout
25+
android:layout_width="match_parent"
26+
android:layout_height="wrap_content"
27+
android:orientation="vertical">
28+
29+
<LinearLayout
30+
android:layout_width="match_parent"
31+
android:layout_height="wrap_content"
32+
android:orientation="horizontal">
33+
34+
<com.pranavpandey.android.dynamic.support.widget.DynamicImageView
35+
style="?attr/ads_widgetImagePreference"
36+
android:id="@+id/ads_item_icon"
37+
app:srcCompat="@drawable/ads_ic_folder" />
38+
39+
<LinearLayout
40+
style="?attr/ads_widgetContentRowVerticalWeight">
41+
42+
<com.pranavpandey.android.dynamic.support.widget.DynamicTextView
43+
style="?attr/ads_textAppearanceHeadline5"
44+
android:id="@+id/ads_item_title"
45+
android:layout_width="match_parent"
46+
android:layout_height="wrap_content" />
47+
48+
</LinearLayout>
49+
50+
<com.pranavpandey.android.dynamic.support.widget.DynamicImageView
51+
android:id="@+id/ads_item_options"
52+
android:layout_width="@dimen/ads_icon_preference_big"
53+
android:layout_height="@dimen/ads_icon_preference_big"
54+
android:layout_marginLeft="@dimen/ads_page_horizontal_margin"
55+
android:layout_marginStart="@dimen/ads_page_horizontal_margin"
56+
android:layout_gravity="center_vertical"
57+
android:padding="@dimen/ads_margin_tiny"
58+
android:background="?attr/selectableItemBackgroundBorderless"
59+
app:srcCompat="@drawable/ads_ic_more"
60+
app:adt_colorType="accent" />
61+
62+
</LinearLayout>
63+
64+
<com.pranavpandey.android.dynamic.support.widget.DynamicTextView
65+
style="?attr/ads_textAppearanceSecondarySubtitle1"
66+
android:id="@+id/ads_item_subtitle"
67+
android:layout_width="match_parent"
68+
android:layout_height="wrap_content" />
69+
70+
</LinearLayout>
71+
72+
</com.pranavpandey.android.dynamic.support.widget.DynamicFrameLayout>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2018-2022 Pranav Pandey
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
18+
<merge
19+
xmlns:android="http://schemas.android.com/apk/res/android"
20+
xmlns:app="http://schemas.android.com/apk/res-auto"
21+
android:id="@+id/ads_recycler_view_root"
22+
android:layout_width="match_parent"
23+
android:layout_height="match_parent">
24+
25+
<com.pranavpandey.android.dynamic.support.widget.DynamicRecyclerView
26+
style="?attr/ads_widgetScrollerVertical"
27+
android:id="@+id/ads_recycler_view"
28+
android:layout_height="wrap_content"
29+
android:fillViewport="false"
30+
app:adt_windowInsets="false" />
31+
32+
</merge>

0 commit comments

Comments
 (0)