【发布时间】:2017-06-30 15:08:48
【问题描述】:
无法在框架布局中选择微调器下拉列表。这是代码。预先感谢您的帮助。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TabHost
android:id="@+id/tab_host"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TabWidget
android:id="@android:id/tabs"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Spinner
android:id="@+id/ddlSsid"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="50dp" />
<include layout="@layout/information" />
<include layout="@layout/network" />
<include layout="@layout/ping_ip_setting" />
<include layout="@layout/scan_information" />
</FrameLayout>
</LinearLayout>
</TabHost>
</LinearLayout>
如果微调器设置在 FrameLayout 之外也可以。非常感谢您的所有帮助:)
【问题讨论】:
-
TabHost 已弃用。请改用 TabLayout。