zhangzengfei
2020-03-31 0ce893695d32ab686f9e2309509e80c6feb0d380
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package com.basic.security.fragment;
 
import android.view.View;
 
import com.basic.security.R;
import com.basic.security.base.BaseFragment;
 
import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.EFragment;
import org.androidannotations.annotations.ViewById;
 
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
 
 
@EFragment(R.layout.fragment_background_and_border)
public class BackgroundAndBorderFragment extends BaseFragment {
 
    @ViewById
    public View topBlurView, topBlurView1, topBlurView2, bottomBlurView, bottomBlurView2, topBackground, topBackground1, topBackground2,
            bottomBackground, bottomBackground2, fullscreenBlurView, fullscreenBackground, topBackground3, bottomBackground3, topBlurView3, bottomBlurView3, topBlurView4, topBackground4, bottomBlurView4, bottomBackground4;
 
    List<View> views = new ArrayList<>();
 
    public void show() {
        Set<View> visibleViews = mainActivity().backgroundAndBorderViews.get(mainActivity().currentFragment);
        for (View view : views) {
            if (visibleViews != null && visibleViews.contains(view)) {
                view.setVisibility(View.VISIBLE);
            } else {
                view.setVisibility(View.INVISIBLE);
            }
        }
    }
 
    @AfterViews
    public void afterViews() {
        views.add(topBlurView);
        views.add(topBlurView1);
        views.add(topBlurView2);
        views.add(topBlurView3);
        views.add(bottomBlurView);
        views.add(bottomBlurView2);
        views.add(bottomBlurView3);
        views.add(topBackground);
        views.add(topBackground1);
        views.add(topBackground2);
        views.add(topBackground3);
        views.add(bottomBackground);
        views.add(bottomBackground2);
        views.add(bottomBackground3);
        views.add(fullscreenBlurView);
        views.add(fullscreenBackground);
        views.add(topBlurView4);
        views.add(topBackground4);
        views.add(bottomBlurView4);
        views.add(bottomBackground4);
    }
 
}