添加片段时如何显示按钮?

时间:2018-05-15 11:16:14

标签: android android-viewpager

添加片段后未显示底部按钮(234)。我不想调整片段大小。

Viewpager Front page

After Adding Fragment

Home_Fragment.xml 这是主要的Fragment页面。它还有个人资料片段。从Profile Fragment我们调用隐藏底部按钮的下一个片段(TV_Chat按钮名称)

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/white">

    <!-- View pager to swipe views -->
    <Button
        android:id="@+id/button3"
        android:layout_width="125dp"
        android:layout_height="59dp"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
        android:layout_marginBottom="0dp"
        android:background="@color/white"
        android:text="" />

    <com.medyc.us.customViews.CustomViewPager
        android:id="@+id/viewpager"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_above="@+id/tabLayout"
        android:background="@color/light_background"
        />

    <Button
        android:id="@+id/tv_chat"
        android:layout_width="60dp"
        android:layout_height="60dp"
        android:background="@drawable/circle_blue_gradient"
        android:text="234"
        android:gravity="center"
        android:textSize="@dimen/twenty_sp"
        android:textColor="@color/white"
        android:textStyle="bold"
        android:visibility="visible"
        android:fontFamily="@font/helvetica"
        android:layout_centerHorizontal="true"
        android:layout_alignBottom="@+id/tabLayout"
        android:layout_marginBottom="@dimen/thirty_dp"
        />
    <!-- our tablayout to display tabs  -->
    <android.support.design.widget.TabLayout
        android:id="@+id/tabLayout"
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:layout_alignParentBottom="true"
        app:tabIndicatorHeight="0dp"
        />

    <View
        android:id="@+id/bottomview"
        android:layout_width="match_parent"
        android:layout_height="43dp"
        android:layout_alignParentBottom="true"

        android:layout_alignParentStart="true"
        android:layout_marginBottom="50dp" />


</RelativeLayout>

0 个答案:

没有答案
相关问题