导航菜单

页面标题

页面副标题

St.John's v1.0.9 - ObjectiveDetailActivity.java 源代码

正在查看: St.John's v1.0.9 应用的 ObjectiveDetailActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.mcb.stjohnsemschool.activity;

import android.content.SharedPreferences;
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.MarksViewPagerAdapter;
import com.mcb.stjohnsemschool.utils.SlidingTabLayout;

public class ObjectiveDetailActivity extends AppCompatActivity {
    private static final String TAG = "com.mcb.stjohnsemschool.activity.ObjectiveDetailActivity";
    private String mBranchSectionId;
    private SharedPreferences mSharedPref;
    private String mStudentEnrollmentID;
    private ViewPager pager;
    private SlidingTabLayout tabs;
    private CharSequence[] titles = {"Subject Wise Result", "Question Wise Result"};

    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.activity_marks_detail);
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        getSupportActionBar().setDisplayShowTitleEnabled(true);
        getSupportActionBar().setHomeButtonEnabled(true);
        getSupportActionBar().setTitle("Objective Result");
        SharedPreferences sharedPreferences = getSharedPreferences("", 0);
        this.mSharedPref = sharedPreferences;
        this.mStudentEnrollmentID = sharedPreferences.getString("studentEnrollmentIdKey", this.mStudentEnrollmentID);
        this.mBranchSectionId = this.mSharedPref.getString("BranchSectionIDKey", this.mBranchSectionId);
        setUpIds();
    }

    private void setUpIds() {
        this.tabs = findViewById(R.id.tabs);
        ViewPager findViewById = findViewById(R.id.pager);
        this.pager = findViewById;
        findViewById.setAdapter(new MarksViewPagerAdapter(getSupportFragmentManager(), this.titles));
        this.tabs.setCustomTabColorizer(new SlidingTabLayout.TabColorizer() {
            public int getDividerColor(int i) {
                return i;
            }

            public int getIndicatorColor(int i) {
                return ObjectiveDetailActivity.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 = this.mSharedPref.getString("usernamekey", "");
        Bundle bundle = new Bundle();
        bundle.putString("user_name", string);
        FirebaseAnalytics.getInstance(this).logEvent("PAGE_OBJECTIVE_EXAM_DETAILS", bundle);
    }
}