[SetupWizardLib] Limit header lines
In SetupWizardLayout, limit the number of lines and ellipsize if it is longer than that. The limit is 6 lines for tablet landscape and 3 for all others. Bug: 20267729 Change-Id: Ibc7f9f977ea576b7d23e46ce239056583c94d972
This commit is contained in:
parent
56a19113d2
commit
6f7c410394
26
library/main/res/values-land/styles.xml
Normal file
26
library/main/res/values-land/styles.xml
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2015 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
|
||||
<!-- Card layout (for tablets) -->
|
||||
|
||||
<style name="SuwCardTitle" parent="SuwBaseCardTitle">
|
||||
<item name="android:maxLines">6</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
|
@ -37,7 +37,9 @@
|
|||
|
||||
<!-- Card layout (for tablets) -->
|
||||
|
||||
<style name="SuwCardTitle">
|
||||
<style name="SuwBaseCardTitle">
|
||||
<item name="android:ellipsize">end</item>
|
||||
<item name="android:maxLines">3</item>
|
||||
<item name="android:paddingBottom">@dimen/suw_card_title_padding_bottom</item>
|
||||
<item name="android:paddingEnd" tools:ignore="NewApi">@dimen/suw_card_title_padding_end</item>
|
||||
<item name="android:paddingLeft">@dimen/suw_card_title_padding_start</item>
|
||||
|
@ -47,6 +49,8 @@
|
|||
<item name="android:textAppearance">@style/TextAppearance.SuwCardTitle</item>
|
||||
</style>
|
||||
|
||||
<style name="SuwCardTitle" parent="SuwBaseCardTitle" />
|
||||
|
||||
<!-- Header layout (for phones) -->
|
||||
|
||||
<style name="SuwHeaderTitle">
|
||||
|
@ -55,7 +59,9 @@
|
|||
<item name="android:layout_marginBottom">@dimen/suw_header_title_margin_bottom</item>
|
||||
<item name="android:layout_marginLeft">@dimen/suw_layout_margin_sides</item>
|
||||
<item name="android:layout_marginRight">@dimen/suw_layout_margin_sides</item>
|
||||
<item name="android:ellipsize">end</item>
|
||||
<item name="android:lineSpacingExtra">@dimen/suw_header_title_line_spacing_extra</item>
|
||||
<item name="android:maxLines">3</item>
|
||||
<item name="android:paddingBottom">@dimen/suw_header_title_padding_bottom</item>
|
||||
<item name="android:paddingTop">@dimen/suw_header_title_padding_top</item>
|
||||
<item name="android:textColor">@android:color/white</item>
|
||||
|
|
Loading…
Reference in a new issue