Skip to content

Commit

Permalink
Add theme attributes for info view backdrop
Browse files Browse the repository at this point in the history
  • Loading branch information
pranavpandey committed Feb 24, 2023
1 parent 1b4aa5a commit 4f22e5b
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 13 deletions.
12 changes: 4 additions & 8 deletions dynamic-support/src/main/res/layout/ads_info_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,12 @@
</LinearLayout>

<FrameLayout
android:id="@+id/ads_info_view_icon_frame"
android:layout_width="@dimen/ads_icon_card_permission_frame"
android:layout_height="@dimen/ads_icon_card_permission_frame"
android:layout_gravity="right|end|bottom">
style="?attr/ads_widgetImageInfoBackdropFrame"
android:id="@+id/ads_info_view_icon_frame">

<com.pranavpandey.android.dynamic.support.widget.DynamicImageView
style="?attr/ads_widgetImageCardBig"
android:id="@+id/ads_info_view_icon_big"
android:layout_width="@dimen/ads_icon_card_permission"
android:layout_height="@dimen/ads_icon_card_permission" />
style="?attr/ads_widgetImageInfoBackdrop"
android:id="@+id/ads_info_view_icon_big" />

</FrameLayout>

Expand Down
8 changes: 3 additions & 5 deletions dynamic-support/src/main/res/layout/ads_info_view_big.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,11 @@
</LinearLayout>

<FrameLayout
android:id="@+id/ads_info_view_icon_frame"
android:layout_width="@dimen/ads_icon_card_big_frame"
android:layout_height="@dimen/ads_icon_card_big_frame"
android:layout_gravity="right|end|bottom">
style="?attr/ads_widgetImageInfoBigBackdropFrame"
android:id="@+id/ads_info_view_icon_frame">

<com.pranavpandey.android.dynamic.support.widget.DynamicImageView
style="?attr/ads_widgetImageCardBig"
style="?attr/ads_widgetImageInfoBigBackdrop"
android:id="@+id/ads_info_view_icon_big" />

</FrameLayout>
Expand Down
8 changes: 8 additions & 0 deletions dynamic-support/src/main/res/values/attrs_theme.xml
Original file line number Diff line number Diff line change
Expand Up @@ -345,10 +345,18 @@
<attr name="ads_widgetImageInfo" format="reference" />
<!-- The info placeholder image style. -->
<attr name="ads_widgetImageInfoPlaceholder" format="reference" />
<!-- The info backdrop image style. -->
<attr name="ads_widgetImageInfoBackdrop" format="reference" />
<!-- The info backdrop frame style. -->
<attr name="ads_widgetImageInfoBackdropFrame" format="reference" />
<!-- The big info image style. -->
<attr name="ads_widgetImageInfoBig" format="reference" />
<!-- The big info placeholder image style. -->
<attr name="ads_widgetImageInfoBigPlaceholder" format="reference" />
<!-- The big info backdrop image style. -->
<attr name="ads_widgetImageInfoBigBackdrop" format="reference" />
<!-- The big info backdrop frame style. -->
<attr name="ads_widgetImageInfoBigBackdropFrame" format="reference" />
<!-- The preference image style. -->
<attr name="ads_widgetImagePreference" format="reference" />
<!-- The preference centered image style. -->
Expand Down
17 changes: 17 additions & 0 deletions dynamic-support/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -890,6 +890,16 @@
<style name="Widget.Dynamic.Image.Info.Placeholder">
<item name="android:layout_height">0dp</item>
</style>
<style name="Widget.Dynamic.Image.Info.Backdrop"
parent="@style/Widget.Dynamic.Image.Card.Big">
<item name="android:layout_width">@dimen/ads_icon_card_permission</item>
<item name="android:layout_height">@dimen/ads_icon_card_permission</item>
</style>
<style name="Widget.Dynamic.Image.Info.Backdrop.Frame" parent="">
<item name="android:layout_width">@dimen/ads_icon_card_permission_frame</item>
<item name="android:layout_height">@dimen/ads_icon_card_permission_frame</item>
<item name="android:layout_gravity">right|end|bottom</item>
</style>
<style name="Widget.Dynamic.Image.Info.Big">
<item name="android:layout_width">@dimen/ads_icon_info_big</item>
<item name="android:layout_height">@dimen/ads_icon_info_big</item>
Expand All @@ -899,6 +909,13 @@
<style name="Widget.Dynamic.Image.Info.Big.Placeholder">
<item name="android:layout_height">0dp</item>
</style>
<style name="Widget.Dynamic.Image.Info.Big.Backdrop"
parent="@style/Widget.Dynamic.Image.Card.Big" />
<style name="Widget.Dynamic.Image.Info.Big.Backdrop.Frame" parent="">
<item name="android:layout_width">@dimen/ads_icon_card_big_frame</item>
<item name="android:layout_height">@dimen/ads_icon_card_big_frame</item>
<item name="android:layout_gravity">right|end|bottom</item>
</style>

<style name="Widget.Dynamic.Image.Preference">
<item name="android:layout_width">@dimen/ads_icon_preference</item>
Expand Down
17 changes: 17 additions & 0 deletions dynamic-support/src/main/res/values/styles_v2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,16 @@
<style name="Widget.Dynamic2.Image.Info.Placeholder">
<item name="android:layout_height">0dp</item>
</style>
<style name="Widget.Dynamic2.Image.Info.Backdrop"
parent="@style/Widget.Dynamic2.Image.Card.Big">
<item name="android:layout_width">@dimen/ads_icon_card_permission</item>
<item name="android:layout_height">@dimen/ads_icon_card_permission</item>
</style>
<style name="Widget.Dynamic2.Image.Info.Backdrop.Frame" parent="">
<item name="android:layout_width">@dimen/ads_icon_card_permission_frame</item>
<item name="android:layout_height">@dimen/ads_icon_card_permission_frame</item>
<item name="android:layout_gravity">right|end|bottom</item>
</style>
<style name="Widget.Dynamic2.Image.Info.Big">
<item name="android:layout_width">@dimen/ads_icon_info_big</item>
<item name="android:layout_height">@dimen/ads_icon_info_big</item>
Expand All @@ -799,6 +809,13 @@
<style name="Widget.Dynamic2.Image.Info.Big.Placeholder">
<item name="android:layout_height">0dp</item>
</style>
<style name="Widget.Dynamic2.Image.Info.Big.Backdrop"
parent="@style/Widget.Dynamic2.Image.Card.Big" />
<style name="Widget.Dynamic2.Image.Info.Big.Backdrop.Frame" parent="">
<item name="android:layout_width">@dimen/ads_icon_card_big_frame</item>
<item name="android:layout_height">@dimen/ads_icon_card_big_frame</item>
<item name="android:layout_gravity">right|end|bottom</item>
</style>

<style name="Widget.Dynamic2.Image.Preference">
<item name="android:layout_width">@dimen/ads_icon_preference</item>
Expand Down
12 changes: 12 additions & 0 deletions dynamic-support/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,12 @@
<item name="ads_widgetImageCardBigTutorial">@style/Widget.Dynamic.Image.Card.Big.Tutorial</item>
<item name="ads_widgetImageInfo">@style/Widget.Dynamic.Image.Info</item>
<item name="ads_widgetImageInfoPlaceholder">@style/Widget.Dynamic.Image.Info.Placeholder</item>
<item name="ads_widgetImageInfoBackdrop">@style/Widget.Dynamic.Image.Info.Backdrop</item>
<item name="ads_widgetImageInfoBackdropFrame">@style/Widget.Dynamic.Image.Info.Backdrop.Frame</item>
<item name="ads_widgetImageInfoBig">@style/Widget.Dynamic.Image.Info.Big</item>
<item name="ads_widgetImageInfoBigPlaceholder">@style/Widget.Dynamic.Image.Info.Big.Placeholder</item>
<item name="ads_widgetImageInfoBigBackdrop">@style/Widget.Dynamic.Image.Info.Big.Backdrop</item>
<item name="ads_widgetImageInfoBigBackdropFrame">@style/Widget.Dynamic.Image.Info.Big.Backdrop.Frame</item>
<item name="ads_widgetImagePreference">@style/Widget.Dynamic.Image.Preference</item>
<item name="ads_widgetImagePreferenceCenter">@style/Widget.Dynamic.Image.Preference.Center</item>
<item name="ads_widgetImagePreferenceCompact">@style/Widget.Dynamic.Image.Preference.Compact</item>
Expand Down Expand Up @@ -497,8 +501,12 @@
<item name="ads_widgetImageCardBigTutorial">@style/Widget.Dynamic.Image.Card.Big.Tutorial</item>
<item name="ads_widgetImageInfo">@style/Widget.Dynamic.Image.Info</item>
<item name="ads_widgetImageInfoPlaceholder">@style/Widget.Dynamic.Image.Info.Placeholder</item>
<item name="ads_widgetImageInfoBackdrop">@style/Widget.Dynamic.Image.Info.Backdrop</item>
<item name="ads_widgetImageInfoBackdropFrame">@style/Widget.Dynamic.Image.Info.Backdrop.Frame</item>
<item name="ads_widgetImageInfoBig">@style/Widget.Dynamic.Image.Info.Big</item>
<item name="ads_widgetImageInfoBigPlaceholder">@style/Widget.Dynamic.Image.Info.Big.Placeholder</item>
<item name="ads_widgetImageInfoBigBackdrop">@style/Widget.Dynamic.Image.Info.Big.Backdrop</item>
<item name="ads_widgetImageInfoBigBackdropFrame">@style/Widget.Dynamic.Image.Info.Big.Backdrop.Frame</item>
<item name="ads_widgetImagePreference">@style/Widget.Dynamic.Image.Preference</item>
<item name="ads_widgetImagePreferenceCenter">@style/Widget.Dynamic.Image.Preference.Center</item>
<item name="ads_widgetImagePreferenceCompact">@style/Widget.Dynamic.Image.Preference.Compact</item>
Expand Down Expand Up @@ -772,8 +780,12 @@
<item name="ads_widgetImageCardBigTutorial">@style/Widget.Dynamic.Image.Card.Big.Tutorial</item>
<item name="ads_widgetImageInfo">@style/Widget.Dynamic.Image.Info</item>
<item name="ads_widgetImageInfoPlaceholder">@style/Widget.Dynamic.Image.Info.Placeholder</item>
<item name="ads_widgetImageInfoBackdrop">@style/Widget.Dynamic.Image.Info.Backdrop</item>
<item name="ads_widgetImageInfoBackdropFrame">@style/Widget.Dynamic.Image.Info.Backdrop.Frame</item>
<item name="ads_widgetImageInfoBig">@style/Widget.Dynamic.Image.Info.Big</item>
<item name="ads_widgetImageInfoBigPlaceholder">@style/Widget.Dynamic.Image.Info.Big.Placeholder</item>
<item name="ads_widgetImageInfoBigBackdrop">@style/Widget.Dynamic.Image.Info.Big.Backdrop</item>
<item name="ads_widgetImageInfoBigBackdropFrame">@style/Widget.Dynamic.Image.Info.Big.Backdrop.Frame</item>
<item name="ads_widgetImagePreference">@style/Widget.Dynamic.Image.Preference</item>
<item name="ads_widgetImagePreferenceCenter">@style/Widget.Dynamic.Image.Preference.Center</item>
<item name="ads_widgetImagePreferenceCompact">@style/Widget.Dynamic.Image.Preference.Compact</item>
Expand Down
12 changes: 12 additions & 0 deletions dynamic-support/src/main/res/values/themes_v2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,12 @@
<item name="ads_widgetImageCardBigTutorial">@style/Widget.Dynamic2.Image.Card.Big.Tutorial</item>
<item name="ads_widgetImageInfo">@style/Widget.Dynamic2.Image.Info</item>
<item name="ads_widgetImageInfoPlaceholder">@style/Widget.Dynamic2.Image.Info.Placeholder</item>
<item name="ads_widgetImageInfoBackdrop">@style/Widget.Dynamic2.Image.Info.Backdrop</item>
<item name="ads_widgetImageInfoBackdropFrame">@style/Widget.Dynamic2.Image.Info.Backdrop.Frame</item>
<item name="ads_widgetImageInfoBig">@style/Widget.Dynamic2.Image.Info.Big</item>
<item name="ads_widgetImageInfoBigPlaceholder">@style/Widget.Dynamic2.Image.Info.Big.Placeholder</item>
<item name="ads_widgetImageInfoBigBackdrop">@style/Widget.Dynamic2.Image.Info.Big.Backdrop</item>
<item name="ads_widgetImageInfoBigBackdropFrame">@style/Widget.Dynamic2.Image.Info.Big.Backdrop.Frame</item>
<item name="ads_widgetImagePreference">@style/Widget.Dynamic2.Image.Preference</item>
<item name="ads_widgetImagePreferenceCenter">@style/Widget.Dynamic2.Image.Preference.Center</item>
<item name="ads_widgetImagePreferenceCompact">@style/Widget.Dynamic2.Image.Preference.Compact</item>
Expand Down Expand Up @@ -525,8 +529,12 @@
<item name="ads_widgetImageCardBigTutorial">@style/Widget.Dynamic2.Image.Card.Big.Tutorial</item>
<item name="ads_widgetImageInfo">@style/Widget.Dynamic2.Image.Info</item>
<item name="ads_widgetImageInfoPlaceholder">@style/Widget.Dynamic2.Image.Info.Placeholder</item>
<item name="ads_widgetImageInfoBackdrop">@style/Widget.Dynamic2.Image.Info.Backdrop</item>
<item name="ads_widgetImageInfoBackdropFrame">@style/Widget.Dynamic2.Image.Info.Backdrop.Frame</item>
<item name="ads_widgetImageInfoBig">@style/Widget.Dynamic2.Image.Info.Big</item>
<item name="ads_widgetImageInfoBigPlaceholder">@style/Widget.Dynamic2.Image.Info.Big.Placeholder</item>
<item name="ads_widgetImageInfoBigBackdrop">@style/Widget.Dynamic2.Image.Info.Big.Backdrop</item>
<item name="ads_widgetImageInfoBigBackdropFrame">@style/Widget.Dynamic2.Image.Info.Big.Backdrop.Frame</item>
<item name="ads_widgetImagePreference">@style/Widget.Dynamic2.Image.Preference</item>
<item name="ads_widgetImagePreferenceCenter">@style/Widget.Dynamic2.Image.Preference.Center</item>
<item name="ads_widgetImagePreferenceCompact">@style/Widget.Dynamic2.Image.Preference.Compact</item>
Expand Down Expand Up @@ -815,8 +823,12 @@
<item name="ads_widgetImageCardBigTutorial">@style/Widget.Dynamic2.Image.Card.Big.Tutorial</item>
<item name="ads_widgetImageInfo">@style/Widget.Dynamic2.Image.Info</item>
<item name="ads_widgetImageInfoPlaceholder">@style/Widget.Dynamic2.Image.Info.Placeholder</item>
<item name="ads_widgetImageInfoBackdrop">@style/Widget.Dynamic2.Image.Info.Backdrop</item>
<item name="ads_widgetImageInfoBackdropFrame">@style/Widget.Dynamic2.Image.Info.Backdrop.Frame</item>
<item name="ads_widgetImageInfoBig">@style/Widget.Dynamic2.Image.Info.Big</item>
<item name="ads_widgetImageInfoBigPlaceholder">@style/Widget.Dynamic2.Image.Info.Big.Placeholder</item>
<item name="ads_widgetImageInfoBigBackdrop">@style/Widget.Dynamic2.Image.Info.Big.Backdrop</item>
<item name="ads_widgetImageInfoBigBackdropFrame">@style/Widget.Dynamic2.Image.Info.Big.Backdrop.Frame</item>
<item name="ads_widgetImagePreference">@style/Widget.Dynamic2.Image.Preference</item>
<item name="ads_widgetImagePreferenceCenter">@style/Widget.Dynamic2.Image.Preference.Center</item>
<item name="ads_widgetImagePreferenceCompact">@style/Widget.Dynamic2.Image.Preference.Compact</item>
Expand Down

0 comments on commit 4f22e5b

Please sign in to comment.