0
에서 오버 플로우를하지 않는 것이내가 레이아웃을 만들고 싶어 tablerow
있는 LinearLayout
있는 ScrollView
있는 LinearLayout
하지만있는 ScrollView가 나머지를 다루있다처럼 보인다 LinearLayout.
LinearLayout all = new LinearLayout(this);
LinearLayout upper = new LinearLayout(this);
LinearLayout footer = new LinearLayout(this);
ScrollView sv = new ScrollView(this);
all.setOrientation(LinearLayout.VERTICAL);
upper.setOrientation(LinearLayout.HORIZONTAL);
footer.setOrientation(LinearLayout.HORIZONTAL);
TextView code = new TextView(this);
code.setText("Code : ");
EditText codeEdit = new EditText(this);
upper.addView(code);
upper.addView(codeEdit);
LinkedList<LinearLayout> lk = new LinkedList<LinearLayout>();
TextView[] tt = new TextView[100];
LinearLayout ll= new LinearLayout(this);
ll.setOrientation(LinearLayout.VERTICAL);
for(int a = 0 ; a < 100; a++){
LinearLayout temp = new LinearLayout(this);
temp.setOrientation(temp.HORIZONTAL);
tt[a] = new TextView(this);
tt[a].setText("Hello " + a);
temp.addView(tt[a]);
lk.add(temp);
ll.addView(temp);
}
sv.addView(ll);
Button next = new Button(this);
next.setText("Next");
footer.addView(next);
all.addView(upper);
all.addView(sv);
all.addView(footer);
setContentView(all);
있는 ScrollView는 너무 크고, 상기의 LinearLayout이 후에 변경할 수 없기있는 ScrollView의 도시되지 않은있는 LinearLayout의 나머지 부분을 커버한다. 어떻게 이것을 실제로 해결할 수 있습니까? 이
LinearLayout dummy = new LinearLayout(this);
dummy.setLayoutParams(new LinearLayout.LayoutParams(
LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT, 1));
dummy.addView(sv);
가 대신 scroolview이
는 감사의 LinearLayout이 더미를 추가 추가
안에있는 ScrollView를 래핑하는 하나의 LinearLayout을 추가처럼 – user3783797
선형 레이아웃의 경우 가중치입니다. –