chinwag-android/app/src/main/java/com/keylesspalace/tusky/AboutActivity.java

45 lines
1.6 KiB
Java
Raw Normal View History

2017-04-16 04:05:25 +10:00
package com.keylesspalace.tusky;
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;
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;
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);
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;
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
}
private void onAccountTVClick() {
Intent intent = new Intent(this, AccountActivity.class);
intent.putExtra("id", "72306");
startActivity(intent);
}
2017-04-16 04:05:25 +10:00
}