Change the about page layout to single column to

support long translated strings in different languages.
This commit is contained in:
Jimmy Shih
2011-12-20 14:10:36 -08:00
parent 3833a9f7fe
commit 912075ddd4
2 changed files with 103 additions and 99 deletions
+82 -78
View File
@@ -17,87 +17,91 @@ limitations under the License.
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="wrap_content"
android:layout_width="wrap_content">
<TableLayout
android:layout_width="fill_parent">
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:padding="2dp"
android:shrinkColumns="0"
android:stretchColumns="1">
<TableRow style="@style/AboutTableRow">
<ImageView
android:layout_column="0"
android:scaleType="center"
android:src="@drawable/arrow_icon"/>
<LinearLayout
android:layout_column="1"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="fill_parent"
android:orientation="vertical"
android:padding="10dp">
<!-- Title -->
<TableLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:padding="2dp"
android:shrinkColumns="0"
android:stretchColumns="1">
<TableRow>
<ImageView
android:layout_column="0"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/my_tracks_app_name"
android:textSize="30sp" />
<TextView
android:scaleType="center"
android:src="@drawable/arrow_icon"/>
<LinearLayout
android:layout_column="1"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/about_copyright_notice"
android:textSize="15sp" />
</LinearLayout>
</TableRow>
<TableRow style="@style/AboutTableRow">
<TextView
android:text="@string/about_team"
style="@style/AboutTextView.Column0"/>
<LinearLayout
android:layout_column="1"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:orientation="vertical">
<TextView
android:text="@string/about_bart"
style="@style/AboutTextView"/>
<TextView
android:text="@string/about_dylan"
style="@style/AboutTextView"/>
<TextView
android:text="@string/about_jimmy"
style="@style/AboutTextView"/>
<TextView
android:text="@string/about_leif"
style="@style/AboutTextView"/>
<TextView
android:text="@string/about_rodrigo"
style="@style/AboutTextView"/>
<TextView
android:text="@string/about_sandor"
style="@style/AboutTextView"/>
</LinearLayout>
</TableRow>
<TableRow style="@style/AboutTableRow">
<TextView
android:text="@string/about_version"
style="@style/AboutTextView.Column0"/>
<TextView
android:id="@+id/about_version"
style="@style/AboutTextView"/>
</TableRow>
<TableRow style="@style/AboutTableRow">
<TextView
android:text="@string/about_support"
style="@style/AboutTextView.Column0"/>
<TextView
android:text="@string/my_tracks_web_url"
style="@style/AboutTextView.Url"/>
</TableRow>
<TableRow style="@style/AboutTableRow">
<TextView
android:text="@string/about_privacy"
style="@style/AboutTextView.Column0"/>
<TextView
android:text="@string/my_tracks_privacy_url"
style="@style/AboutTextView.Url"/>
</TableRow>
</TableLayout>
android:orientation="vertical">
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/my_tracks_app_name"
android:textSize="30sp"/>
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/about_copyright_notice"
android:textSize="15sp"/>
</LinearLayout>
</TableRow>
</TableLayout>
<!-- Team -->
<TextView
android:text="@string/about_team"
style="@style/AboutLabel"/>
<TextView
android:text="@string/about_bart"
style="@style/AboutItem"/>
<TextView
android:text="@string/about_dylan"
style="@style/AboutItem"/>
<TextView
android:text="@string/about_jimmy"
style="@style/AboutItem"/>
<TextView
android:text="@string/about_leif"
style="@style/AboutItem"/>
<TextView
android:text="@string/about_rodrigo"
style="@style/AboutItem"/>
<TextView
android:text="@string/about_sandor"
style="@style/AboutItem"/>
<!-- Version -->
<TextView
android:text="@string/about_version"
style="@style/AboutLabel"/>
<TextView
android:id="@+id/about_version"
style="@style/AboutItem"/>
<!-- Support -->
<TextView
android:text="@string/about_support"
style="@style/AboutLabel"/>
<TextView
android:text="@string/my_tracks_web_url"
style="@style/AboutUrl"/>
<!-- Privacy -->
<TextView
android:text="@string/about_privacy"
style="@style/AboutLabel"/>
<TextView
android:text="@string/my_tracks_privacy_url"
style="@style/AboutUrl"/>
</LinearLayout>
</ScrollView>
+21 -21
View File
@@ -15,33 +15,33 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<!-- About dialog TableRow -->
<style name="AboutTableRow">
<item name="android:paddingBottom">2dp</item>
</style>
<!-- About dialog TextView -->
<style name="AboutTextView">
<!-- About page label -->
<style name="AboutLabel">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:textSize">20sp</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:paddingBottom">2dp</item>
<item name="android:textSize">20sp</item>
</style>
<!-- About dialog TextView column 0 -->
<style name="AboutTextView.Column0">
<item name="android:gravity">right</item>
<item name="android:layout_column">0</item>
<item name="android:paddingLeft">10dp</item>
<item name="android:paddingRight">10dp</item>
<!-- About page item -->
<style name="AboutItem">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:paddingBottom">2dp</item>
<item name="android:paddingLeft">20dp</item>
<item name="android:textSize">18sp</item>
</style>
<!-- About dialog TextView Url -->
<style name="AboutTextView.Url">
<!-- About page url -->
<style name="AboutUrl">
<item name="android:autoLink">web</item>
<item name="android:textSize">18sp</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:paddingBottom">2dp</item>
<item name="android:paddingLeft">20dp</item>
<item name="android:textSize">18sp</item>
</style>
<!-- Button -->
<style name="Button">
<item name="android:layout_height">fill_parent</item>