/**
  * use SytemBarTintManager
  *
  * @param tintDrawable
  */
 public void setSystemBarTintDrawable(Drawable tintDrawable) {
   if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
     SystemBarTintManager mTintManager = new SystemBarTintManager(this);
     if (tintDrawable != null) {
       mTintManager.setStatusBarTintEnabled(true);
       mTintManager.setTintDrawable(tintDrawable);
     } else {
       mTintManager.setStatusBarTintEnabled(false);
       mTintManager.setTintDrawable(null);
     }
   }
 }
 private void setupTint() {
   SystemBarTintManager tintManager = new SystemBarTintManager(this);
   tintManager.setStatusBarTintEnabled(true);
   tintManager.setStatusBarTintColor(getResources().getColor(R.color.red));
   tintManager.setNavigationBarTintEnabled(true);
   tintManager.setNavigationBarTintColor(getResources().getColor(R.color.red));
 }
Exemplo n.º 3
0
 private void setUpSystembar() {
   if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
     SystemBarTintManager tintManager = new SystemBarTintManager(this);
     tintManager.setStatusBarTintEnabled(true);
     tintManager.setStatusBarTintResource(R.color.colorPrimaryDark);
   }
 }
Exemplo n.º 4
0
  /** 设置透明标题栏,子类调用此函数 */
  protected void initToolbar() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
      setTranslucentStatus(true);
    }

    SystemBarTintManager tintManager = new SystemBarTintManager(this);
    tintManager.setStatusBarTintEnabled(true);
    tintManager.setStatusBarTintResource(R.color.colorPrimary);
  }
Exemplo n.º 5
0
 @Override
 public void setContentView(int layoutResID) {
   super.setContentView(layoutResID);
   SystemBarTintManager tintManager = new SystemBarTintManager(this);
   tintManager.setStatusBarTintEnabled(true);
   tintManager.setTintColor(getResources().getColor(R.color.system_press));
   initView();
   initData();
 }
 private void adjustSystemBarTintAsNeeded()
 {
   if (Build.VERSION.SDK_INT == 19)
   {
     SystemBarTintManager localSystemBarTintManager = new SystemBarTintManager(this);
     localSystemBarTintManager.setStatusBarTintEnabled(true);
     localSystemBarTintManager.setTintColor(getResources().getColor(R.color.primaryDark));
     localSystemBarTintManager.setStatusBarTintColor(getResources().getColor(R.color.primaryDark));
   }
 }
Exemplo n.º 7
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
     setTranslucentStatus(true);
     SystemBarTintManager tintManager = new SystemBarTintManager(this);
     tintManager.setStatusBarTintEnabled(true);
     tintManager.setStatusBarTintResource(R.color.action_bar_color);
   }
   mitchDevice(brand);
 }
Exemplo n.º 8
0
 @TargetApi(19)
 public static void setTranslucentStatusBar(Activity activity, NavigationView navigationView) {
   if (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT && navigationView != null) {
     // fix 天坑 4.4 + drawerlayout + navigationView
     tianKeng(activity, activity.getResources().getColor(R.color.primary), navigationView);
   } else {
     if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
       activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
       SystemBarTintManager tintManager = new SystemBarTintManager(activity);
       tintManager.setStatusBarTintEnabled(true);
       tintManager.setStatusBarTintColor(activity.getResources().getColor(R.color.primary));
     }
   }
 }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.detailed_info);

    telephone = "10086";

    dpview = (TextView) findViewById(R.id.Description);
    dpview.setText("������ʾ��Ҫ��Ϣ...");

    call = (Button) findViewById(R.id.Call);
    join = (Button) findViewById(R.id.Join);
    // return_back = (TextView) findViewById(R.id.Return);
    open_close = (TextView) findViewById(R.id.OpenOrClose);
    open_close.setText("�鿴���� ��");

    call.setOnClickListener(this);
    join.setOnClickListener(this);
    // return_back.setOnClickListener(this);
    open_close.setOnClickListener(this);
    // �Զ���ActionBar
    final ActionBar actionBar = getActionBar();
    actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
    actionBar.setCustomView(R.layout.actionbar_detail_info); // �Զ���ActionBar����

    // ָ��״̬����ɫ
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
      setTranslucentStatus(true);
    }
    SystemBarTintManager tintManager = new SystemBarTintManager(this);
    tintManager.setStatusBarTintEnabled(true);
    tintManager.setStatusBarTintResource(R.color.blueviolet);
    mTVBack = (Button) findViewById(R.id.detailInfo_backBtn);
    mTVBack.setOnClickListener(this);

    itemList = new ArrayList<ParticipatorItem>();
    itemList.add(new ParticipatorItem(R.drawable.ghost, "����", "�����ܼ򵥣�"));
    itemList.add(new ParticipatorItem(R.drawable.ghost, "����", "�����ܼ򵥣�"));
    itemList.add(new ParticipatorItem(R.drawable.ghost, "����", "�����ܼ򵥣�"));
    itemList.add(new ParticipatorItem(R.drawable.ghost, "����", "�����ܼ򵥣�"));
    itemList.add(new ParticipatorItem(R.drawable.ghost, "����", "�����ܼ򵥣�"));
    adapter = new Adapter(this, R.layout.participator_item, itemList);

    lv = (ListView) findViewById(R.id.participatorListView);
    lv.setAdapter(adapter);
    lv.setOnItemClickListener(this);
  }
Exemplo n.º 10
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.activity_messboard);
    // 设置状态栏
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
      Window win = getWindow();
      WindowManager.LayoutParams winParams = win.getAttributes();
      final int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
      winParams.flags |= bits;
      win.setAttributes(winParams);
    }
    mTintManager = new SystemBarTintManager(this);
    mTintManager.setStatusBarTintEnabled(true);
    mTintManager.setNavigationBarTintEnabled(true);
    mTintManager.setTintColor(this.getResources().getColor(R.color.basecolor));

    initView();
    loadMess();
    initLocation();
  }