导航菜单

页面标题

页面副标题

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

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

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


package com.mu.gymtrain.Activity;

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.google.android.material.tabs.TabLayout;
import com.mu.gymtrain.Adapter.ConsumeTabsAdapter;
import com.mu.gymtrain.Base.BaseActivity;
import com.mu.gymtrain.R;
import com.mu.gymtrain.Utils.FinalTools;

public class FamilyMemberActivity extends BaseActivity {
    private ConsumeTabsAdapter mAdapter;

    @BindView(R.id.avatar)
    ImageView mAvatar;

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

    @BindView(R.id.tvAge)
    TextView mTvAge;

    @BindView(R.id.tvName)
    TextView mTvName;

    @BindView(R.id.tvRemove)
    TextView mTvRemove;

    @BindView(R.id.tab_consume_layout)
    TabLayout tabConsumeLayout;

    @BindView(R.id.vp_content_consume)
    ViewPager vpContentConsume;

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

    public void initData() {
    }

    public void initView() {
        this.mTitleMiddle.setText("家庭成员");
        getIntent().getStringExtra(FinalTools.USER_ID);
        if ("main".equals(getIntent().getStringExtra("from"))) {
            this.mTvRemove.setVisibility(0);
        }
        if (this.mAdapter == null) {
            this.mAdapter = new ConsumeTabsAdapter(getSupportFragmentManager());
        }
        this.vpContentConsume.setAdapter(this.mAdapter);
        this.vpContentConsume.setOffscreenPageLimit(this.mAdapter.getCount());
        this.vpContentConsume.setCurrentItem(0);
        this.tabConsumeLayout.setupWithViewPager(this.vpContentConsume);
    }

    @OnClick({R.id.title_left, R.id.tvRemove})
    public void onViewClicked(View view) {
        if (view.getId() != 2131297253) {
            return;
        }
        finish();
    }
}