本文整理了Java中android.widget.ScrollView.removeAllViews()
方法的一些代码示例,展示了ScrollView.removeAllViews()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ScrollView.removeAllViews()
方法的具体详情如下:
包路径:android.widget.ScrollView
类名称:ScrollView
方法名:removeAllViews
暂无
代码示例来源:origin: 1993hzw/Androids
public void onAnimationEnd(Animator animation) {
mScrollView.removeAllViews();
mPortraitShield.setVisibility(View.VISIBLE);
}
});
代码示例来源:origin: stackoverflow.com
setContentView(R.layout.activitybrowserview);
View view = LayoutInflater.from(context).inflate(R.layout.activitybrowserviewcell, null);
LinearLayout ll = (LinearLayout) view.findViewById(R.id.RelativeLayout_Activity_Streams);
ScrollView sv = (ScrollView) findViewById(R.id.activity_stream);
sv.removeAllViews();
sv.addView(ll);
代码示例来源:origin: 1993hzw/Androids
public void onAnimationEnd(
Animator animation) {
mScrollView.removeAllViews();
mScrollView.setVisibility(View.GONE);
mPortraitShield.setVisibility(View.GONE);
}
}));
代码示例来源:origin: stackoverflow.com
ScrollView sView = (ScrollView) findViewById(R.id.scrollView2)
sView.removeAllViews();
sView.setFillViewport(true);
代码示例来源:origin: wiglenet/wigle-wifi-wardriving
private void switchView() {
if (scrollView != null) {
final int orientation = getResources().getConfiguration().orientation;
View component = portrait;
if (orientation == 2) {
component = landscape;
}
scrollView.removeAllViews();
scrollView.addView(component);
}
}
代码示例来源:origin: stackoverflow.com
View bodyLayout = (View)m_dialog.findViewById(R.id.my_item);
ScrollView scroller = (ScrollView)m_dialog.findViewById(R.id.my_scroll);
ViewGroup topLayout = (ViewGroup)scroller.getParent();
ViewGroup.LayoutParams params = scroller.getLayoutParams();
int index = topLayout.indexOfChild(scroller);
scroller.removeAllViews();
topLayout.removeView(scroller);
topLayout.addView(bodyLayout, index, params);
代码示例来源:origin: stackoverflow.com
static void addlog(Activity innercont, String txt)
{
if (innercont.findViewById(255) != null)
{
TextView tadd = (TextView) innercont.findViewById(255);
String atmtxt = (String) tadd.getText();
atmtxt = atmtxt+"\n"+txt;
tadd.setText(atmtxt);
return;
}
TextView tadd = new TextView(innercont);
tadd.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT));
tadd.setText(txt);
tadd.setId(255);
layout.setOrientation(LinearLayout.VERTICAL);
layout.addView(tadd);
ScrollView scro = (ScrollView) innercont.findViewById(R.id.ScrollView1);
scro.removeAllViews();
scro.addView(layout);
innercont.setContentView(scro);
}
代码示例来源:origin: WiInputMethod/VE
/**
*
* @param texts
*/
private void setItems(List<String> texts) {
itemList.clear();
innerRelativeLayout.removeAllViews();
scrollView.removeAllViews();
for (String symbol : texts) {
Item item = getNewItem(symbol);
if (itemList.size() != 0)
item.layoutParams.addRule(RelativeLayout.BELOW, itemList.get(itemList.size() - 1).relativeLayout.getId());
itemList.add(item);
innerRelativeLayout.addView(item.relativeLayout, item.layoutParams);
}
scrollView.addView(innerRelativeLayout, innerLayoutParams);
}
代码示例来源:origin: 1993hzw/Androids
@Override
public void onClick(View v) {
if (v.getId() == R.id.register_sex_female) {
View list = View.inflate(getApplicationContext(),
R.layout.register_portrait_female_list, null);
mScrollView.removeAllViews();
mScrollView.addView(list);
showListAnim(Sex.FEMALE);
} else if (v.getId() == R.id.register_sex_male) {
View list = View.inflate(getApplicationContext(),
R.layout.register_portrait_male_list, null);
mScrollView.removeAllViews();
mScrollView.addView(list);
showListAnim(Sex.MALE);
} else if (v.getId() == R.id.register_sex_contanier) {
if (mIsShowingList) {
hideListAnim(mSelectedSex);
}
}
}
}
代码示例来源:origin: stackoverflow.com
Button btn = (Button)findViewById(R.id.button1);
btn.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
// create a new list
ArrayList<Button> list = new ArrayList<Button>();
ScrollView view = (ScrollView)findViewById(R.id.scrollView1);
// add your clicked element on position 0
list.add ( (Button) arg0 );
for ( int i = 0; i < view.getChildCount(); i++ ) {
if ( view.getChildAt(i) != arg0 ) {
list.add( (Button) view.getChildAt(i));
}
}
view.removeAllViews();
for ( int x = 0; x < list.size(); x++ ) {
view.addView(list.get(x));
list.remove(x);
}
}
});
代码示例来源:origin: wasdennnoch/AndroidN-ify
uninstallingScrollView.removeAllViews();
uninstallHolder.removeAllViews();
thisLayout.removeAllViews();
代码示例来源:origin: calvinaquino/LNReader-Android
v.removeAllViews();
v.addView(synopsis);
} else expandList.addHeaderView(synopsis);
内容来源于网络,如有侵权,请联系作者删除!