Makes about page work with light theme and landscape orientation.
This commit is contained in:
parent
daf0ec8e49
commit
551d73baee
4 changed files with 90 additions and 110 deletions
|
@ -8,26 +8,21 @@ import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
public class AboutActivity extends AppCompatActivity {
|
public class AboutActivity extends BaseActivity {
|
||||||
private TextView mVersionTextView;
|
|
||||||
private TextView mProjectSiteTextView;
|
|
||||||
private TextView mFeatureSiteTextView;
|
|
||||||
private Button mTuskyAccountButton;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_about);
|
setContentView(R.layout.activity_about);
|
||||||
|
|
||||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
mVersionTextView = (TextView) findViewById(R.id.versionTV);
|
|
||||||
mProjectSiteTextView = (TextView) findViewById(R.id.projectURL_TV);
|
TextView versionTextView = (TextView) findViewById(R.id.versionTV);
|
||||||
mFeatureSiteTextView = (TextView) findViewById(R.id.featuresURL_TV);
|
Button mTuskyAccountButton = (Button) findViewById(R.id.tusky_profile_button);
|
||||||
mTuskyAccountButton = (Button) findViewById(R.id.tusky_profile_button);
|
|
||||||
|
|
||||||
String versionName = BuildConfig.VERSION_NAME;
|
String versionName = BuildConfig.VERSION_NAME;
|
||||||
|
String versionFormat = getString(R.string.about_application_version);
|
||||||
mVersionTextView.setText(getString(R.string.about_application_version) + versionName);
|
versionTextView.setText(String.format(versionFormat, versionName));
|
||||||
mTuskyAccountButton.setOnClickListener(new View.OnClickListener() {
|
mTuskyAccountButton.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
|
|
@ -4,87 +4,85 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:padding="@dimen/material_drawer_item_padding"
|
|
||||||
tools:context="com.keylesspalace.tusky.AboutActivity">
|
tools:context="com.keylesspalace.tusky.AboutActivity">
|
||||||
|
|
||||||
<android.support.design.widget.AppBarLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:theme="@style/AppTheme.AppBarOverlay">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<android.support.v7.widget.Toolbar
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
android:background="?attr/colorPrimary"
|
android:background="?attr/colorPrimary" />
|
||||||
app:popupTheme="@style/AppTheme.PopupOverlay" />
|
|
||||||
|
|
||||||
</android.support.design.widget.AppBarLayout>
|
<ScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingTop="16dp"
|
||||||
|
android:paddingBottom="16dp">
|
||||||
|
|
||||||
<android.support.v7.widget.LinearLayoutCompat
|
<com.mikhaellopez.circularfillableloaders.CircularFillableLoaders
|
||||||
|
android:id="@+id/circularFillableLoaders"
|
||||||
|
android:layout_width="200dp"
|
||||||
|
android:layout_height="200dp"
|
||||||
|
android:src="@mipmap/ic_logo"
|
||||||
|
app:cfl_border="true"
|
||||||
|
app:cfl_border_width="4dp"
|
||||||
|
app:cfl_progress="80"
|
||||||
|
app:cfl_wave_amplitude="0.08"
|
||||||
|
app:cfl_wave_color="?attr/splash_wave_color" />
|
||||||
|
|
||||||
android:layout_width="wrap_content"
|
<TextView
|
||||||
android:layout_height="wrap_content"
|
android:id="@+id/versionTV"
|
||||||
android:layout_gravity="center"
|
android:layout_width="wrap_content"
|
||||||
android:orientation="vertical"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/linearLayoutCompat">
|
android:paddingTop="8dp"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Large" />
|
||||||
|
|
||||||
<com.mikhaellopez.circularfillableloaders.CircularFillableLoaders
|
<TextView
|
||||||
android:id="@+id/circularFillableLoaders"
|
android:id="@+id/projectURL_TV"
|
||||||
android:layout_width="200dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="200dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:autoLink="web"
|
||||||
android:src="@mipmap/ic_logo"
|
android:padding="@dimen/text_content_margin"
|
||||||
app:cfl_border="true"
|
android:text="@string/about_project_site"
|
||||||
app:cfl_border_width="4dp"
|
android:textAlignment="center"
|
||||||
app:cfl_progress="80"
|
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
|
||||||
app:cfl_wave_amplitude="0.08"
|
|
||||||
app:cfl_wave_color="?attr/splash_wave_color" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/versionTV"
|
android:id="@+id/featuresURL_TV"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:autoLink="web"
|
||||||
android:text="TextView"
|
android:padding="@dimen/text_content_margin"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Large" />
|
android:text="@string/about_bug_feature_request_site"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
|
||||||
|
|
||||||
<TextView
|
<Button
|
||||||
android:id="@+id/projectURL_TV"
|
android:id="@+id/tusky_profile_button"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:clickable="true"
|
||||||
android:autoLink="web"
|
android:padding="@dimen/text_content_margin"
|
||||||
android:padding="@dimen/text_content_margin"
|
android:text="@string/about_tusky_account"
|
||||||
android:text="@string/about_project_site"
|
android:textAlignment="center"
|
||||||
android:textAlignment="center"
|
android:textAllCaps="false"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
|
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||||
|
android:textColor="@android:color/white" />
|
||||||
|
|
||||||
<TextView
|
</LinearLayout>
|
||||||
android:id="@+id/featuresURL_TV"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:autoLink="web"
|
|
||||||
android:padding="@dimen/text_content_margin"
|
|
||||||
android:text="@string/about_bug_feature_request_site"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/tusky_profile_button"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:clickable="true"
|
|
||||||
android:padding="@dimen/text_content_margin"
|
|
||||||
android:text="@string/about_tusky_account"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textAllCaps="false"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"/>
|
|
||||||
</android.support.v7.widget.LinearLayoutCompat>
|
|
||||||
|
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</android.support.design.widget.CoordinatorLayout>
|
</android.support.design.widget.CoordinatorLayout>
|
|
@ -168,9 +168,15 @@
|
||||||
<string name="description_account_locked">Locked Account</string>
|
<string name="description_account_locked">Locked Account</string>
|
||||||
|
|
||||||
<string name="about_title_activity">About</string>
|
<string name="about_title_activity">About</string>
|
||||||
<string name="about_application_version">App version: </string>
|
<string name="about_application_version">App version: %s</string>
|
||||||
<string name="about_project_site">Project website: \n https://tusky.keylesspalace.com</string>
|
<string name="about_project_site">
|
||||||
<string name="about_bug_feature_request_site">Bug reports & feature requests: \n https://github.com/Vavassor/Tusky/issues</string>
|
Project website:\n
|
||||||
|
https://tusky.keylesspalace.com
|
||||||
|
</string>
|
||||||
|
<string name="about_bug_feature_request_site">
|
||||||
|
Bug reports & feature requests:\n
|
||||||
|
https://github.com/Vavassor/Tusky/issues
|
||||||
|
</string>
|
||||||
<string name="about_tusky_account">Tusky\'s Profile</string>
|
<string name="about_tusky_account">Tusky\'s Profile</string>
|
||||||
|
|
||||||
<string name="status_share_content">Share content of toot</string>
|
<string name="status_share_content">Share content of toot</string>
|
||||||
|
|
|
@ -30,8 +30,7 @@
|
||||||
<item name="android:textColorSecondary">@color/text_color_secondary_dark</item>
|
<item name="android:textColorSecondary">@color/text_color_secondary_dark</item>
|
||||||
<item name="android:textColorTertiary">@color/text_color_tertiary_dark</item>
|
<item name="android:textColorTertiary">@color/text_color_tertiary_dark</item>
|
||||||
<item name="android:textColorPrimaryInverse">@color/text_color_primary_inverse_dark</item>
|
<item name="android:textColorPrimaryInverse">@color/text_color_primary_inverse_dark</item>
|
||||||
<item name="android:textColorSecondaryInverse">@color/text_color_secondary_inverse_dark
|
<item name="android:textColorSecondaryInverse">@color/text_color_secondary_inverse_dark</item>
|
||||||
</item>
|
|
||||||
<item name="android:textColorTertiaryInverse">@color/text_color_tertiary_inverse_dark</item>
|
<item name="android:textColorTertiaryInverse">@color/text_color_tertiary_inverse_dark</item>
|
||||||
<item name="android:actionMenuTextColor">@color/text_color_primary_dark</item>
|
<item name="android:actionMenuTextColor">@color/text_color_primary_dark</item>
|
||||||
|
|
||||||
|
@ -54,15 +53,11 @@
|
||||||
<item name="tab_page_margin_drawable">@drawable/tab_page_margin_dark</item>
|
<item name="tab_page_margin_drawable">@drawable/tab_page_margin_dark</item>
|
||||||
<item name="account_header_background_color">@color/account_header_background_dark</item>
|
<item name="account_header_background_color">@color/account_header_background_dark</item>
|
||||||
<item name="account_toolbar_icon_tint_uncollapsed">@color/toolbar_icon_dark</item>
|
<item name="account_toolbar_icon_tint_uncollapsed">@color/toolbar_icon_dark</item>
|
||||||
<item name="account_toolbar_icon_tint_collapsed">
|
<item name="account_toolbar_icon_tint_collapsed">@color/account_toolbar_icon_collapsed_dark</item>
|
||||||
@color/account_toolbar_icon_collapsed_dark
|
<item name="account_toolbar_popup_theme">@style/AppTheme.Account.ToolbarPopupTheme.Dark</item>
|
||||||
</item>
|
|
||||||
<item name="account_toolbar_popup_theme">@style/AppTheme.Account.ToolbarPopupTheme.Dark
|
|
||||||
</item>
|
|
||||||
<item name="compose_close_button_tint">@color/toolbar_icon_dark</item>
|
<item name="compose_close_button_tint">@color/toolbar_icon_dark</item>
|
||||||
<item name="compose_media_button_tint">@color/compose_media_button_dark</item>
|
<item name="compose_media_button_tint">@color/compose_media_button_dark</item>
|
||||||
<item name="compose_media_button_disabled_tint">@color/compose_media_button_disabled_dark
|
<item name="compose_media_button_disabled_tint">@color/compose_media_button_disabled_dark</item>
|
||||||
</item>
|
|
||||||
<item name="compose_mention_color">@color/color_accent_dark</item>
|
<item name="compose_mention_color">@color/color_accent_dark</item>
|
||||||
<item name="compose_content_warning_bar_background">@drawable/border_background_dark</item>
|
<item name="compose_content_warning_bar_background">@drawable/border_background_dark</item>
|
||||||
<item name="compose_nsfw_button_color">@color/image_button_dark</item>
|
<item name="compose_nsfw_button_color">@color/image_button_dark</item>
|
||||||
|
@ -122,10 +117,8 @@
|
||||||
<item name="android:textColorSecondary">@color/text_color_secondary_light</item>
|
<item name="android:textColorSecondary">@color/text_color_secondary_light</item>
|
||||||
<item name="android:textColorTertiary">@color/text_color_tertiary_light</item>
|
<item name="android:textColorTertiary">@color/text_color_tertiary_light</item>
|
||||||
<item name="android:textColorPrimaryInverse">@color/text_color_primary_inverse_light</item>
|
<item name="android:textColorPrimaryInverse">@color/text_color_primary_inverse_light</item>
|
||||||
<item name="android:textColorSecondaryInverse">@color/text_color_secondary_inverse_light
|
<item name="android:textColorSecondaryInverse">@color/text_color_secondary_inverse_light</item>
|
||||||
</item>
|
<item name="android:textColorTertiaryInverse">@color/text_color_tertiary_inverse_light</item>
|
||||||
<item name="android:textColorTertiaryInverse">@color/text_color_tertiary_inverse_light
|
|
||||||
</item>
|
|
||||||
<item name="android:actionMenuTextColor">@color/text_color_primary_light</item>
|
<item name="android:actionMenuTextColor">@color/text_color_primary_light</item>
|
||||||
|
|
||||||
<item name="bottomSheetDialogTheme">@style/AppTheme.BottomSheetDialog.Light</item>
|
<item name="bottomSheetDialogTheme">@style/AppTheme.BottomSheetDialog.Light</item>
|
||||||
|
@ -140,25 +133,18 @@
|
||||||
<item name="status_favourite_active_drawable">@drawable/favourite_active_light</item>
|
<item name="status_favourite_active_drawable">@drawable/favourite_active_light</item>
|
||||||
<item name="status_favourite_inactive_drawable">@drawable/favourite_inactive_light</item>
|
<item name="status_favourite_inactive_drawable">@drawable/favourite_inactive_light</item>
|
||||||
<item name="content_warning_button">@drawable/toggle_small_light</item>
|
<item name="content_warning_button">@drawable/toggle_small_light</item>
|
||||||
<item name="sensitive_media_warning_background_color">
|
<item name="sensitive_media_warning_background_color">@color/sensitive_media_warning_background_light</item>
|
||||||
@color/sensitive_media_warning_background_light
|
|
||||||
</item>
|
|
||||||
<item name="media_preview_unloaded_drawable">@drawable/media_preview_unloaded_light</item>
|
<item name="media_preview_unloaded_drawable">@drawable/media_preview_unloaded_light</item>
|
||||||
<item name="status_divider_drawable">@drawable/status_divider_light</item>
|
<item name="status_divider_drawable">@drawable/status_divider_light</item>
|
||||||
<item name="tab_icon_selected_tint">@color/color_accent_light</item>
|
<item name="tab_icon_selected_tint">@color/color_accent_light</item>
|
||||||
<item name="tab_page_margin_drawable">@drawable/tab_page_margin_light</item>
|
<item name="tab_page_margin_drawable">@drawable/tab_page_margin_light</item>
|
||||||
<item name="account_header_background_color">@color/account_header_background_light</item>
|
<item name="account_header_background_color">@color/account_header_background_light</item>
|
||||||
<item name="account_toolbar_icon_tint_uncollapsed">@color/toolbar_icon_dark
|
<item name="account_toolbar_icon_tint_uncollapsed">@color/toolbar_icon_dark</item> <!--Default to dark on purpose, because header backgrounds with gradients are always dark.-->
|
||||||
</item> <!--Default to dark on purpose, because header backgrounds with gradients are always dark.-->
|
<item name="account_toolbar_icon_tint_collapsed">@color/account_toolbar_icon_collapsed_light</item>
|
||||||
<item name="account_toolbar_icon_tint_collapsed">
|
<item name="account_toolbar_popup_theme">@style/AppTheme.Account.ToolbarPopupTheme.Light</item>
|
||||||
@color/account_toolbar_icon_collapsed_light
|
|
||||||
</item>
|
|
||||||
<item name="account_toolbar_popup_theme">@style/AppTheme.Account.ToolbarPopupTheme.Light
|
|
||||||
</item>
|
|
||||||
<item name="compose_close_button_tint">@color/toolbar_icon_light</item>
|
<item name="compose_close_button_tint">@color/toolbar_icon_light</item>
|
||||||
<item name="compose_media_button_tint">@color/compose_media_button_light</item>
|
<item name="compose_media_button_tint">@color/compose_media_button_light</item>
|
||||||
<item name="compose_media_button_disabled_tint">@color/compose_media_button_disabled_light
|
<item name="compose_media_button_disabled_tint">@color/compose_media_button_disabled_light</item>
|
||||||
</item>
|
|
||||||
<item name="compose_mention_color">@color/compose_mention_light</item>
|
<item name="compose_mention_color">@color/compose_mention_light</item>
|
||||||
<item name="compose_content_warning_bar_background">@drawable/border_background_light</item>
|
<item name="compose_content_warning_bar_background">@drawable/border_background_light</item>
|
||||||
<item name="compose_nsfw_button_color">@color/image_button_light</item>
|
<item name="compose_nsfw_button_color">@color/image_button_light</item>
|
||||||
|
@ -175,8 +161,7 @@
|
||||||
<item name="material_drawer_divider">@color/color_primary_dark_light</item>
|
<item name="material_drawer_divider">@color/color_primary_dark_light</item>
|
||||||
<item name="material_drawer_selected">@color/color_primary_light</item>
|
<item name="material_drawer_selected">@color/color_primary_light</item>
|
||||||
<item name="material_drawer_selected_text">@color/text_color_primary_light</item>
|
<item name="material_drawer_selected_text">@color/text_color_primary_light</item>
|
||||||
<item name="material_drawer_header_selection_text">@color/text_color_primary_dark
|
<item name="material_drawer_header_selection_text">@color/text_color_primary_dark</item> <!--Intentionally dark so it can be overlayed over the account's header image.-->
|
||||||
</item> <!--Intentionally dark so it can be overlayed over the account's header image.-->
|
|
||||||
|
|
||||||
<item name="floatingSearch_backgroundColor">@color/toolbar_background_light</item>
|
<item name="floatingSearch_backgroundColor">@color/toolbar_background_light</item>
|
||||||
<item name="floatingSearch_viewTextColor">@color/text_color_secondary_light</item>
|
<item name="floatingSearch_viewTextColor">@color/text_color_secondary_light</item>
|
||||||
|
@ -204,8 +189,4 @@
|
||||||
<item name="windowActionBarOverlay">true</item>
|
<item name="windowActionBarOverlay">true</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
|
|
||||||
|
|
||||||
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in a new issue