1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2025-12-11 14:51:11 +01:00

Reworked AboutFragment

Reworked licenseFragment

removed unused old layout

Fixed lint issues

Fixed margin

use onClick and fix string indent
This commit is contained in:
vanitasvitae 2016-11-08 13:07:38 +01:00
parent bea35292f8
commit f2ed7069a6
15 changed files with 548 additions and 241 deletions

View file

@ -1,10 +1,11 @@
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
tools:context="com.github.dfa.diaspora_android.activity.AboutActivity$AboutFragment">
<LinearLayout
@ -12,34 +13,223 @@
android:layout_height="match_parent"
android:orientation="vertical">
<!--Vertical padding-->
<android.support.v4.widget.Space
android:layout_width="match_parent"
android:layout_height="@dimen/activity_vertical_margin" />
<TextView
android:id="@+id/fragment_about__app_name"
style="@android:style/TextAppearance.DeviceDefault.Large"
<!-- About -->
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/diaspora_for_android"
android:textAlignment="center" />
android:layout_marginTop="16dp"
android:layout_marginBottom="8dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
style="?android:attr/buttonBarStyle"
card_view:cardElevation="5dp"
card_view:cardCornerRadius="5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="8dp"
android:layout_marginStart="@dimen/activity_horizontal_margin_half"
android:layout_marginEnd="@dimen/activity_horizontal_margin_half">
<TextView
android:id="@+id/fragment_about__app_version"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
style="@android:style/TextAppearance.DeviceDefault.Large"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/fragment_about__about"/>
<android.support.v4.widget.Space
android:layout_width="match_parent"
android:layout_height="16dp" />
<TextView
android:id="@+id/fragment_about__app_version"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/fragment_debug__app_version"/>
<com.github.dfa.diaspora_android.ui.HtmlTextView
android:id="@+id/fragment_about__about_text"
style="@android:style/TextAppearance.DeviceDefault.Small"
<TextView
android:id="@+id/fragment_about__app_codename"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/fragment_debug__app_codename"
android:layout_marginBottom="8dp"/>
<TextView
android:textAppearance="@style/TextAppearance.AppCompat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/fragment_about__about_text"
android:layout_marginBottom="16dp"/>
</LinearLayout>
</android.support.v7.widget.CardView>
<!-- Contribute Code -->
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:linksClickable="true"
android:text="@string/fragment_about__about_content" />
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
style="?android:attr/buttonBarStyle"
card_view:cardElevation="5dp"
card_view:cardCornerRadius="5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="8dp"
android:layout_marginStart="@dimen/activity_horizontal_margin_half"
android:layout_marginEnd="@dimen/activity_horizontal_margin_half">
<TextView
style="@android:style/TextAppearance.DeviceDefault.Large"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/fragment_about__contribute"
android:layout_marginBottom="8dp"/>
<TextView
android:textAppearance="@style/TextAppearance.AppCompat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/fragment_about__contribute_text"/>
<Button
android:id="@+id/fragment_about__contribute_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
style="?android:attr/buttonBarButtonStyle"
android:text="@string/fragment_about__contribute_button"/>
</LinearLayout>
</android.support.v7.widget.CardView>
<!-- Translate -->
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
style="?android:attr/buttonBarStyle"
card_view:cardElevation="5dp"
card_view:cardCornerRadius="5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="8dp"
android:layout_marginStart="@dimen/activity_horizontal_margin_half"
android:layout_marginEnd="@dimen/activity_horizontal_margin_half">
<TextView
style="@android:style/TextAppearance.DeviceDefault.Large"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/fragment_about__translate"
android:layout_marginBottom="8dp"/>
<TextView
android:textAppearance="@style/TextAppearance.AppCompat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/fragment_about__translate_text"/>
<Button
android:id="@+id/fragment_about__translate_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
style="?android:attr/buttonBarButtonStyle"
android:text="@string/fragment_about__translate_button"/>
</LinearLayout>
</android.support.v7.widget.CardView>
<!-- Give Feedback -->
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
style="?android:attr/buttonBarStyle"
card_view:cardElevation="5dp"
card_view:cardCornerRadius="5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="8dp"
android:layout_marginStart="@dimen/activity_horizontal_margin_half"
android:layout_marginEnd="@dimen/activity_horizontal_margin_half">
<TextView
style="@android:style/TextAppearance.DeviceDefault.Large"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/fragment_about__feedback"
android:layout_marginBottom="8dp"/>
<TextView
android:textAppearance="@style/TextAppearance.AppCompat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/fragment_about__feedback_text"/>
<Button
android:id="@+id/fragment_about__feedback_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
style="?android:attr/buttonBarButtonStyle"
android:text="@string/fragment_about__feedback_button"/>
</LinearLayout>
</android.support.v7.widget.CardView>
<!-- Spread the Word -->
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="16dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
style="?android:attr/buttonBarStyle"
card_view:cardElevation="5dp"
card_view:cardCornerRadius="5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="8dp"
android:layout_marginStart="@dimen/activity_horizontal_margin_half"
android:layout_marginEnd="@dimen/activity_horizontal_margin_half">
<TextView
style="@android:style/TextAppearance.DeviceDefault.Large"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/fragment_about__spread_the_word"
android:layout_marginBottom="8dp"/>
<com.github.dfa.diaspora_android.ui.HtmlTextView
android:id="@+id/fragment_about__spread_the_word_text"
android:textAppearance="@style/TextAppearance.AppCompat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/fragment_about__spread_the_word_text"/>
<Button
android:id="@+id/fragment_about__spread_the_word_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
style="?android:attr/buttonBarButtonStyle"
android:text="@string/fragment_about__spread_the_word_button"/>
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>

View file

@ -1,10 +1,11 @@
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
tools:context="com.github.dfa.diaspora_android.activity.AboutActivity$LicenseFragment">
<LinearLayout
@ -12,37 +13,202 @@
android:layout_height="match_parent"
android:orientation="vertical">
<!--Vertical Padding-->
<android.support.v4.widget.Space
android:layout_width="match_parent"
android:layout_height="@dimen/activity_vertical_margin" />
<TextView
style="@android:style/TextAppearance.DeviceDefault.Large"
<!-- Maintainers -->
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/fragment_license__copyright_years" />
android:layout_marginTop="16dp"
android:layout_marginBottom="8dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
style="?android:attr/buttonBarStyle"
card_view:cardElevation="5dp"
card_view:cardCornerRadius="5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="8dp"
android:layout_marginStart="@dimen/activity_horizontal_margin_half"
android:layout_marginEnd="@dimen/activity_horizontal_margin_half">
<com.github.dfa.diaspora_android.ui.HtmlTextView
android:id="@+id/fragment_license__licensetext"
style="@android:style/TextAppearance.DeviceDefault.Small"
<TextView
style="@android:style/TextAppearance.DeviceDefault.Large"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/fragment_license__maintainers"/>
<com.github.dfa.diaspora_android.ui.HtmlTextView
android:id="@+id/fragment_license__maintainers_text"
android:textAppearance="@style/TextAppearance.AppCompat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/fragment_license__maintainers_text"
android:layout_marginBottom="8dp"/>
</LinearLayout>
</android.support.v7.widget.CardView>
<!-- Contributors -->
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:linksClickable="true"
android:text="@string/fragment_license__license_content" />
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
style="?android:attr/buttonBarStyle"
card_view:cardElevation="5dp"
card_view:cardCornerRadius="5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="8dp"
android:layout_marginStart="@dimen/activity_horizontal_margin_half"
android:layout_marginEnd="@dimen/activity_horizontal_margin_half">
<TextView
style="@android:style/TextAppearance.DeviceDefault.Large"
<TextView
style="@android:style/TextAppearance.DeviceDefault.Large"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/fragment_license__contributors"
android:layout_marginBottom="8dp"/>
<com.github.dfa.diaspora_android.ui.HtmlTextView
android:id="@+id/fragment_license__contributors_text"
android:textAppearance="@style/TextAppearance.AppCompat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp" />
</LinearLayout>
</android.support.v7.widget.CardView>
<!-- License -->
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/activity_vertical_margin"
android:text="@string/fragment_license__3rd_party_libs_title" />
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
style="?android:attr/buttonBarStyle"
card_view:cardElevation="5dp"
card_view:cardCornerRadius="5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="8dp"
android:layout_marginStart="@dimen/activity_horizontal_margin_half"
android:layout_marginEnd="@dimen/activity_horizontal_margin_half">
<com.github.dfa.diaspora_android.ui.HtmlTextView
android:id="@+id/fragment_license__3rdparty"
style="@android:style/TextAppearance.DeviceDefault.Small"
<TextView
style="@android:style/TextAppearance.DeviceDefault.Large"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/fragment_license__license"
android:layout_marginBottom="8dp"/>
<TextView
android:textAppearance="@style/TextAppearance.AppCompat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/fragment_license__license_text"/>
<Button
android:id="@+id/fragment_license__license_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
style="?android:attr/buttonBarButtonStyle"
android:text="@string/fragment_license__license_button"/>
</LinearLayout>
</android.support.v7.widget.CardView>
<!-- Third Party Libraries -->
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:linksClickable="true" />
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
style="?android:attr/buttonBarStyle"
card_view:cardElevation="5dp"
card_view:cardCornerRadius="5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="8dp"
android:layout_marginStart="@dimen/activity_horizontal_margin_half"
android:layout_marginEnd="@dimen/activity_horizontal_margin_half">
<TextView
style="@android:style/TextAppearance.DeviceDefault.Large"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/fragment_license__thirdparty_libs"
android:layout_marginBottom="8dp"/>
<TextView
android:textAppearance="@style/TextAppearance.AppCompat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/fragment_license__thirdparty_libs_text"/>
<com.github.dfa.diaspora_android.ui.HtmlTextView
android:id="@+id/fragment_license__thirdparty_libs_text"
android:textAppearance="@style/TextAppearance.AppCompat"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</android.support.v7.widget.CardView>
<!-- Miscellaneous -->
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="16dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
style="?android:attr/buttonBarStyle"
card_view:cardElevation="5dp"
card_view:cardCornerRadius="5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="8dp"
android:layout_marginStart="@dimen/activity_horizontal_margin_half"
android:layout_marginEnd="@dimen/activity_horizontal_margin_half">
<TextView
style="@android:style/TextAppearance.DeviceDefault.Large"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/fragment_license__misc"
android:layout_marginBottom="8dp"/>
<TextView
android:textAppearance="@style/TextAppearance.AppCompat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/fragment_license__misc_leafpic"/>
<Button
android:id="@+id/fragment_license__leafpic_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
style="?android:attr/buttonBarButtonStyle"
android:text="@string/fragment_license__misc_leafpic_button"/>
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>