【发布时间】:2018-10-18 01:22:24
【问题描述】:
这是我的 XML:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
tools:context=".MainActivity">
<LinearLayout
android:id="@+id/logoLayout"
android:layout_width="150dp"
android:layout_height="40dp"
android:layout_marginLeft="120dp"
android:layout_marginTop="25dp"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:srcCompat="@drawable/csr_logo2" />
</LinearLayout>
<LinearLayout
android:id="@+id/lineLayout"
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_below="@+id/logoLayout"
android:layout_marginBottom="15dp"
android:layout_marginTop="5dp"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView4"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/dotted_line"
app:srcCompat="@drawable/dotted_line" />
<ImageView
android:id="@+id/imageView5"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:srcCompat="@drawable/normal_line" />
</LinearLayout>
<android.support.design.widget.TabLayout
android:id="@+id/tabLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:minHeight="?attr/actionBarSize"
android:textColor="@color/black"
android:theme="@style/AppTheme"
app:tabMode="scrollable" />
<com.example.sparsh.newcsraudit.CustomViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</com.example.sparsh.newcsraudit.CustomViewPager>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:id="@+id/completeBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:text="Complete Audit" />
</LinearLayout>
</LinearLayout>
“按钮”未显示在布局中。
我的按钮需要显示在布局的每个类别中。 尝试将按钮添加到包含类别的我的活动中,但它不起作用。
尝试进行调整,但没有成功。
另外,网上找了类似的问题,没找到解决办法。
如何使按钮显示在布局中。
请帮忙!
【问题讨论】:
-
你解决了吗