当前位置: 首页>>代码示例>>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;未经允许,请勿转载。