forked from upstream-mirrors/OpenTracks
Add DialogWhenLarge Theme.
This commit is contained in:
@@ -140,7 +140,7 @@ limitations under the License.
|
||||
android:hardwareAccelerated="true"
|
||||
android:icon="@drawable/my_tracks_icon"
|
||||
android:label="@string/my_tracks_app_name"
|
||||
android:theme="@style/ThemeSelector" >
|
||||
android:theme="@style/MyTracksTheme" >
|
||||
<!-- For data backup -->
|
||||
<meta-data
|
||||
android:name="com.google.android.backup.api_key"
|
||||
@@ -169,7 +169,9 @@ limitations under the License.
|
||||
<data android:scheme="file" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name="com.google.android.apps.mytracks.MarkerEditActivity" />
|
||||
<activity
|
||||
android:name="com.google.android.apps.mytracks.MarkerEditActivity"
|
||||
android:theme="@style/MyTracksDialogWhenLargeTheme" />
|
||||
<activity android:name="com.google.android.apps.mytracks.MarkerDetailActivity" />
|
||||
<activity android:name="com.google.android.apps.mytracks.MarkerListActivity" >
|
||||
<meta-data
|
||||
@@ -196,7 +198,9 @@ limitations under the License.
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value="com.google.android.apps.mytracks.TrackListActivity" />
|
||||
</activity>
|
||||
<activity android:name="com.google.android.apps.mytracks.TrackEditActivity" />
|
||||
<activity
|
||||
android:name="com.google.android.apps.mytracks.TrackEditActivity"
|
||||
android:theme="@style/MyTracksDialogWhenLargeTheme" />
|
||||
<activity android:name="com.google.android.apps.mytracks.TrackListActivity" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
@@ -226,7 +230,8 @@ limitations under the License.
|
||||
<activity android:name="com.google.android.apps.mytracks.settings.StatsSettingsActivity" />
|
||||
<activity
|
||||
android:label="@string/track_widget_config_title"
|
||||
android:name="com.google.android.apps.mytracks.widgets.TrackWidgetConfigActivity" >
|
||||
android:name="com.google.android.apps.mytracks.widgets.TrackWidgetConfigActivity"
|
||||
android:theme="@style/MyTracksDialogWhenLargeTheme" >
|
||||
<intent-filter>
|
||||
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
|
||||
</intent-filter>
|
||||
|
||||
@@ -46,7 +46,11 @@ limitations under the License.
|
||||
<style name="ListItem">
|
||||
<item name="android:background">?android:attr/activatedBackgroundIndicator</item>
|
||||
</style>
|
||||
<style name="ThemeSelector" parent="android:Theme.Holo">
|
||||
<style name="MyTracksDialogWhenLargeTheme" parent="android:Theme.Holo.DialogWhenLarge">
|
||||
<item name="android:actionBarStyle">@style/ActionBarStyle.MyTracks</item>
|
||||
<item name="android:actionModeBackground">@drawable/action_mode_background_mytracks</item>
|
||||
</style>
|
||||
<style name="MyTracksTheme" parent="android:Theme.Holo">
|
||||
<item name="android:actionBarStyle">@style/ActionBarStyle.MyTracks</item>
|
||||
<item name="android:actionModeBackground">@drawable/action_mode_background_mytracks</item>
|
||||
</style>
|
||||
|
||||
@@ -35,6 +35,10 @@ limitations under the License.
|
||||
<item name="android:measureWithLargestChild">true</item>
|
||||
<item name="android:orientation">horizontal</item>
|
||||
</style>
|
||||
<style name="MyTracksDialogWhenLargeTheme" parent="android:Theme.DeviceDefault.DialogWhenLarge">
|
||||
<item name="android:actionBarStyle">@style/ActionBarStyle.MyTracks</item>
|
||||
<item name="android:actionModeBackground">@drawable/action_mode_background_mytracks</item>
|
||||
</style>
|
||||
<style name="StatsSmallLabel" parent="@style/TextSmall">
|
||||
<!-- same as StatsSmallLabel in values/styles.xml except adding textAllCaps -->
|
||||
<item name="android:gravity">right</item>
|
||||
|
||||
@@ -110,6 +110,10 @@ limitations under the License.
|
||||
<item name="android:paddingLeft">8dp</item>
|
||||
<item name="android:singleLine">true</item>
|
||||
</style>
|
||||
<!-- My Tracks Dialog When Large Theme -->
|
||||
<style name="MyTracksDialogWhenLargeTheme" parent="android:Theme" />
|
||||
<!-- My Tracks Theme -->
|
||||
<style name="MyTracksTheme" parent="android:Theme" />
|
||||
<!-- scroll view -->
|
||||
<style name="ScrollView">
|
||||
<item name="android:layout_height">match_parent</item>
|
||||
@@ -243,8 +247,6 @@ limitations under the License.
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:textSize">14sp</item>
|
||||
</style>
|
||||
<!-- theme selector -->
|
||||
<style name="ThemeSelector" parent="android:Theme" />
|
||||
<!-- track widget bounding box -->
|
||||
<style name="TrackWidgetBoundingBox">
|
||||
<item name="android:background">@drawable/track_widget_background</item>
|
||||
|
||||
@@ -21,6 +21,7 @@ import com.google.android.apps.mytracks.TrackController;
|
||||
import com.google.android.maps.mytracks.R;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.ActionBar;
|
||||
import android.app.Activity;
|
||||
import android.app.SearchManager;
|
||||
import android.content.Context;
|
||||
@@ -58,7 +59,10 @@ public class Api11Adapter extends Api10Adapter {
|
||||
|
||||
@Override
|
||||
public void configureActionBarHomeAsUp(Activity activity) {
|
||||
activity.getActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
ActionBar actionBar = activity.getActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -35,8 +35,10 @@ public class Api14Adapter extends Api11Adapter {
|
||||
@Override
|
||||
public void configureActionBarHomeAsUp(Activity activity) {
|
||||
ActionBar actionBar = activity.getActionBar();
|
||||
actionBar.setHomeButtonEnabled(true);
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
if (actionBar != null) {
|
||||
actionBar.setHomeButtonEnabled(true);
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user