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


Java RelativeLayout.removeAllViews方法代碼示例

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


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

示例1: setupIndicator

import android.widget.RelativeLayout; //導入方法依賴的package包/類
public void setupIndicator(RelativeLayout indicator) {
    this.indicator = indicator;
    if (indicator == null) {
        return;
    }
    if (indicator.getChildCount() > 0) {
        indicator.removeAllViews();
    }
    ringList = new ArrayList<ImageView>();
    RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
    lp.addRule(RelativeLayout.CENTER_IN_PARENT, RelativeLayout.TRUE);
    LinearLayout ll = new LinearLayout(context);
    ll.setLayoutParams(lp);
    indicator.addView(ll);
    LinearLayout.LayoutParams lpp = new LinearLayout.LayoutParams(DisplayUtil.dp2px(7), DisplayUtil.dp2px(7));
    for (int i = 0; i < pageCount; i++) {
        ImageView iv = new ImageView(context);
        iv.setLayoutParams(lpp);
        if (pageCount == 1) {
            iv.setBackgroundResource(R.drawable.ring_imageview_select);
        }
        if (i > 0) {
            lpp.leftMargin = DisplayUtil.dp2px(3);
        }
        ringList.add(iv);
        ll.addView(iv);
    }
}
 
開發者ID:wzc25151,項目名稱:lrs_android,代碼行數:29,代碼來源:AutoScrollViewPager.java

示例2: loadVipAuthenticationView

import android.widget.RelativeLayout; //導入方法依賴的package包/類
public void loadVipAuthenticationView() {
    LogInfo.log("FloatingWindowPlayer", "該集為VIP劇集,加載開通VIP會員界麵");
    if (this.mVipAuthView == null) {
        this.mVipAuthView = new FloatingWindowPlayerVipAuthenticationView(this.mContext);
    }
    this.mVipAuthView.setController(this.mFloatingWindowPlayerController);
    this.mVipAuthView.setVisibility(0);
    RelativeLayout container = (RelativeLayout) findViewById(R.id.view_container);
    container.removeAllViews();
    container.addView(this.mVipAuthView);
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:12,代碼來源:FloatingWindowPlayerView.java

示例3: onConfigurationChanged

import android.widget.RelativeLayout; //導入方法依賴的package包/類
@Override
public void onConfigurationChanged(Configuration newConfig) {
    MLog.d(TAG, "changing conf");
    removeFragment(mConnectionInfoFragment);
    removeFragment(mEmptyFragment);
    removeFragment(mProjectListFragment);
    removeFragment(mFolderListFragment);
    if (mCombinedFolderAndProjectFragment != null) removeFragment(mCombinedFolderAndProjectFragment);
    RelativeLayout mainContent = (RelativeLayout) findViewById(R.id.main_content);
    mainContent.removeAllViews();
    super.onConfigurationChanged(newConfig);
    loadUI();
}
 
開發者ID:victordiaz,項目名稱:phonk,代碼行數:14,代碼來源:MainActivity.java


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