commit
b7050233f1
@ -0,0 +1,44 @@ |
||||
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) { |
||||
super.onCreate(savedInstanceState); |
||||
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); |
||||
|
||||
String versionName = BuildConfig.VERSION_NAME; |
||||
|
||||
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); |
||||
} |
||||
} |
@ -0,0 +1,90 @@ |
||||
<?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" |
||||
android:padding="@dimen/material_drawer_item_padding" |
||||
tools:context="com.keylesspalace.tusky.AboutActivity"> |
||||
|
||||
<android.support.design.widget.AppBarLayout |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:theme="@style/AppTheme.AppBarOverlay"> |
||||
|
||||
<android.support.v7.widget.Toolbar |
||||
android:id="@+id/toolbar" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="?attr/actionBarSize" |
||||
android:background="?attr/colorPrimary" |
||||
app:popupTheme="@style/AppTheme.PopupOverlay" /> |
||||
|
||||
</android.support.design.widget.AppBarLayout> |
||||
|
||||
|
||||
<android.support.v7.widget.LinearLayoutCompat |
||||
|
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_gravity="center" |
||||
android:orientation="vertical" |
||||
android:id="@+id/linearLayoutCompat"> |
||||
|
||||
<com.mikhaellopez.circularfillableloaders.CircularFillableLoaders |
||||
android:id="@+id/circularFillableLoaders" |
||||
android:layout_width="200dp" |
||||
android:layout_height="200dp" |
||||
android:layout_gravity="center" |
||||
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:layout_gravity="center" |
||||
android:text="TextView" |
||||
android:textAppearance="@style/TextAppearance.AppCompat.Large" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/projectURL_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_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: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> |
||||
|
||||
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout> |
Loading…
Reference in new issue