本文整理汇总了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);
}
}
示例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);
}
示例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();
}