【问题标题】:Android action tab listener makes my layout hideAndroid 操作选项卡侦听器使我的布局隐藏
【发布时间】:2015-05-11 21:47:49
【问题描述】:

In my main activity contains actionbar tablistener, when the tab is swipe or tab then i load the fragment based on the selection, now fragment listview hides below the main activity action bar, 请参阅下面的屏幕截图

我的 XML 代码:

<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="match_parent"
        android:layout_height="200dp"
        android:scaleType="fitXY"
        android:src="@drawable/building" />

    <RelativeLayout
        android:id="@+id/headertext"
        android:layout_width="match_parent"
        android:layout_height="40dp"
        android:layout_below="@+id/imageView1"
        android:background="@drawable/item_background" >

        <TextView
            android:id="@+id/textView1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:text="Sample list view"
            android:textColor="@android:color/white"
            android:textSize="20sp" />
    </RelativeLayout>

</RelativeLayout>

【问题讨论】:

    标签: android tabs android-actionbar


    【解决方案1】:

    Android 操作选项卡监听器使我的布局隐藏 final ActionBar actionBar = getActionBar(); actionBar.setNavigationMode(actionBar.NAVIGATION_MODE_STANDARD);

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-03
      • 2021-08-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多