正在查看: St.John's v1.0.9 应用的 ExamAnalysisActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: St.John's v1.0.9 应用的 ExamAnalysisActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.mcb.stjohnsemschool.activity;
import android.content.SharedPreferences;
import android.graphics.Typeface;
import android.os.Bundle;
import android.view.MenuItem;
import androidx.appcompat.app.AppCompatActivity;
import androidx.viewpager.widget.ViewPager;
import com.google.firebase.analytics.FirebaseAnalytics;
import com.mcb.stjohnsemschool.adapter.ExamAnalysisPagerAdapter;
import com.mcb.stjohnsemschool.utils.SlidingTabLayout;
import com.mcb.stjohnsemschool.utils.TransparentProgressDialog;
public class ExamAnalysisActivity extends AppCompatActivity {
private static final String TAG = "com.mcb.stjohnsemschool.activity.ExamAnalysisActivity";
public static SharedPreferences mSharedPref;
public static AppCompatActivity myActivity;
Typeface fontMuseo;
SharedPreferences.Editor mEditor;
TransparentProgressDialog mProgressbar;
int month;
ViewPager pager;
SlidingTabLayout tabs;
int year;
CharSequence[] titles = {"Over All", "Subject Wise"};
String monthName = "";
int typeId = 0;
int examType = 0;
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.activity_exam_analysis);
this.fontMuseo = Typeface.createFromAsset(getAssets(), "Roboto-Regular.ttf");
myActivity = this;
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayShowTitleEnabled(true);
getSupportActionBar().setHomeButtonEnabled(true);
getSupportActionBar().setTitle("Exam Analysis");
SharedPreferences sharedPreferences = getSharedPreferences("", 0);
mSharedPref = sharedPreferences;
this.mEditor = sharedPreferences.edit();
Bundle extras = getIntent().getExtras();
this.month = extras.getInt("Month", this.month);
this.year = extras.getInt("Year", this.year);
this.examType = extras.getInt("ExamType", this.examType);
this.monthName = extras.getString("MonthName", "");
this.typeId = extras.getInt("TypeId", this.typeId);
getSupportActionBar().setSubtitle(this.monthName);
setUpIds();
}
private void setUpIds() {
SlidingTabLayout findViewById = findViewById(R.id.tabs);
this.tabs = findViewById;
findViewById.setDistributeEvenly(true);
ViewPager findViewById2 = findViewById(R.id.pager);
this.pager = findViewById2;
findViewById2.setAdapter(new ExamAnalysisPagerAdapter(getSupportFragmentManager(), this.titles));
this.tabs.setCustomTabColorizer(new SlidingTabLayout.TabColorizer() {
public int getDividerColor(int i) {
return i;
}
public int getIndicatorColor(int i) {
return ExamAnalysisActivity.this.getResources().getColor(2131100860);
}
});
this.tabs.setViewPager(this.pager);
}
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_EXAM_ANALYSIS", bundle);
}
}