forked from upstream-mirrors/OpenTracks
Add landscape mode for track controller
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2013 Google Inc.
|
||||
|
||||
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.
|
||||
-->
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<LinearLayout
|
||||
android:background="@color/track_controller_background"
|
||||
android:id="@+id/track_controler_container"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp" >
|
||||
<View
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="match_parent" />
|
||||
<ImageButton
|
||||
android:background="@android:color/transparent"
|
||||
android:contentDescription="@string/icon_record_track"
|
||||
android:id="@+id/track_controller_record"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="10"
|
||||
android:layout_width="wrap_content" />
|
||||
<RelativeLayout
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="6"
|
||||
android:layout_width="match_parent" >
|
||||
<TextView
|
||||
android:id="@+id/track_controller_total_time"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:textColor="@android:color/white"
|
||||
style="@style/TextSmall" />
|
||||
<TextView
|
||||
android:id="@+id/track_controller_status"
|
||||
android:layout_above="@id/track_controller_total_time"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:singleLine="true"
|
||||
style="@style/TextMicro" />
|
||||
</RelativeLayout>
|
||||
<ImageButton
|
||||
android:background="@android:color/transparent"
|
||||
android:contentDescription="@string/icon_stop_recording"
|
||||
android:id="@+id/track_controller_stop"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="10"
|
||||
android:layout_width="match_parent"
|
||||
android:src="@drawable/btn_stop_1" />
|
||||
<View
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="match_parent" />
|
||||
</LinearLayout>
|
||||
</merge>
|
||||
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2013 Google Inc.
|
||||
|
||||
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.
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:baselineAligned="false"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="horizontal" >
|
||||
<include layout="@layout/track_controller" />
|
||||
<TabHost
|
||||
android:id="@android:id/tabhost"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp" >
|
||||
<include layout="@layout/track_details_tab" />
|
||||
</TabHost>
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2013 Google Inc.
|
||||
|
||||
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.
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="horizontal" >
|
||||
<include layout="@layout/track_controller" />
|
||||
<ListView
|
||||
android:id="@+id/track_list"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1.0"
|
||||
android:layout_width="0dp" />
|
||||
<TextView
|
||||
android:id="@+id/track_list_empty_view"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1.0"
|
||||
android:layout_width="0dp"
|
||||
android:text="@string/track_list_empty_message"
|
||||
android:visibility="gone"
|
||||
style="@style/ListEmptyTextView" >
|
||||
</TextView>
|
||||
</LinearLayout>
|
||||
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<LinearLayout
|
||||
android:background="@color/track_controller_background"
|
||||
android:id="@+id/track_controler_container"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="horizontal"
|
||||
|
||||
@@ -23,31 +23,7 @@ limitations under the License.
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="match_parent" >
|
||||
<LinearLayout
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="vertical" >
|
||||
<TabWidget
|
||||
android:id="@android:id/tabs"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="horizontal" />
|
||||
<FrameLayout
|
||||
android:id="@android:id/tabcontent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0"
|
||||
android:layout_width="0dp" />
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/pager"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="match_parent" />
|
||||
</LinearLayout>
|
||||
<include layout="@layout/track_details_tab" />
|
||||
</TabHost>
|
||||
<LinearLayout
|
||||
android:id="@+id/track_controler_container"
|
||||
style="@style/TrackControllerContainer" >
|
||||
<include layout="@layout/track_controller" />
|
||||
</LinearLayout>
|
||||
<include layout="@layout/track_controller" />
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2013 Google Inc.
|
||||
|
||||
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.
|
||||
-->
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<LinearLayout
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="vertical" >
|
||||
<TabWidget
|
||||
android:id="@android:id/tabs"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="horizontal" />
|
||||
<FrameLayout
|
||||
android:id="@android:id/tabcontent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0"
|
||||
android:layout_width="0dp" />
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/pager"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="match_parent" />
|
||||
</LinearLayout>
|
||||
</merge>
|
||||
@@ -32,9 +32,5 @@ limitations under the License.
|
||||
android:visibility="gone"
|
||||
style="@style/ListEmptyTextView" >
|
||||
</TextView>
|
||||
<LinearLayout
|
||||
android:id="@+id/track_controler_container"
|
||||
style="@style/TrackControllerContainer" >
|
||||
<include layout="@layout/track_controller" />
|
||||
</LinearLayout>
|
||||
<include layout="@layout/track_controller" />
|
||||
</LinearLayout>
|
||||
@@ -188,12 +188,6 @@ limitations under the License.
|
||||
</style>
|
||||
<!-- theme selector -->
|
||||
<style name="ThemeSelector" parent="android:Theme" />
|
||||
<!-- track controller container -->
|
||||
<style name="TrackControllerContainer">
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:orientation">vertical</item>
|
||||
</style>
|
||||
<!-- track widget bounding box -->
|
||||
<style name="TrackWidgetBoundingBox">
|
||||
<item name="android:background">@drawable/track_widget_background</item>
|
||||
|
||||
Reference in New Issue
Block a user