本文整理汇总了Java中android.widget.CheckedTextView.getTag方法的典型用法代码示例。如果您正苦于以下问题:Java CheckedTextView.getTag方法的具体用法?Java CheckedTextView.getTag怎么用?Java CheckedTextView.getTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.widget.CheckedTextView
的用法示例。
在下文中一共展示了CheckedTextView.getTag方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setTabsDisplay
import android.widget.CheckedTextView; //导入方法依赖的package包/类
/**
* 设置底部导航中图片显示状态和字体颜色
*/
public void setTabsDisplay(int index) {
if (mAttrTa != null) {
int isSpecial = mAttrTa.getInt(index, 0);
if (isSpecial != 0) {
return;
}
}
int size = mCheckedList.size();
for (int i = 0; i < size; i++) {
CheckedTextView checkedTextView = mCheckedList.get(i);
if ((Integer) (checkedTextView.getTag()) == index) {
LogUtils.i(mLabels[index] + " is selected...");
checkedTextView.setChecked(true);
} else {
checkedTextView.setChecked(false);
}
}
}
示例2: setBusy
import android.widget.CheckedTextView; //导入方法依赖的package包/类
public void setBusy(boolean busy, AbsListView view) {
mBusy = busy;
if(!mBusy) {
Resources r = mContext.getResources();
float px = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 48, r.getDisplayMetrics());
int first = view.getFirstVisiblePosition();
int count = view.getChildCount();
for (int i=0; i<count; i++) {
CheckedTextView t = (CheckedTextView)view.getChildAt(i);
if (t.getTag() != null) {
ResolveInfo ri = mData.get(first+i);
Drawable d = ri.loadIcon(mPackageManager);
//only replace the icons that were too large
if(d.getIntrinsicHeight() > px) {
Log.d(getClass().getSimpleName(), String.format("RESIZING icon => %d us => %s", d.getIntrinsicHeight(), px));
d = resize(r, d, (int) px);
t.setCompoundDrawablesWithIntrinsicBounds(d, null, null, null);
}
//t.setTag(null);
}
}
}
}
示例3: updateTabsDisplay
import android.widget.CheckedTextView; //导入方法依赖的package包/类
/**
* 更新底部导航中图片显示状态和字体颜色
*/
public void updateTabsDisplay(Context context, int index,List<Drawable> listIcon) {
int size = mCheckedList.size();
for (int i = 0; i < size; i++) {
CheckedTextView checkedTextView = mCheckedList.get(i);
if ((Integer) (checkedTextView.getTag()) == index) {
LogUtils.i(mLabels[index] + " is selected...");
checkedTextView.setChecked(true);
} else {
checkedTextView.setChecked(false);
}
checkedTextView.setCompoundDrawables(null, listIcon.get(i), null, null);
}
}
示例4: setupNoResultsUI
import android.widget.CheckedTextView; //导入方法依赖的package包/类
private void setupNoResultsUI(boolean isLoading) {
if (!isAdded()) {
return;
}
// Hide the legend
mLegendContainer.setVisibility(View.GONE);
mVisitorsCheckboxContainer.setVisibility(View.GONE);
mSelectedBarGraphBarIndex = -1;
Context context = mGraphContainer.getContext();
if (context != null) {
LayoutInflater inflater = LayoutInflater.from(context);
View emptyBarGraphView = inflater.inflate(R.layout.stats_bar_graph_empty, mGraphContainer, false);
// We could show loading indicator here
if (isLoading) {
final TextView emptyLabel = (TextView) emptyBarGraphView.findViewById(R.id.stats_bar_graph_empty_label);
emptyLabel.setText("");
}
if (emptyBarGraphView != null) {
mGraphContainer.removeAllViews();
mGraphContainer.addView(emptyBarGraphView);
}
}
mDateTextView.setText("");
for (int i=0 ; i < mModuleButtonsContainer.getChildCount(); i++) {
View o = mModuleButtonsContainer.getChildAt(i);
if (o instanceof CheckedTextView) {
CheckedTextView currentBtm = (CheckedTextView)o;
OverviewLabel overviewItem = (OverviewLabel)currentBtm.getTag();
String labelPrefix = overviewItem.getLabel() + "\n 0" ;
currentBtm.setText(labelPrefix);
}
}
}