我正在動態(tài)地向適配器添加視圖,當(dāng)視圖超過屏幕邊界時,我無法看到完整視圖。我試過了,沒有任何運(yùn)氣。android:isScrollContainer="true"android:scrollbars="vertical"public void onAddField(View v) {
final LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
final View rowView = inflater.inflate(R.layout.field, null);
spin = rowView.findViewById(R.id.type_spinner2);
weightLayout = rowView.findViewById(R.id.myLayout);
getdata();
spin.setAdapter(new ArrayAdapter<String>(MainActivity.this, android.R.layout.simple_spinner_dropdown_item, arrayList2));
parentLinearLayout.addView(rowView, parentLinearLayout.getChildCount() - 1); <LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#E5E5E5"
android:orientation="vertical"
android:scrollbars="vertical"
android:isScrollContainer="true">
如何修復(fù)我的線性布局以在內(nèi)容超出視圖時向下滾動
30秒到達(dá)戰(zhàn)場
2022-09-22 16:26:00