2017-04-16 04:05:25 +10:00
|
|
|
package com.keylesspalace.tusky;
|
|
|
|
|
2017-05-01 06:53:32 +10:00
|
|
|
import android.content.Intent;
|
2017-04-16 04:05:25 +10:00
|
|
|
import android.os.Bundle;
|
|
|
|
import android.support.v7.app.AppCompatActivity;
|
|
|
|
import android.support.v7.widget.Toolbar;
|
2017-05-01 06:53:32 +10:00
|
|
|
import android.view.View;
|
|
|
|
import android.widget.Button;
|
2017-04-16 04:05:25 +10:00
|
|
|
import android.widget.TextView;
|
|
|
|
|
|
|
|
public class AboutActivity extends AppCompatActivity {
|
|
|
|
private TextView mVersionTextView;
|
2017-05-01 06:53:32 +10:00
|
|
|
private TextView mProjectSiteTextView;
|
|
|
|
private TextView mFeatureSiteTextView;
|
|
|
|
private Button mTuskyAccountButton;
|
2017-04-16 04:05:25 +10:00
|
|
|
|
|
|
|
@Override
|
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
|
super.onCreate(savedInstanceState);
|
|
|
|
setContentView(R.layout.activity_about);
|
|
|
|
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
|
|
|
setSupportActionBar(toolbar);
|
2017-05-01 06:53:32 +10:00
|
|
|
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);
|
2017-04-16 04:05:25 +10:00
|
|
|
|
|
|
|
String versionName = BuildConfig.VERSION_NAME;
|
|
|
|
|
2017-05-01 06:53:32 +10:00
|
|
|
mVersionTextView.setText(getString(R.string.about_application_version) + versionName);
|
|
|
|
mTuskyAccountButton.setOnClickListener(new View.OnClickListener() {
|
|
|
|
@Override
|
|
|
|
public void onClick(View v) {
|
|
|
|
onAccountTVClick();
|
|
|
|
}
|
|
|
|
});
|
2017-04-16 04:05:25 +10:00
|
|
|
}
|
|
|
|
|
2017-05-01 06:53:32 +10:00
|
|
|
private void onAccountTVClick() {
|
|
|
|
Intent intent = new Intent(this, AccountActivity.class);
|
|
|
|
intent.putExtra("id", "72306");
|
|
|
|
startActivity(intent);
|
|
|
|
}
|
2017-04-16 04:05:25 +10:00
|
|
|
}
|