Merge "Update the margins and colors of MainSwitchBar to fit the spec." into sc-dev
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
android:height="@dimen/settingslib_switch_thumb_size"
|
||||
android:width="@dimen/settingslib_switch_thumb_size"/>
|
||||
<solid
|
||||
android:color="@color/settingslib_state_off_color"
|
||||
android:color="@color/settingslib_thumb_off_color"
|
||||
android:alpha="?android:attr/disabledAlpha"/>
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<size
|
||||
android:height="@dimen/settingslib_switch_thumb_size"
|
||||
android:width="@dimen/settingslib_switch_thumb_size"/>
|
||||
<solid android:color="@color/settingslib_state_off_color"/>
|
||||
<solid android:color="@color/settingslib_thumb_off_color"/>
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
|
||||
@@ -19,10 +19,6 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
||||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
|
||||
android:paddingLeft="?android:attr/listPreferredItemPaddingLeft"
|
||||
android:paddingRight="?android:attr/listPreferredItemPaddingRight"
|
||||
android:background="?android:attr/colorBackground"
|
||||
android:orientation="vertical">
|
||||
|
||||
@@ -31,15 +27,16 @@
|
||||
android:minHeight="@dimen/settingslib_min_switch_bar_height"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:paddingLeft="@dimen/settingslib_switchbar_margin_start"
|
||||
android:paddingRight="@dimen/settingslib_switchbar_margin_end">
|
||||
android:layout_margin="@dimen/settingslib_switchbar_margin"
|
||||
android:paddingStart="@dimen/settingslib_switchbar_padding_left"
|
||||
android:paddingEnd="@dimen/settingslib_switchbar_padding_right">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/switch_text"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
|
||||
@@ -15,10 +15,16 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<resources xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
|
||||
<resources>
|
||||
<color name="settingslib_switchbar_switch_track_tint">#82000000</color>
|
||||
<color name="settingslib_switchbar_switch_thumb_tint">@android:color/black</color>
|
||||
|
||||
<!-- Material next thumb off color-->
|
||||
<color name="settingslib_thumb_off_color">@android:color/system_neutral2_300</color>
|
||||
|
||||
<!-- Material next track on color-->
|
||||
<color name="settingslib_track_on_color">?androidprv:attr/colorSurfaceHighlight</color>
|
||||
<color name="settingslib_track_on_color">@android:color/system_accent2_700</color>
|
||||
|
||||
<!-- Material next track off color-->
|
||||
<color name="settingslib_track_off_color">@android:color/system_neutral1_700</color>
|
||||
</resources>
|
||||
|
||||
@@ -26,9 +26,12 @@
|
||||
<!-- Material next state off color-->
|
||||
<color name="settingslib_state_off_color">?androidprv:attr/colorAccentSecondary</color>
|
||||
|
||||
<!-- Material next thumb off color-->
|
||||
<color name="settingslib_thumb_off_color">@android:color/system_neutral2_100</color>
|
||||
|
||||
<!-- Material next track on color-->
|
||||
<color name="settingslib_track_on_color">?androidprv:attr/colorAccentPrimaryVariant</color>
|
||||
|
||||
<!-- Material next track off color-->
|
||||
<color name="settingslib_track_off_color">?androidprv:attr/colorAccentSecondaryVariant</color>
|
||||
<color name="settingslib_track_off_color">@android:color/system_neutral2_600</color>
|
||||
</resources>
|
||||
|
||||
@@ -17,11 +17,14 @@
|
||||
|
||||
<resources>
|
||||
|
||||
<!-- Size of layout margin -->
|
||||
<dimen name="settingslib_switchbar_margin">16dp</dimen>
|
||||
|
||||
<!-- Size of layout margin left -->
|
||||
<dimen name="settingslib_switchbar_margin_start">24dp</dimen>
|
||||
<dimen name="settingslib_switchbar_padding_left">24dp</dimen>
|
||||
|
||||
<!-- Size of layout margin right -->
|
||||
<dimen name="settingslib_switchbar_margin_end">16dp</dimen>
|
||||
<dimen name="settingslib_switchbar_padding_right">16dp</dimen>
|
||||
|
||||
<!-- Minimum width of switch -->
|
||||
<dimen name="settingslib_min_switch_width">52dp</dimen>
|
||||
|
||||
Reference in New Issue
Block a user