导航菜单

页面标题

页面副标题

自健身 v3.3.4 - CouponActivity.java 源代码

正在查看: 自健身 v3.3.4 应用的 CouponActivity.java JAVA 源代码文件

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


package com.mu.gymtrain.Activity.PersonPackage;

import android.content.res.Resources;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.viewpager.widget.ViewPager;
import butterknife.BindView;
import butterknife.OnClick;
import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.AdaptScreenUtils;
import com.google.android.material.tabs.TabLayout;
import com.mu.gymtrain.Activity.CustomCouponActivity;
import com.mu.gymtrain.Adapter.CouponTabsAdapter;
import com.mu.gymtrain.Base.BaseActivity;
import com.mu.gymtrain.R;

public class CouponActivity extends BaseActivity {
    private CouponTabsAdapter mAdapter;

    @BindView(R.id.tab_course_layout)
    TabLayout tabCourseLayout;

    @BindView(R.id.title_left)
    ImageView titleLeft;

    @BindView(R.id.title_middle)
    TextView titleMiddle;

    @BindView(R.id.tv_coupon_center)
    TextView tvCouponCenter;

    @BindView(R.id.tv_nearest_get)
    TextView tvNearestGet;

    @BindView(R.id.vp_content_course)
    ViewPager vpContentCourse;

    public int getContentLayout() {
        return R.layout.activity_mycoupon;
    }

    public void initData() {
    }

    public void initView() {
        this.titleMiddle.setText(getString(R.string.person_coupon));
        if (this.mAdapter == null) {
            this.mAdapter = new CouponTabsAdapter(getSupportFragmentManager());
        }
        this.vpContentCourse.setAdapter(this.mAdapter);
        this.vpContentCourse.setOffscreenPageLimit(this.mAdapter.getCount());
        this.vpContentCourse.setCurrentItem(0);
        this.tabCourseLayout.setupWithViewPager(this.vpContentCourse);
    }

    @OnClick({R.id.title_left, R.id.tv_coupon_center})
    public void onViewClicked(View view) {
        int id = view.getId();
        if (id == 2131297253) {
            finish();
        } else {
            if (id != 2131297510) {
                return;
            }
            ActivityUtils.startActivity(CustomCouponActivity.class);
        }
    }

    public Resources getResources() {
        return AdaptScreenUtils.adaptWidth(super.getResources(), 750);
    }
}