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

Android 添加片段时如何显示按钮?,android,android-viewpager,Android,Android Viewpager,添加片段后,底部按钮(234)不显示。我不想调整片段大小 Home\u Fragment.xml这是主片段页面。它也有配置文件片段。从概要文件片段中,我们调用下一个隐藏底部按钮的片段(TV_聊天按钮名称) 请提供问题的完整代码,看起来您可以使用button.bringToFront()函数来解决问题problem@HamzaIqbal我试过了。但它不起作用。请在问题中添加XML和Java代码。您的按钮(234)是否属于活动?如果是,请提供添加的活动布局文件@朱拜耶 <Relativ

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

Home\u Fragment.xml这是主片段页面。它也有配置文件片段。从概要文件片段中,我们调用下一个隐藏底部按钮的片段(TV_聊天按钮名称)



请提供问题的完整代码,看起来您可以使用button.bringToFront()函数来解决问题problem@HamzaIqbal我试过了。但它不起作用。请在问题中添加XML和Java代码。您的按钮(234)是否属于活动?如果是,请提供添加的活动布局文件@朱拜耶
<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>