Implement about screen

This commit is contained in:
2016-03-06 08:33:03 -05:00
parent aaf2789a21
commit e0527dc8ff
10 changed files with 260 additions and 62 deletions

View File

@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/windowBackground"
android:fillViewport="true">
<LinearLayout
style="@style/cardsListStyle">
<LinearLayout
style="@style/cardStyle"
android:gravity="center">
<ImageView
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_margin="6dp"
android:src="@drawable/intro_icon_1"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:textStyle="bold"
android:textSize="16sp"
android:layout_margin="6dp"
android:textColor="@color/blue_700"
android:text="@string/app_name"/>
<TextView
android:id="@+id/tvVersion"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text=""/>
</LinearLayout>
<LinearLayout
style="@style/cardStyle"
android:gravity="center">
<TextView
style="@style/cardHeaderStyle"
android:text="@string/links"
android:textColor="@color/blue_700"/>
<TextView
android:id="@+id/tvRate"
style="@style/aboutClickableItemStyle"
android:text="@string/pref_rate_this_app"/>
<TextView
android:id="@+id/tvFeedback"
style="@style/aboutClickableItemStyle"
android:text="@string/pref_send_feedback"/>
<TextView
android:id="@+id/tvSource"
style="@style/aboutClickableItemStyle"
android:text="@string/pref_view_source_code"/>
</LinearLayout>
<LinearLayout
style="@style/cardStyle"
android:gravity="center">
<TextView
style="@style/cardHeaderStyle"
android:text="@string/developers"
android:textColor="@color/blue_700"/>
<TextView
style="@style/aboutItemStyle"
android:text="Álinson Xavier"/>
</LinearLayout>
<LinearLayout
style="@style/cardStyle"
android:gravity="center">
<TextView
style="@style/cardHeaderStyle"
android:text="@string/translators"
android:textColor="@color/blue_700"/>
<TextView
style="@style/aboutItemStyle"
android:text="Limin Lu (中文)"/>
<TextView
style="@style/aboutItemStyle"
android:text="Álinson Xavier (Português)"/>
</LinearLayout>
</LinearLayout>
</ScrollView>

View File

@@ -15,4 +15,10 @@
android:title="@string/action_settings"
app:showAsAction="never"/>
<item
android:id="@+id/action_about"
android:orderInCategory="100"
android:title="@string/about"
app:showAsAction="never"/>
</menu>

View File

@@ -19,7 +19,7 @@
-->
<resources>
<string name="app_name">Hábitos</string>
<string name="app_name">Loop Habit Tracker</string>
<string name="action_settings">Configurações</string>
<string name="add_habit">Adicionar hábito</string>
<string name="archive">Arquivar</string>
@@ -102,4 +102,8 @@
<string name="any_day">Qualquer dia</string>
<string name="select_weekdays">Selecionar dias</string>
<string name="export_to_csv">Exportar dados</string>
<string name="about">Sobre</string>
<string name="developers">Desenvolvedores</string>
<string name="translators">Tradutores</string>
<string name="version">Versão</string>
</resources>

View File

@@ -259,7 +259,7 @@
<!--<color name="blue_400">#42A5F5</color>-->
<!--<color name="blue_500">#2196F3</color>-->
<!--<color name="blue_600">#1E88E5</color>-->
<!--<color name="blue_700">#1976D2</color>-->
<color name="blue_700">#1976D2</color>
<!--<color name="blue_800">#1565C0</color>-->
<!--<color name="blue_900">#0D47A1</color>-->
<!--<color name="blue_A100">#82B1FF</color>-->

View File

@@ -21,8 +21,8 @@
<string name="toast_habit_archived">Habits archived.</string>
<string name="toast_habit_unarchived">Habits unarchived.</string>
<string name="color_swatch_description" translatable="false">Color <xliff:g id="color_index" example="14">%1$d</xliff:g></string>
<string name="color_swatch_description_selected" translatable="false">Color <xliff:g id="color_index" example="14">%1$d</xliff:g> selected</string>
<string name="color_swatch_description" translatable="false">Color <xliff:g example="14" id="color_index">%1$d</xliff:g></string>
<string name="color_swatch_description_selected" translatable="false">Color <xliff:g example="14" id="color_index">%1$d</xliff:g> selected</string>
<!-- Date and time picker -->
<string name="done_label">Done</string>
@@ -35,8 +35,8 @@
<string name="year_picker_description" translatable="false">Year list</string>
<string name="select_day">Select month and day</string>
<string name="select_year">Select year</string>
<string name="item_is_selected" translatable="false"><xliff:g id="item" example="2013">%1$s</xliff:g> selected</string>
<string name="deleted_key" translatable="false"><xliff:g id="key" example="4">%1$s</xliff:g> deleted</string>
<string name="item_is_selected" translatable="false"><xliff:g example="2013" id="item">%1$s</xliff:g> selected</string>
<string name="deleted_key" translatable="false"><xliff:g example="4" id="key">%1$s</xliff:g> deleted</string>
<string name="time_placeholder" translatable="false">--</string>
<string name="time_separator" translatable="false">:</string>
<string name="radial_numbers_typeface" translatable="false">sans-serif</string>
@@ -116,4 +116,9 @@
<item>@string/hint_landscape</item>
</string-array>
<string name="about">About</string>
<string name="translators">Translators</string>
<string name="developers">Developers</string>
<string name="version">Version</string>
</resources>

View File

@@ -61,4 +61,18 @@
<item name="android:layout_height">wrap_content</item>
</style>
<style name="aboutItemStyle">
<item name="android:textSize">16sp</item>
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:paddingTop">6dp</item>
<item name="android:paddingBottom">6dp</item>
</style>
<style name="aboutClickableItemStyle" parent="aboutItemStyle">
<item name="android:paddingBottom">12dp</item>
<item name="android:paddingTop">12dp</item>
<item name="android:background">@drawable/ripple_transparent</item>
</style>
</resources>

View File

@@ -21,36 +21,11 @@
</PreferenceCategory>
<PreferenceCategory
android:key="pref_key_links"
android:title="@string/links">
<Preference android:title="@string/pref_rate_this_app">
<intent
android:action="android.intent.action.VIEW"
android:data="market://details?id=org.isoron.uhabits"/>
</Preference>
<Preference android:title="@string/pref_send_feedback">
<intent
android:action="android.intent.action.SENDTO"
android:data="mailto:isoron+habits@gmail.com?subject=Feedback%20about%20Loop%20Habit%20Tracker"/>
</Preference>
<Preference android:title="@string/pref_view_source_code">
<intent
android:action="android.intent.action.VIEW"
android:data="https://github.com/iSoron/uhabits"/>
</Preference>
<Preference android:title="@string/pref_view_app_introduction">
<intent
android:targetClass="org.isoron.uhabits.IntroActivity"
android:targetPackage="org.isoron.uhabits"/>
</Preference>
</PreferenceCategory>
<Preference android:title="@string/about">
<intent
android:action="android.intent.action.VIEW"
android:targetClass="org.isoron.uhabits.AboutActivity"
android:targetPackage="org.isoron.uhabits"/>
</Preference>
</PreferenceScreen>