add 4 layout sizes for the app widget

This commit is contained in:
Jimmy Shih
2012-10-08 13:05:15 -07:00
parent 1983b63ce8
commit dfab60c2eb
8 changed files with 680 additions and 226 deletions
+169 -80
View File
@@ -15,44 +15,44 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The style for the about value -->
<!-- about value -->
<style name="AboutValue" parent="@style/TextMedium">
<item name="android:paddingLeft">48dp</item>
</style>
<!-- The style for the bottom button -->
<!-- bottom button -->
<style name="BottomButton" parent="@android:style/Widget.DeviceDefault.Button.Borderless">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_weight">1</item>
<item name="android:layout_width">0dp</item>
<item name="android:maxLines">2</item>
</style>
<!-- The style for the bottom button bar -->
<!-- bottom button bar -->
<style name="BottomButtonBar" parent="@android:style/DeviceDefault.ButtonBar">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:orientation">horizontal</item>
<item name="android:measureWithLargestChild">true</item>
</style>
<!-- The style for choose upload service check box -->
<!-- choose upload service checkbox -->
<style name="ChooseUploadServiceCheckBox" parent="@style/TextMedium">
<item name="android:layout_gravity">center_vertical</item>
<item name="android:layout_marginLeft">8dp</item>
<item name="android:layout_width">0dp</item>
<item name="android:maxLines">5</item>
</style>
<!-- The style for choose upload service image view -->
<!-- choose upload service image view -->
<style name="ChooseUploadServiceImageView">
<item name="android:layout_gravity">center</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
</style>
<!-- The style for the editing category -->
<!-- edit category -->
<style name="EditCategory" parent="@style/TextMedium">
<item name="android:layout_width">fill_parent</item>
<item name="android:selectAllOnFocus">true</item>
<item name="android:singleLine">true</item>
</style>
<!-- The style for the edit description -->
<!-- edit description -->
<style name="EditDescription" parent="@style/TextMedium">
<item name="android:inputType">textAutoCorrect|textCapSentences|textMultiLine</item>
<item name="android:layout_width">fill_parent</item>
@@ -60,81 +60,69 @@ limitations under the License.
<item name="android:selectAllOnFocus">true</item>
<item name="android:singleLine">false</item>
</style>
<!-- The style for the edit label -->
<!-- edit label -->
<style name="EditLabel" parent="@style/TextMedium">
<item name="android:layout_width">fill_parent</item>
</style>
<!-- The style for the edit label with icon -->
<!-- edit label with icon -->
<style name="EditLabel.WithIcon" parent="@style/TextMedium.WithIcon">
<item name="android:layout_width">fill_parent</item>
</style>
<!-- The style for the edit label with icon and with padding top -->
<!-- edit label with icon, width padding top -->
<style name="EditLabel.WithIcon.WithPaddingTop">
<item name="android:paddingTop">16dp</item>
</style>
<!-- The style for the edit lable with padding top -->
<!-- edit label with padding top -->
<style name="EditLabel.WithPaddingTop">
<item name="android:paddingTop">16dp</item>
</style>
<!-- The style for editing marker name -->
<!-- edit name marker -->
<style name="EditNameMarker" parent="@style/TextMedium.WithIcon">
<item name="android:inputType">textAutoCorrect|textCapWords</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:selectAllOnFocus">true</item>
<item name="android:singleLine">true</item>
</style>
<!-- The style for editing track name -->
<!-- edit name track -->
<style name="EditNameTrack" parent="@style/TextMedium">
<item name="android:inputType">textAutoCorrect|textCapWords</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:selectAllOnFocus">true</item>
<item name="android:singleLine">true</item>
</style>
<!-- The style for the help answer -->
<!-- help answer -->
<style name="HelpAnswer" parent="@style/TextSmall">
<item name="android:autoLink">web</item>
<item name="android:paddingBottom">8dp</item>
</style>
<!-- The style for help question -->
<!-- help question -->
<style name="HelpQuestion" parent="@style/TextMedium">
<item name="android:paddingTop">8dp</item>
<item name="android:textStyle">bold</item>
</style>
<!-- The style for the list empty text view -->
<!-- list empty text view -->
<style name="ListEmptyTextView" parent="@style/TextLarge">
<item name="android:gravity">center</item>
<item name="android:layout_gravity">center</item>
<item name="android:padding">8dp</item>
</style>
<!-- style for the list item stats -->
<!-- list item stats -->
<style name="ListItemStats" parent="@style/TextSmall">
<item name="android:singleLine">true</item>
<item name="android:textColor">@android:color/secondary_text_dark</item>
</style>
<!-- The style for a horizontal linear layout -->
<style name="LinearLayoutHorizontal">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:orientation">horizontal</item>
</style>
<!-- The style for a vertical linear layout -->
<style name="LinearLayoutVertifcal">
<item name="android:layout_height">fill_parent</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:orientation">vertical</item>
</style>
<!-- The style for the scroll view -->
<!-- scroll view -->
<style name="ScrollView">
<item name="android:layout_height">fill_parent</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:scrollbarStyle">outsideInset</item>
</style>
<!-- The style for the scroll view with bottom buttons -->
<!-- scroll view with bottom buttons -->
<style name="ScrollView.WithBottomButtons">
<item name="android:layout_height">0dp</item>
<item name="android:layout_weight">1</item>
</style>
<!-- The style for the sensor state value -->
<!-- sensor state value -->
<style name="SensorStateValue" parent="@style/TextLarge">
<item name="android:background">@android:color/background_light</item>
<item name="android:gravity">right</item>
@@ -142,17 +130,17 @@ limitations under the License.
<item name="android:paddingRight">8dp</item>
<item name="android:textColor">@android:color/primary_text_light</item>
</style>
<!-- The style for the stats label -->
<!-- stats label -->
<style name="StatsLabel" parent="@style/TextMedium">
<item name="android:layout_weight">1</item>
<item name="android:layout_width">0dp</item>
</style>
<!-- The style for the stats spacer -->
<!-- stats spacer -->
<style name="StatsSpacer">
<item name="android:layout_height">fill_parent</item>
<item name="android:layout_width">8dp</item>
</style>
<!-- The style for the stats value -->
<!-- stats value -->
<style name="StatsValue" parent="@style/TextLarge">
<item name="android:background">@android:color/background_light</item>
<item name="android:gravity">right</item>
@@ -161,84 +149,131 @@ limitations under the License.
<item name="android:paddingRight">8dp</item>
<item name="android:textColor">@android:color/primary_text_light</item>
</style>
<!-- The style for choose activity text -->
<!-- text choose activity -->
<style name="TextChooseActivity">
<item name="android:textSize">18sp</item>
</style>
<!-- The style for large size text -->
<!-- text large -->
<style name="TextLarge">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:textSize">22sp</item>
</style>
<!-- The style for large size text with top margin -->
<!-- text large with top margin -->
<style name="TextLarge.WithTopMargin">
<item name="android:layout_marginTop">8dp</item>
</style>
<!-- The style for medium size text -->
<!-- text medium -->
<style name="TextMedium">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:textSize">18sp</item>
</style>
<!-- The style for medium size text with an icon on the left -->
<!-- text medium with icon -->
<style name="TextMedium.WithIcon">
<item name="android:drawablePadding">8dp</item>
<item name="android:gravity">center_vertical</item>
</style>
<!-- The style for small size text -->
<style name="TextSmall">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:textSize">14sp</item>
</style>
<!-- The style for micro size text -->
<!-- text micro -->
<style name="TextMicro">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:textSize">12sp</item>
</style>
<!-- Theme selector -->
<!-- text small -->
<style name="TextSmall">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:textSize">14sp</item>
</style>
<!-- theme selector -->
<style name="ThemeSelector" parent="android:Theme" />
<!-- The style for the track controller container -->
<!-- track controller container -->
<style name="TrackControllerContainer">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:orientation">vertical</item>
</style>
<!-- The style for the track widget button -->
<!-- track widget bounding box -->
<style name="TrackWidgetBoundingBox">
<item name="android:background">@drawable/track_widget_background</item>
<item name="android:layout_height">fill_parent</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:padding">@dimen/widget_margin</item>
</style>
<!-- track widget button -->
<style name="TrackWidgetButton">
<item name="android:background">@android:color/transparent</item>
<item name="android:layout_gravity">center_vertical</item>
<item name="android:scaleType">fitXY</item>
</style>
<!-- The style for the track widget config row -->
<!-- track widget button container -->
<style name="TrackWidgetButtonContainer">
<item name="android:gravity">center_vertical</item>
<item name="android:layout_height">0dp</item>
<item name="android:layout_weight">1</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:orientation">horizontal</item>
<item name="android:paddingBottom">4dp</item>
<item name="android:paddingTop">4dp</item>
</style>
<!-- track widget button record -->
<style name="TrackWidgetButtonRecord" parent="@style/TrackWidgetButton">
<item name="android:layout_height">63dp</item>
<item name="android:layout_width">75dp</item>
<item name="android:src">@drawable/btn_record</item>
</style>
<!-- track widget button stop -->
<style name="TrackWidgetButtonStop" parent="@style/TrackWidgetButton">
<item name="android:layout_height">63dp</item>
<item name="android:layout_width">63dp</item>
<item name="android:src">@drawable/btn_stop_0</item>
</style>
<!-- track widget config row -->
<style name="TrackWidgetConfigRow">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:paddingTop">16dp</item>
<item name="android:paddingBottom">16dp</item>
<item name="android:paddingTop">16dp</item>
</style>
<!-- The style for the track widget config spacer -->
<!-- track widget config spacer -->
<style name="TrackWidgetConfigSpacer">
<item name="android:layout_height">fill_parent</item>
<item name="android:layout_weight">2</item>
<item name="android:layout_width">0dp</item>
</style>
<!-- The style for the track widget config spiner -->
<!-- track widget config spiner -->
<style name="TrackWidgetConfigSpinner">
<item name="android:gravity">left</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_weight">9</item>
<item name="android:layout_width">0dp</item>
</style>
<!-- The style for the track widget horizontal separator -->
<style name="TrackWidgetHorizontalSeparator">
<!-- Track widget frame -->
<style name="TrackWidgetFrame">
<item name="android:layout_alignParentTop">true</item>
<item name="android:layout_height">fill_parent</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:orientation">vertical</item>
</style>
<!-- track widget horizontal line -->
<style name="TrackWidgetHorizontalLine">
<item name="android:background">@color/track_widget_line</item>
<item name="android:layout_height">1dp</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_width">0dp</item>
</style>
<!-- The style for the track widget item container -->
<!-- track widget horizontal spacer -->
<style name="TrackWidgetHorizontalSpacer">
<item name="android:layout_height">1dp</item>
<item name="android:layout_width">0dp</item>
</style>
<!-- track widget horizontal separator -->
<style name="TrackWidgetHorizontalSeparator">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:orientation">horizontal</item>
</style>
<!-- track widget item container -->
<style name="TrackWidgetItemContainer">
<item name="android:layout_gravity">center_horizontal</item>
<item name="android:layout_height">wrap_content</item>
@@ -248,7 +283,22 @@ limitations under the License.
<item name="android:paddingBottom">2dp</item>
<item name="android:paddingTop">2dp</item>
</style>
<!-- The style for the track widget label -->
<!-- track widget item container 4x2 -->
<style name="TrackWidgetItemContainer4x2" parent="@style/TrackWidgetItemContainer">
<item name="android:paddingBottom">4dp</item>
<item name="android:paddingTop">4dp</item>
</style>
<!-- track widget item container 4x3 -->
<style name="TrackWidgetItemContainer4x3" parent="@style/TrackWidgetItemContainer">
<item name="android:paddingBottom">6dp</item>
<item name="android:paddingTop">12dp</item>
</style>
<!-- track widget item container 4x4 -->
<style name="TrackWidgetItemContainer4x4" parent="@style/TrackWidgetItemContainer">
<item name="android:paddingBottom">12dp</item>
<item name="android:paddingTop">12dp</item>
</style>
<!-- track widget label -->
<style name="TrackWidgetLabel">
<item name="android:layout_gravity">center_horizontal</item>
<item name="android:layout_height">wrap_content</item>
@@ -259,8 +309,16 @@ limitations under the License.
<item name="android:textSize">10dp</item>
<item name="android:textStyle">bold</item>
</style>
<!-- track widget label 4x3 -->
<style name="TrackWidgetLabel4x3" parent="@style/TrackWidgetLabel">
<item name="android:textSize">14dp</item>
</style>
<!-- track widget label 4x4 -->
<style name="TrackWidgetLabel4x4" parent="@style/TrackWidgetLabel">
<item name="android:textSize">18dp</item>
</style>
<!-- track widget logo -->
<style name="TrackWidgetLogo">
<item name="android:contentDescription">@string/my_tracks_app_name</item>
<item name="android:layout_alignParentRight">true</item>
<item name="android:layout_alignParentTop">true</item>
<item name="android:layout_height">24dp</item>
@@ -269,21 +327,28 @@ limitations under the License.
<item name="android:scaleType">fitXY</item>
<item name="android:src">@drawable/my_tracks_icon</item>
</style>
<!-- The style for the track widget record button -->
<style name="TrackWidgetRecordButton" parent="@style/TrackWidgetButton">
<item name="android:contentDescription">@string/icon_record_track</item>
<item name="android:layout_height">63dp</item>
<item name="android:layout_width">75dp</item>
<item name="android:src">@drawable/btn_record</item>
<!-- track widget logo 4x4 -->
<style name="TrackWidgetLogo4x4" parent="@style/TrackWidgetLogo">
<item name="android:layout_height">30dp</item>
<item name="android:layout_width">30dp</item>
</style>
<!-- The style for the track widget stop button -->
<style name="TrackWidgetStopButton" parent="@style/TrackWidgetButton">
<item name="android:contentDescription">@string/icon_stop_recording</item>
<item name="android:layout_height">63dp</item>
<item name="android:layout_width">63dp</item>
<item name="android:src">@drawable/btn_stop_0</item>
<!-- track widget stats container -->
<style name="TrackWidgetStatsContainer">
<item name="android:clickable">true</item>
<item name="android:layout_height">0dp</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:orientation">vertical</item>
<item name="android:padding">4dp</item>
</style>
<!-- The style for the track widget unit -->
<!-- track widget stats section -->
<style name="TrackWidgetStatsSection">
<item name="android:gravity">center_vertical</item>
<item name="android:layout_height">0dp</item>
<item name="android:layout_weight">1</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:orientation">horizontal</item>
</style>
<!-- track widget unit -->
<style name="TrackWidgetUnit">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_weight">1</item>
@@ -292,7 +357,15 @@ limitations under the License.
<item name="android:singleLine">true</item>
<item name="android:textSize">10dp</item>
</style>
<!-- The style for the track widget value -->
<!-- track widget unit 4x3 -->
<style name="TrackWidgetUnit4x3" parent="@style/TrackWidgetUnit">
<item name="android:textSize">14dp</item>
</style>
<!-- track widget unit 4x4 -->
<style name="TrackWidgetUnit4x4" parent="@style/TrackWidgetUnit">
<item name="android:textSize">18dp</item>
</style>
<!-- track widget value -->
<style name="TrackWidgetValue" parent="@style/TextMedium">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_weight">2</item>
@@ -301,7 +374,15 @@ limitations under the License.
<item name="android:textColor">@android:color/white</item>
<item name="android:textStyle">bold</item>
</style>
<!-- The style for the track widget value container -->
<!-- track widget value 4x3 -->
<style name="TrackWidgetValue4x3" parent="@style/TrackWidgetValue">
<item name="android:textSize">28sp</item>
</style>
<!-- track widget value 4x4 -->
<style name="TrackWidgetValue4x4" parent="@style/TrackWidgetValue">
<item name="android:textSize">36sp</item>
</style>
<!-- track widget value container -->
<style name="TrackWidgetValueContainer">
<item name="android:layout_gravity">center_horizontal</item>
<item name="android:layout_height">wrap_content</item>
@@ -309,17 +390,25 @@ limitations under the License.
<item name="android:layout_width">wrap_content</item>
<item name="android:orientation">horizontal</item>
</style>
<!-- The style for the track widget vertical separator -->
<style name="TrackWidgetVerticalSeparator">
<!-- track widget value container 4x3 -->
<style name="TrackWidgetValueContainer4x3" parent="@style/TrackWidgetValueContainer">
<item name="android:layout_marginTop">0dp</item>
</style>
<!-- track widget vertical line -->
<style name="TrackWidgetVerticalLine">
<item name="android:background">@color/track_widget_line</item>
<item name="android:layout_height">0dp</item>
<item name="android:layout_weight">1</item>
<item name="android:layout_width">1dp</item>
</style>
<!-- The style for the track widget vertical spacer -->
<!-- track widget vertical spacer -->
<style name="TrackWidgetVerticalSpacer">
<item name="android:layout_height">0dp</item>
<item name="android:layout_weight">2</item>
<item name="android:layout_width">1dp</item>
</style>
<!-- track widget vertical separator -->
<style name="TrackWidgetVerticalSeparator">
<item name="android:layout_height">fill_parent</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:orientation">vertical</item>
</style>
</resources>