类android.support.v4.view.TintableBackgroundView源码实例Demo

下面列出了怎么用android.support.v4.view.TintableBackgroundView的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: Locate-driver   文件: MainActivity.java
private void updateUI() {
    ((Button) this.findViewById(R.id.running_button)).setText((running) ? getResources().getString(R.string.stop) : getResources().getString(R.string.start));
    ((TintableBackgroundView) (Button) this.findViewById(R.id.running_button)).setSupportBackgroundTintList(ColorStateList.valueOf(getResources().getColor((running) ? R.color.colorAccent : R.color.colorPrimary)));
    ((TintableBackgroundView) (Button) this.findViewById(R.id.send_button)).setSupportBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorPrimary)));
}
 
 类所在包
 类方法
 同包方法