package com.basic.security.activity.helper;
|
|
import android.view.View;
|
|
import com.basic.security.base.BaseFragment;
|
import com.basic.security.fragment.BackgroundAndBorderFragment;
|
|
import org.androidannotations.annotations.EActivity;
|
|
import java.util.Arrays;
|
import java.util.HashMap;
|
import java.util.HashSet;
|
import java.util.Map;
|
import java.util.Set;
|
|
@EActivity
|
public abstract class MaBackgroundAndBorder extends MaIdcard {
|
public Map<BaseFragment, Set<View>> backgroundAndBorderViews = new HashMap<>();
|
|
@SuppressWarnings("all")
|
public void addBackgroundAndBorderComponent() {
|
BackgroundAndBorderFragment background_and_border_fragment = (BackgroundAndBorderFragment) fragment_background_and_border;
|
|
backgroundAndBorderViews.put(
|
fragment_su_auto_nic_wait_detail,
|
new HashSet(Arrays.asList(
|
background_and_border_fragment.topBackground2,
|
background_and_border_fragment.topBlurView2
|
))
|
);
|
|
backgroundAndBorderViews.put(
|
fragment_su_logged_nic_wait_detail,
|
new HashSet(Arrays.asList(
|
background_and_border_fragment.bottomBackground2,
|
background_and_border_fragment.bottomBlurView2
|
))
|
);
|
backgroundAndBorderViews.put(
|
fragment_su_logged_ic_wait_idcard,
|
new HashSet(Arrays.asList(
|
background_and_border_fragment.bottomBackground2,
|
background_and_border_fragment.bottomBlurView2
|
))
|
);
|
backgroundAndBorderViews.put(
|
fragment_su_logged_ic_compare_success,
|
new HashSet(Arrays.asList(
|
background_and_border_fragment.bottomBackground2,
|
background_and_border_fragment.bottomBlurView2
|
))
|
);
|
backgroundAndBorderViews.put(
|
fragment_su_logged_ic_wait_face,
|
new HashSet(Arrays.asList(
|
background_and_border_fragment.bottomBackground2,
|
background_and_border_fragment.bottomBlurView2
|
))
|
);
|
|
backgroundAndBorderViews.put(
|
fragment_su_logged_nic_wait_face,
|
new HashSet(Arrays.asList(
|
background_and_border_fragment.bottomBackground2,
|
background_and_border_fragment.bottomBlurView2
|
))
|
);
|
|
backgroundAndBorderViews.put(fragment_admin_password_login,
|
new HashSet(Arrays.asList(
|
background_and_border_fragment.topBackground2,
|
background_and_border_fragment.topBlurView2
|
)));
|
backgroundAndBorderViews.put(fragment_admin_password_login,
|
new HashSet(Arrays.asList(
|
background_and_border_fragment.topBackground2,
|
background_and_border_fragment.topBlurView2
|
)));
|
|
backgroundAndBorderViews.put(fragment_su_auto_ic_compare_success,
|
new HashSet(Arrays.asList(
|
background_and_border_fragment.topBackground2,
|
background_and_border_fragment.topBlurView2
|
)));
|
|
backgroundAndBorderViews.put(fragment_person_manage,
|
new HashSet(Arrays.asList(
|
background_and_border_fragment.topBackground2,
|
background_and_border_fragment.topBlurView2,
|
background_and_border_fragment.bottomBackground2,
|
background_and_border_fragment.bottomBlurView2
|
)));
|
|
|
backgroundAndBorderViews.put(fragment_rule_detail,
|
new HashSet(Arrays.asList(
|
background_and_border_fragment.fullscreenBackground,
|
background_and_border_fragment.fullscreenBlurView
|
)));
|
|
|
backgroundAndBorderViews.put(fragment_visit_record_list,
|
new HashSet(Arrays.asList(
|
background_and_border_fragment.topBackground3,
|
background_and_border_fragment.topBlurView3,
|
background_and_border_fragment.bottomBackground3,
|
background_and_border_fragment.bottomBlurView3
|
)));
|
|
backgroundAndBorderViews.put(fragment_rule_list,
|
new HashSet(Arrays.asList(
|
background_and_border_fragment.fullscreenBackground,
|
background_and_border_fragment.fullscreenBlurView
|
)));
|
|
backgroundAndBorderViews.put(fragment_base_setting,
|
new HashSet(Arrays.asList(
|
background_and_border_fragment.topBackground1,
|
background_and_border_fragment.topBlurView1
|
)));
|
|
backgroundAndBorderViews.put(fragment_device_setting,
|
new HashSet(Arrays.asList(
|
background_and_border_fragment.topBackground1,
|
background_and_border_fragment.topBlurView1
|
)));
|
|
backgroundAndBorderViews.put(fragment_cluster_setting,
|
new HashSet(Arrays.asList(
|
background_and_border_fragment.topBackground1,
|
background_and_border_fragment.topBlurView1
|
)));
|
|
backgroundAndBorderViews.put(fragment_account_setting,
|
new HashSet(Arrays.asList(
|
background_and_border_fragment.topBackground1,
|
background_and_border_fragment.topBlurView1
|
)));
|
backgroundAndBorderViews.put(fragment_hint_recognize,
|
new HashSet(Arrays.asList(
|
background_and_border_fragment.topBackground1,
|
background_and_border_fragment.topBlurView1
|
)));
|
backgroundAndBorderViews.put(fragment_hint_sign_up,
|
new HashSet(Arrays.asList(
|
background_and_border_fragment.topBackground1,
|
background_and_border_fragment.topBlurView1
|
)));
|
backgroundAndBorderViews.put(fragment_hint_door_access,
|
new HashSet(Arrays.asList(
|
background_and_border_fragment.topBackground1,
|
background_and_border_fragment.topBlurView1
|
)));
|
backgroundAndBorderViews.put(fragment_time_rule,
|
new HashSet(Arrays.asList(
|
background_and_border_fragment.topBackground1,
|
background_and_border_fragment.topBlurView1
|
)));
|
backgroundAndBorderViews.put(fragment_time_rule_add,
|
new HashSet(Arrays.asList(
|
background_and_border_fragment.topBackground1,
|
background_and_border_fragment.topBlurView1
|
)));
|
|
backgroundAndBorderViews.put(fragment_business_person,
|
new HashSet(Arrays.asList(
|
background_and_border_fragment.topBackground4,
|
background_and_border_fragment.topBlurView4,
|
background_and_border_fragment.bottomBackground4,
|
background_and_border_fragment.bottomBlurView4
|
)));
|
|
}
|
|
public void toggleBackgroundAndBorderComponent(BaseFragment showFragment) {
|
if (backgroundAndBorderViews.containsKey(showFragment)) {
|
showOneFragment(fragment_background_and_border);
|
} else {
|
hideOneFragment(fragment_background_and_border);
|
}
|
}
|
|
}
|