admin
2021-04-07 edeef504e654415c25d3816a4609f43edc79fbb3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package com.weikou.beibeivideo.ui.discover;
 
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import android.view.View;
import android.widget.TextView;
 
import com.weikou.beibeivideo.ui.BaseActivity;
import com.weikou.beibeivideo.ui.category.fragment.StarFragment;
import com.weikou.beibeivideo.R;
import com.weikou.beibeivideo.util.ui.TopStatusSettings;
 
/**
 * Created by weikou2015 on 2016/8/17.
 */
public class StarsActivity extends BaseActivity implements View.OnClickListener {
    @Override
    protected void onCreate(Bundle arg0) {
        super.onCreate(arg0);
        setContentView(R.layout.activity_stars);
 
        findViewById(R.id.tv_top_bar_left).setOnClickListener(this);
        ((TextView) (findViewById(R.id.tv_top_bar_middle))).setText("明星");
        FragmentManager fm = getSupportFragmentManager();
        Fragment fragment = fm.findFragmentByTag("StarFragment");
        if (fragment == null) {
            fragment = new StarFragment();
            fm.beginTransaction().add(R.id.fl_add_container, fragment, "StarFragment").commitAllowingStateLoss();
        }
        TopStatusSettings.setStatusViewAndDeepColor(this);
    }
 
    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.tv_top_bar_left:
                finish();
                break;
        }
    }
}