正在查看: St.John's v1.0.9 应用的 InfoActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: St.John's v1.0.9 应用的 InfoActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.mcb.stjohnsemschool.activity;
import android.content.SharedPreferences;
import android.graphics.Typeface;
import android.os.Bundle;
import android.text.Html;
import android.view.MenuItem;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import com.google.firebase.analytics.FirebaseAnalytics;
public class InfoActivity extends AppCompatActivity {
private Typeface fontMuseo;
SharedPreferences.Editor mEditor;
private TextView mInfoText;
private TextView mInfoText2;
String mOrgName;
SharedPreferences mSharedPref;
AppCompatActivity myActivity;
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.activity_info);
getSupportActionBar();
getSupportActionBar().setTitle("About Us");
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
this.fontMuseo = Typeface.createFromAsset(getAssets(), "Roboto-Regular.ttf");
SharedPreferences sharedPreferences = getSharedPreferences("", 0);
this.mSharedPref = sharedPreferences;
this.mEditor = sharedPreferences.edit();
this.mOrgName = this.mSharedPref.getString("OrganisationNameKey", this.mOrgName);
setUpIds();
}
private void setUpIds() {
TextView textView = (TextView) findViewById(R.id.info_detail_text);
this.mInfoText = textView;
textView.setTypeface(this.fontMuseo);
this.mInfoText2 = (TextView) findViewById(R.id.info_detail_text2);
this.mInfoText2.setText(Html.fromHtml(getString(R.string.about_us2) + " <b>" + this.mOrgName + "</b> "));
this.mInfoText2.setTypeface(this.fontMuseo);
}
public boolean onOptionsItemSelected(MenuItem menuItem) {
if (menuItem.getItemId() == 16908332) {
onBackPressed();
return true;
}
return super.onOptionsItemSelected(menuItem);
}
protected void onResume() {
super.onResume();
String string = getSharedPreferences("", 0).getString("usernamekey", "");
Bundle bundle = new Bundle();
bundle.putString("user_name", string);
FirebaseAnalytics.getInstance(this).logEvent("PAGE_INFO", bundle);
}
}