Merge branch 'sbetelmal-feature/about-page'
This commit is contained in:
commit
158a5ea467
|
@ -46,6 +46,7 @@ dependencies {
|
|||
compile 'com.android.support:support-v13:25.3.1'
|
||||
compile 'com.android.support:design:25.3.1'
|
||||
compile 'com.android.support:exifinterface:25.3.1'
|
||||
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7'
|
||||
compile 'com.squareup.retrofit2:retrofit:2.2.0'
|
||||
compile 'com.squareup.retrofit2:converter-gson:2.2.0'
|
||||
compile 'com.squareup.picasso:picasso:2.5.2'
|
||||
|
|
|
@ -72,6 +72,7 @@
|
|||
<activity android:name=".PreferencesActivity" />
|
||||
<activity android:name=".FavouritesActivity" />
|
||||
<activity android:name=".AccountListActivity" />
|
||||
<activity android:name=".AboutActivity" />
|
||||
<activity
|
||||
android:name=".ReportActivity"
|
||||
android:windowSoftInputMode="stateVisible|adjustResize" />
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
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 BaseActivity {
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_about);
|
||||
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
TextView versionTextView = (TextView) findViewById(R.id.versionTV);
|
||||
Button mTuskyAccountButton = (Button) findViewById(R.id.tusky_profile_button);
|
||||
|
||||
String versionName = BuildConfig.VERSION_NAME;
|
||||
String versionFormat = getString(R.string.about_application_version);
|
||||
versionTextView.setText(String.format(versionFormat, 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);
|
||||
}
|
||||
}
|
|
@ -299,7 +299,8 @@ public class MainActivity extends BaseActivity implements SFragment.OnUserRemove
|
|||
new PrimaryDrawerItem().withIdentifier(3).withName(getString(R.string.action_view_blocks)).withSelectable(false).withIcon(GoogleMaterial.Icon.gmd_block),
|
||||
new DividerDrawerItem(),
|
||||
new SecondaryDrawerItem().withIdentifier(4).withName(getString(R.string.action_view_preferences)).withSelectable(false).withIcon(GoogleMaterial.Icon.gmd_settings),
|
||||
new SecondaryDrawerItem().withIdentifier(5).withName(getString(R.string.action_logout)).withSelectable(false).withIcon(GoogleMaterial.Icon.gmd_exit_to_app)
|
||||
new SecondaryDrawerItem().withIdentifier(5).withName(getString(R.string.about_title_activity)).withSelectable(false).withIcon(GoogleMaterial.Icon.gmd_info),
|
||||
new SecondaryDrawerItem().withIdentifier(6).withName(getString(R.string.action_logout)).withSelectable(false).withIcon(GoogleMaterial.Icon.gmd_exit_to_app)
|
||||
)
|
||||
.withOnDrawerItemClickListener(new Drawer.OnDrawerItemClickListener() {
|
||||
@Override
|
||||
|
@ -325,8 +326,11 @@ public class MainActivity extends BaseActivity implements SFragment.OnUserRemove
|
|||
Intent intent = new Intent(MainActivity.this, PreferencesActivity.class);
|
||||
startActivity(intent);
|
||||
} else if (drawerItemIdentifier == 5) {
|
||||
logout();
|
||||
Intent intent = new Intent(MainActivity.this, AboutActivity.class);
|
||||
startActivity(intent);
|
||||
} else if (drawerItemIdentifier == 6) {
|
||||
logout();
|
||||
} else if (drawerItemIdentifier == 7) {
|
||||
Intent intent = new Intent(MainActivity.this, AccountListActivity.class);
|
||||
intent.putExtra("type", AccountListActivity.Type.FOLLOW_REQUESTS);
|
||||
startActivity(intent);
|
||||
|
|
|
@ -0,0 +1,88 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="com.keylesspalace.tusky.AboutActivity">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary" />
|
||||
|
||||
<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">
|
||||
|
||||
<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" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/versionTV"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Large" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/projectURL_TV"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:autoLink="web"
|
||||
android:padding="@dimen/text_content_margin"
|
||||
android:text="@string/about_project_site"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/featuresURL_TV"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
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: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:textColor="@android:color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
|
@ -166,6 +166,19 @@
|
|||
<string name="notification_title_summary">%d new interactions</string>
|
||||
|
||||
<string name="description_account_locked">Locked Account</string>
|
||||
|
||||
<string name="about_title_activity">About</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_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="status_share_content">Share content of toot</string>
|
||||
<string name="status_share_link">Share link to toot</string>
|
||||
|
||||
|
|
Loading…
Reference in New Issue