diff options
author | Clark Scheff <clark@cyngn.com> | 2014-08-11 17:04:33 -0700 |
---|---|---|
committer | Clark Scheff <clark@cyngn.com> | 2014-08-13 09:50:29 -0700 |
commit | 6ccda47ee84a5b7c6514ced5ebe03b26d6b8896e (patch) | |
tree | 2537715a243baa83ba41f660dfb2e56fd45d07bd /res/layout | |
parent | adcec10c05e84bf2d07a354b1ee22cbb494d8e3a (diff) | |
download | packages_apps_ThemeChooser-6ccda47ee84a5b7c6514ced5ebe03b26d6b8896e.tar.gz packages_apps_ThemeChooser-6ccda47ee84a5b7c6514ced5ebe03b26d6b8896e.tar.bz2 packages_apps_ThemeChooser-6ccda47ee84a5b7c6514ced5ebe03b26d6b8896e.zip |
Implement "add component" to components that are not in the given theme.
Change-Id: I30a69e265a44f327ba9f0479d925a550427f6a6f
Diffstat (limited to 'res/layout')
-rw-r--r-- | res/layout/audible_card.xml | 47 | ||||
-rw-r--r-- | res/layout/bootanim_card.xml | 11 | ||||
-rw-r--r-- | res/layout/font_card.xml | 44 | ||||
-rw-r--r-- | res/layout/icon_card.xml | 76 | ||||
-rw-r--r-- | res/layout/navbar_card.xml | 86 | ||||
-rw-r--r-- | res/layout/status_bar_card.xml | 108 | ||||
-rw-r--r-- | res/layout/style_card.xml | 32 | ||||
-rw-r--r-- | res/layout/wallpaper_card.xml | 13 |
8 files changed, 274 insertions, 143 deletions
diff --git a/res/layout/audible_card.xml b/res/layout/audible_card.xml index 02d93f7..7554810 100644 --- a/res/layout/audible_card.xml +++ b/res/layout/audible_card.xml @@ -10,23 +10,40 @@ android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/card_label"/> - <LinearLayout - android:id="@+id/ringtone_preview" - android:orientation="horizontal" + <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent"> - <TextView - android:id="@+id/audible_name" + <LinearLayout + android:id="@+id/content" + android:orientation="horizontal" + android:layout_width="match_parent" + android:layout_height="match_parent"> + <TextView + android:id="@+id/audible_name" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:layout_weight="1" + android:gravity="center_vertical" + style="@style/audible_name"/> + <ImageView + android:id="@+id/play_pause" + android:layout_width="24dp" + android:layout_height="24dp" + android:src="@drawable/media_sound_preview"/> + </LinearLayout> + <LinearLayout + android:id="@+id/empty" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_gravity="center" - android:layout_weight="1" - android:gravity="center_vertical" - style="@style/audible_name"/> - <ImageView - android:id="@+id/play_pause" - android:layout_width="24dp" - android:layout_height="24dp" - android:src="@drawable/media_sound_preview"/> - </LinearLayout> + android:layout_gravity="center_horizontal" + android:visibility="gone"> + <ImageView + android:layout_width="20dp" + android:layout_height="20dp" + android:layout_marginEnd="8dp" + android:layout_gravity="center_vertical" + android:src="@drawable/ic_addcomponent"/> + </LinearLayout> + </FrameLayout> </com.cyngn.theme.chooser.ComponentCardView> diff --git a/res/layout/bootanim_card.xml b/res/layout/bootanim_card.xml index 905cbfb..5a23423 100644 --- a/res/layout/bootanim_card.xml +++ b/res/layout/bootanim_card.xml @@ -22,5 +22,16 @@ android:layout_height="wrap_content" android:text="@string/boot_animation_label" style="@style/card_label"/> + <LinearLayout + android:id="@+id/empty" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:visibility="gone"> + <ImageView + android:layout_width="20dp" + android:layout_height="20dp" + android:src="@drawable/ic_addcomponent"/> + </LinearLayout> </FrameLayout> </com.cyngn.theme.chooser.ComponentCardView> diff --git a/res/layout/font_card.xml b/res/layout/font_card.xml index 7f9681c..c42c719 100644 --- a/res/layout/font_card.xml +++ b/res/layout/font_card.xml @@ -15,18 +15,36 @@ android:visibility="gone" android:text="@string/font_label" style="@style/card_label"/> - <TextView - android:id="@+id/font_preview" + <FrameLayout android:layout_width="match_parent" - android:layout_height="48dp" - android:layout_gravity="center" - android:text="@string/font_preview_letters" - android:textColor="@color/font_preview_color" - android:shadowColor="@color/font_preview_shadow_color" - android:shadowDx="2" - android:shadowDy="2" - android:shadowRadius="4" - android:textSize="40sp" - android:gravity="center" - /> + android:layout_height="wrap_content"> + <TextView + android:id="@+id/font_preview" + android:layout_width="match_parent" + android:layout_height="48dp" + android:layout_gravity="center" + android:text="@string/font_preview_letters" + android:textColor="@color/font_preview_color" + android:shadowColor="@color/font_preview_shadow_color" + android:shadowDx="2" + android:shadowDy="2" + android:shadowRadius="4" + android:textSize="40sp" + android:gravity="center" + /> + <LinearLayout + android:id="@+id/empty" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:layout_marginTop="6dp" + android:layout_marginBottom="36dp" + android:visibility="gone"> + <ImageView + android:layout_width="20dp" + android:layout_height="20dp" + android:layout_gravity="center_vertical" + android:src="@drawable/ic_addcomponent"/> + </LinearLayout> + </FrameLayout> </com.cyngn.theme.chooser.ComponentCardView> diff --git a/res/layout/icon_card.xml b/res/layout/icon_card.xml index d3c2327..38e4686 100644 --- a/res/layout/icon_card.xml +++ b/res/layout/icon_card.xml @@ -15,33 +15,51 @@ android:visibility="gone" android:text="@string/icon_label" style="@style/card_label"/> - <LinearLayout - android:id="@+id/icon_preview_container" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - > - <Space android:layout_width="30dp" android:layout_height="match_parent"/> - <ImageView - android:layout_width="48dp" - android:layout_height="48dp" - android:scaleType="fitCenter" - android:src="@drawable/comp_icon1" - /> - <Space android:layout_width="30dp" android:layout_height="match_parent"/> - <ImageView - android:layout_width="48dp" - android:layout_height="48dp" - android:scaleType="fitCenter" - android:src="@drawable/comp_icon2" - /> - <Space android:layout_width="30dp" android:layout_height="match_parent"/> - <ImageView - android:layout_width="48dp" - android:layout_height="48dp" - android:scaleType="fitCenter" - android:src="@drawable/comp_icon3" - /> - <Space android:layout_width="30dp" android:layout_height="match_parent"/> - </LinearLayout> + <FrameLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content"> + <LinearLayout + android:id="@+id/icon_preview_container" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + > + <Space android:layout_width="30dp" android:layout_height="match_parent"/> + <ImageView + android:layout_width="48dp" + android:layout_height="48dp" + android:scaleType="fitCenter" + android:src="@drawable/comp_icon1" + /> + <Space android:layout_width="30dp" android:layout_height="match_parent"/> + <ImageView + android:layout_width="48dp" + android:layout_height="48dp" + android:scaleType="fitCenter" + android:src="@drawable/comp_icon2" + /> + <Space android:layout_width="30dp" android:layout_height="match_parent"/> + <ImageView + android:layout_width="48dp" + android:layout_height="48dp" + android:scaleType="fitCenter" + android:src="@drawable/comp_icon3" + /> + <Space android:layout_width="30dp" android:layout_height="match_parent"/> + </LinearLayout> + <LinearLayout + android:id="@+id/empty" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:layout_marginTop="15dp" + android:layout_marginBottom="45dp" + android:visibility="gone"> + <ImageView + android:layout_width="20dp" + android:layout_height="20dp" + android:layout_gravity="center_vertical" + android:src="@drawable/ic_addcomponent"/> + </LinearLayout> + </FrameLayout> </com.cyngn.theme.chooser.ComponentCardView>
\ No newline at end of file diff --git a/res/layout/navbar_card.xml b/res/layout/navbar_card.xml index c140ac2..a8fcae4 100644 --- a/res/layout/navbar_card.xml +++ b/res/layout/navbar_card.xml @@ -17,44 +17,62 @@ android:text="@string/navbar_label" style="@style/card_label"/> - <LinearLayout - android:id="@+id/navigation_bar" - android:orientation="horizontal" - android:layout_width="match_parent" - android:layout_height="@*android:dimen/system_bar_height" - android:paddingStart="6dp" - android:paddingEnd="6dp" - android:background="#000"> + <FrameLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content"> + <LinearLayout + android:id="@+id/navigation_bar" + android:orientation="horizontal" + android:layout_width="match_parent" + android:layout_height="@*android:dimen/system_bar_height" + android:paddingStart="6dp" + android:paddingEnd="6dp" + android:background="#000"> - <!-- Dummy view for padding --> - <View - android:layout_width="0dp" - android:layout_height="match_parent" - android:layout_weight="1"/> + <!-- Dummy view for padding --> + <View + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_weight="1"/> - <ImageView - android:id="@+id/back_button" - android:layout_width="@dimen/navigation_button_width" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical"/> + <ImageView + android:id="@+id/back_button" + android:layout_width="@dimen/navigation_button_width" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical"/> - <ImageView - android:id="@+id/home_button" - android:layout_width="@dimen/navigation_button_width" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical"/> + <ImageView + android:id="@+id/home_button" + android:layout_width="@dimen/navigation_button_width" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical"/> - <ImageView - android:id="@+id/recent_button" - android:layout_width="@dimen/navigation_button_width" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical"/> + <ImageView + android:id="@+id/recent_button" + android:layout_width="@dimen/navigation_button_width" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical"/> - <!-- Dummy view for padding --> - <View - android:layout_width="0dp" - android:layout_height="match_parent" - android:layout_weight="1"/> + <!-- Dummy view for padding --> + <View + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_weight="1"/> - </LinearLayout> + </LinearLayout> + <LinearLayout + android:id="@+id/empty" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:layout_marginTop="15dp" + android:layout_marginBottom="45dp" + android:visibility="gone"> + <ImageView + android:layout_width="20dp" + android:layout_height="20dp" + android:layout_gravity="center_vertical" + android:src="@drawable/ic_addcomponent"/> + </LinearLayout> + </FrameLayout> </com.cyngn.theme.chooser.ComponentCardView>
\ No newline at end of file diff --git a/res/layout/status_bar_card.xml b/res/layout/status_bar_card.xml index d79a8ec..983c3da 100644 --- a/res/layout/status_bar_card.xml +++ b/res/layout/status_bar_card.xml @@ -19,58 +19,76 @@ android:focusable="false" android:text="@string/statusbar_label" style="@style/card_label"/> - <LinearLayout - android:id="@+id/status_bar" - android:orientation="horizontal" + <FrameLayout android:layout_width="match_parent" - android:layout_height="@*android:dimen/status_bar_height" - android:paddingEnd="6dp" - android:background="#000"> + android:layout_height="match_parent"> + <LinearLayout + android:id="@+id/status_bar" + android:orientation="horizontal" + android:layout_width="match_parent" + android:layout_height="@*android:dimen/status_bar_height" + android:paddingEnd="6dp" + android:background="#000"> - <!-- dummy view to push everything to the right. --> - <View - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1"/> + <!-- dummy view to push everything to the right. --> + <View + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1"/> - <ImageView - android:id="@+id/bluetooth_icon" - android:layout_width="wrap_content" - android:layout_height="@*android:dimen/status_bar_icon_size" - android:layout_gravity="center_vertical" - android:paddingEnd="6dp" - android:scaleType="fitCenter"/> + <ImageView + android:id="@+id/bluetooth_icon" + android:layout_width="wrap_content" + android:layout_height="@*android:dimen/status_bar_icon_size" + android:layout_gravity="center_vertical" + android:paddingEnd="6dp" + android:scaleType="fitCenter"/> - <ImageView - android:id="@+id/wifi_icon" - android:layout_width="wrap_content" - android:layout_height="@*android:dimen/status_bar_icon_size" - android:layout_gravity="center_vertical" - android:scaleType="fitCenter"/> + <ImageView + android:id="@+id/wifi_icon" + android:layout_width="wrap_content" + android:layout_height="@*android:dimen/status_bar_icon_size" + android:layout_gravity="center_vertical" + android:scaleType="fitCenter"/> - <ImageView - android:id="@+id/signal_icon" - android:layout_width="wrap_content" - android:layout_height="@*android:dimen/status_bar_icon_size" - android:layout_gravity="center_vertical" - android:paddingEnd="6dp" - android:scaleType="fitCenter"/> + <ImageView + android:id="@+id/signal_icon" + android:layout_width="wrap_content" + android:layout_height="@*android:dimen/status_bar_icon_size" + android:layout_gravity="center_vertical" + android:paddingEnd="6dp" + android:scaleType="fitCenter"/> - <ImageView - android:id="@+id/battery" - android:layout_width="wrap_content" - android:layout_height="@*android:dimen/status_bar_icon_size" - android:layout_gravity="center_vertical" - android:paddingEnd="6dp" - android:scaleType="fitCenter"/> + <ImageView + android:id="@+id/battery" + android:layout_width="wrap_content" + android:layout_height="@*android:dimen/status_bar_icon_size" + android:layout_gravity="center_vertical" + android:paddingEnd="6dp" + android:scaleType="fitCenter"/> - <TextView - android:id="@+id/clock" + <TextView + android:id="@+id/clock" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:gravity="center_vertical" + android:layout_gravity="center_vertical" + android:text="@string/status_bar_clock_text" + style="@style/TextAppearance.StatusBar.Clock"/> + </LinearLayout> + <LinearLayout + android:id="@+id/empty" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:gravity="center_vertical" - android:layout_gravity="center_vertical" - android:text="@string/status_bar_clock_text" - style="@style/TextAppearance.StatusBar.Clock"/> - </LinearLayout> + android:layout_gravity="center" + android:layout_marginTop="6dp" + android:layout_marginBottom="31dp" + android:visibility="gone"> + <ImageView + android:layout_width="20dp" + android:layout_height="20dp" + android:layout_gravity="center_vertical" + android:src="@drawable/ic_addcomponent"/> + </LinearLayout> + </FrameLayout> </com.cyngn.theme.chooser.ComponentCardView>
\ No newline at end of file diff --git a/res/layout/style_card.xml b/res/layout/style_card.xml index 951d0a1..3082f2c 100644 --- a/res/layout/style_card.xml +++ b/res/layout/style_card.xml @@ -12,11 +12,29 @@ android:layout_height="wrap_content" android:text="@string/style_label" style="@style/card_label"/> - <ImageView - android:id="@+id/style_preview" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_gravity="center" - android:scaleType="fitCenter" - android:gravity="center"/> + <FrameLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content"> + <ImageView + android:id="@+id/style_preview" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:scaleType="fitCenter" + android:gravity="center"/> + <LinearLayout + android:id="@+id/empty" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:layout_marginTop="65dp" + android:layout_marginBottom="98dp" + android:visibility="gone"> + <ImageView + android:layout_width="20dp" + android:layout_height="20dp" + android:layout_gravity="center_vertical" + android:src="@drawable/ic_addcomponent"/> + </LinearLayout> + </FrameLayout> </com.cyngn.theme.chooser.ComponentCardView> diff --git a/res/layout/wallpaper_card.xml b/res/layout/wallpaper_card.xml index 6f35f24..f84d36a 100644 --- a/res/layout/wallpaper_card.xml +++ b/res/layout/wallpaper_card.xml @@ -15,4 +15,17 @@ android:textColor="@color/wallpaper_label" android:background="@drawable/wallpaper_label_bg" style="@style/card_label"/> + + <LinearLayout + android:id="@+id/empty" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:visibility="gone"> + <ImageView + android:layout_width="20dp" + android:layout_height="20dp" + android:layout_gravity="center_vertical" + android:src="@drawable/ic_addcomponent"/> + </LinearLayout> </FrameLayout> |