From df7e077029faadf208a587d06cad94604aaed269 Mon Sep 17 00:00:00 2001 From: "serage.betelmal" Date: Sun, 30 Apr 2017 21:53:32 +0100 Subject: [PATCH] Adding more content to the About activity --- app/src/main/AndroidManifest.xml | 36 ++++------------ .../keylesspalace/tusky/AboutActivity.java | 25 +++++++++-- app/src/main/res/layout/activity_about.xml | 42 +++++++++++++++++-- app/src/main/res/values/strings.xml | 5 ++- 4 files changed, 73 insertions(+), 35 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 8f375863c..a40855ca9 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -43,64 +43,44 @@ android:windowSoftInputMode="stateVisible|adjustResize"> - - - - - - - + - + - - - - - - - - - - - + + android:permission="android.permission.BIND_QUICK_SETTINGS_TILE"> diff --git a/app/src/main/java/com/keylesspalace/tusky/AboutActivity.java b/app/src/main/java/com/keylesspalace/tusky/AboutActivity.java index bbbf02cf9..06c53226c 100644 --- a/app/src/main/java/com/keylesspalace/tusky/AboutActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/AboutActivity.java @@ -1,12 +1,18 @@ package com.keylesspalace.tusky; +import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; +import android.view.View; +import android.widget.Button; import android.widget.TextView; public class AboutActivity extends AppCompatActivity { private TextView mVersionTextView; + private TextView mProjectSiteTextView; + private TextView mFeatureSiteTextView; + private Button mTuskyAccountButton; @Override protected void onCreate(Bundle savedInstanceState) { @@ -14,12 +20,25 @@ public class AboutActivity extends AppCompatActivity { setContentView(R.layout.activity_about); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); + mVersionTextView = (TextView) findViewById(R.id.versionTV); + mProjectSiteTextView = (TextView) findViewById(R.id.projectURL_TV); + mFeatureSiteTextView = (TextView) findViewById(R.id.featuresURL_TV); + mTuskyAccountButton = (Button) findViewById(R.id.tusky_profile_button); - mVersionTextView = (TextView) findViewById(R.id.textView); String versionName = BuildConfig.VERSION_NAME; - mVersionTextView. - setText(getString(R.string.about_application_version)+ versionName); + mVersionTextView.setText(getString(R.string.about_application_version) + versionName); + mTuskyAccountButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + onAccountTVClick(); + } + }); } + private void onAccountTVClick() { + Intent intent = new Intent(this, AccountActivity.class); + intent.putExtra("id", "72306"); + startActivity(intent); + } } diff --git a/app/src/main/res/layout/activity_about.xml b/app/src/main/res/layout/activity_about.xml index e395a86a3..d28963d08 100644 --- a/app/src/main/res/layout/activity_about.xml +++ b/app/src/main/res/layout/activity_about.xml @@ -27,7 +27,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" - android:orientation="vertical"> + android:orientation="vertical" + android:id="@+id/linearLayoutCompat"> + + + + + +