當前位置: 首頁>>代碼示例>>Java>>正文


Java CheckedTextView.getTag方法代碼示例

本文整理匯總了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);
		}
	}
}
 
開發者ID:SavorGit,項目名稱:Hotspot-master-devp,代碼行數:22,代碼來源:MyTabWidget.java

示例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);
            }
        }
	}
}
 
開發者ID:alphamu,項目名稱:android-child-lock,代碼行數:26,代碼來源:EfficientAdapter.java

示例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);
	}
}
 
開發者ID:SavorGit,項目名稱:Hotspot-master-devp,代碼行數:17,代碼來源:MyTabWidget.java

示例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);
        }
    }
}
 
開發者ID:ldsddn,項目名稱:wordpress_app_android,代碼行數:39,代碼來源:StatsVisitorsAndViewsFragment.java


注:本文中的android.widget.CheckedTextView.getTag方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。