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

40 lines
1.3 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 BaseActivity {
2017-04-16 04:05:25 +10:00
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_about);
2017-04-16 04:05:25 +10:00
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);
2017-04-16 04:05:25 +10:00
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();
}
});
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
}