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


Java View.findViewWithTag方法代碼示例

本文整理匯總了Java中android.view.View.findViewWithTag方法的典型用法代碼示例。如果您正苦於以下問題:Java View.findViewWithTag方法的具體用法?Java View.findViewWithTag怎麽用?Java View.findViewWithTag使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.view.View的用法示例。


在下文中一共展示了View.findViewWithTag方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setRetryListener

import android.view.View; //導入方法依賴的package包/類
/**
 * 設置各狀態點擊重試事件
 *
 * @param statusView 狀態界麵
 */
private void setRetryListener(View statusView) {
    View retry = statusView.findViewWithTag(StatusLayout.TAG_RETRY);
    if (null != retry) {
        retry.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                mListener = mLayout.getOnStatusRetryListener();
                if (null != mListener) {
                    if (null != mLayout) {
                        mLayout.showLoading();
                    }
                    mListener.onRetry();
                }
            }
        });
    }
}
 
開發者ID:yhyzgn,項目名稱:Widgets,代碼行數:23,代碼來源:StaLayoutHelper.java

示例2: onClick

import android.view.View; //導入方法依賴的package包/類
@Override
public void onClick(View view) {
    // Extract day selected
    ViewGroup dayOfMonthContainer = (ViewGroup) view;
    String tagId = (String) dayOfMonthContainer.getTag();
    tagId = tagId.substring(mContext.getString(R.string.day_of_month_container).length(), tagId.length());
    final TextView dayOfMonthText = (TextView) view.findViewWithTag(mContext.getString(R.string.day_of_month_text) + tagId);

    // Fire event
    final Calendar calendar = Calendar.getInstance();
    calendar.setFirstDayOfWeek(mFirstDayOfWeek);
    calendar.setTime(mCalendar.getTime());
    calendar.set(Calendar.DAY_OF_MONTH, Integer.valueOf(dayOfMonthText.getText().toString()));
    setDateAsSelected(calendar.getTime());

    //Set the current day color
    setCurrentDay(mCalendar.getTime());

    if (mOnDateClickListener != null) {
        mOnDateClickListener.onDateClick(calendar.getTime());
    }
}
 
開發者ID:DSM-DMS,項目名稱:DMS,代碼行數:23,代碼來源:CalendarView.java

示例3: refreshVisibleItems

import android.view.View; //導入方法依賴的package包/類
private void refreshVisibleItems(int firstPosition, int curPosition, int offset) {
    for (int i = curPosition - offset; i <= curPosition + offset; i++) {
        View itemView = getChildAt(i - firstPosition);
        if (itemView == null) {
            continue;
        }
        TextView textView = (TextView) itemView.findViewWithTag(ITEM_TAG_TEXT);
        refreshTextView(i, curPosition, itemView, textView);
    }
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:11,代碼來源:WheelListView.java

示例4: setRetryListener

import android.view.View; //導入方法依賴的package包/類
/**
 * 設置各狀態點擊重試事件
 *
 * @param statusView 狀態界麵
 */
private void setRetryListener(View statusView) {
    View retry = statusView.findViewWithTag(TAG_RETRY);
    if (null != retry) {
        retry.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View view) {
                if (null != mListener) {
                    showLoading();
                    mListener.onRetry();
                }
            }
        });
    }
}
 
開發者ID:yhyzgn,項目名稱:Widgets,代碼行數:20,代碼來源:StatusLayout.java

示例5: onCreate

import android.view.View; //導入方法依賴的package包/類
@Override
protected void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    application = getWalletApplication();
    config = application.getConfiguration();
    wallet = application.getWallet();

    setContentView(R.layout.wallet_content);

    final View exchangeRatesFragment = findViewById(R.id.wallet_main_twopanes_exchange_rates);
    if (exchangeRatesFragment != null)
        exchangeRatesFragment.setVisibility(Constants.ENABLE_EXCHANGE_RATES ? View.VISIBLE : View.GONE);

    if (savedInstanceState == null) {
        final View contentView = findViewById(android.R.id.content);
        final View slideInLeftView = contentView.findViewWithTag("slide_in_left");
        if (slideInLeftView != null)
            slideInLeftView.startAnimation(AnimationUtils.loadAnimation(this, R.anim.slide_in_left));
        final View slideInRightView = contentView.findViewWithTag("slide_in_right");
        if (slideInRightView != null)
            slideInRightView.startAnimation(AnimationUtils.loadAnimation(this, R.anim.slide_in_right));
        final View slideInTopView = contentView.findViewWithTag("slide_in_top");
        if (slideInTopView != null)
            slideInTopView.startAnimation(AnimationUtils.loadAnimation(this, R.anim.slide_in_top));
        final View slideInBottomView = contentView.findViewWithTag("slide_in_bottom");
        if (slideInBottomView != null)
            slideInBottomView.startAnimation(AnimationUtils.loadAnimation(this, R.anim.slide_in_bottom));

        checkSavedCrashTrace();
    }

    config.touchLastUsed();

    handleIntent(getIntent());

    final FragmentManager fragmentManager = getFragmentManager();
    MaybeMaintenanceFragment.add(fragmentManager);
    AlertDialogsFragment.add(fragmentManager);
}
 
開發者ID:guodroid,項目名稱:okwallet,代碼行數:41,代碼來源:WalletActivity.java

示例6: onSelectorModeExit

import android.view.View; //導入方法依賴的package包/類
@Override
public void onSelectorModeExit() {
    final View rootView = ((Activity) nestedRecyclerView.getContext())
            .findViewById(R.id.root_view);

    //find selector-toolbar
    final Toolbar selectorToolbar = rootView
            .findViewWithTag(SelectorModeUtil.SELECTOR_TOOLBAR_TAG);

    //animate selector-toolbar
    selectorToolbar.animate()
            .translationY(-selectorToolbar.getHeight())
            .setListener(new AnimatorListenerAdapter() {
                @Override
                public void onAnimationEnd(Animator animation) {
                    super.onAnimationEnd(animation);

                    if (theme.darkStatusBarIcons()) {
                        Util.setDarkStatusBarIcons(rootView);
                    } else {
                        Util.setLightStatusBarIcons(rootView);
                    }

                    //remove selector-toolbar
                    ((ViewGroup) rootView).removeView(selectorToolbar);
                }
            });
}
 
開發者ID:kollerlukas,項目名稱:Camera-Roll-Android-App,代碼行數:29,代碼來源:NestedRecyclerViewAlbumHolder.java

示例7: IconHolder

import android.view.View; //導入方法依賴的package包/類
IconHolder(View itemView) {
    super(itemView);

    ivIcon = (ImageView) itemView.findViewWithTag("iv");
}
 
開發者ID:by-syk,項目名稱:NanoIconPackLite,代碼行數:6,代碼來源:LiteIconActivityV1.java

示例8: CateHolder

import android.view.View; //導入方法依賴的package包/類
CateHolder(View itemView) {
    super(itemView);

    tvCate = (TextView) itemView.findViewWithTag("cate");
    tvCount = (TextView) itemView.findViewWithTag("count");
}
 
開發者ID:by-syk,項目名稱:NanoIconPackLite,代碼行數:7,代碼來源:LiteIconActivity.java


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