本文整理匯總了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);
}
}
}