Android 我的listview没有';不显示最后一项

Android 我的listview没有';不显示最后一项,android,listview,Android,Listview,最后一项未显示。请帮忙。试试这个 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" tools:

最后一项未显示。请帮忙。

试试这个

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="info.androidhive.materialtabs.fragments.OneFragment">

    <ListView
        android:id="@+id/olaylar_liste"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"></ListView>
</LinearLayout>

添加此主要活动:

<ListView

        android:id="@+id/lv_content"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:background="@color/bg_listview"
        android:dividerHeight="1dp">

正如您看到的,您的设备比
列表视图的内容小一点

解决方案1。 将至少带有
20dp
值的
paddingBottom
添加到olaylar\u列表
ListView

如果“上一步”不起作用,也可以尝试添加
marginBottom=“20dp”

解决方案2。 尝试实现如下所示的
ScrollView

@Override
protected void onResume() {
    super.onResume();
    View decorView = getWindow().getDecorView();
    decorView.setSystemUiVisibility( View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
            );
}

//这家伙会有用的
另请阅读:


希望它有帮助

将这一行添加到您的Viewpager中

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="info.androidhive.materialtabs.fragments.OneFragment">

  <ScrollView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="20dp"> //THIS GUY would be useful

    <ListView
        android:id="@+id/olaylar_liste"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
    </ListView>

  </ScrollView> 

</LinearLayout>
因为底部没有的大小正好是
工具栏所采用的大小

这应该是隐藏
(使用新的安卓设计)
当你到达底部时

android:layout_marginBottom="?attr/actionBarSize"

将android:paddingBottom添加到ViewFlipper中,我觉得它很管用

    <android.support.v4.view.ViewPager
        android:id="@+id/container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginBottom="?attr/actionBarSize"
        app:layout_behavior="@string/appbar_scrolling_view_behavior" />

使用de.codecrafters中的tableview进行Im:

<ViewFlipper
   xmlns:android="http://schemas.android.com/apk/res/android"
   xmlns:tools="http://schemas.android.com/tools"
   android:id="@+id/fragment_workorder_list_viewFlipper"
   android:layout_width="match_parent"
   android:layout_height="fill_parent"
   android:paddingBottom="?attr/actionBarSize">

添加这一行对我来说很有魅力:

android:layout_marginBottom=“?attr/actionBarSize”

使用此

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.example.vlad.zimmer.porProgramar$PlaceholderFragment">
    <de.codecrafters.tableview.TableView
        android:id="@+id/tableView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="?attr/actionBarSize"
        />
</RelativeLayout>

您必须设置 android:paddingBottom=“”在列表视图或recyclerview中

 <FrameLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent">
                    <ListView
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content">

                    </ListView>
    </FrameLayout>


将android:layout\u height=“0dp”添加到我的ListView中,并将android:layout\u height=“wrap\u content”添加到我的ListView的父视图组中,解决了这个问题
在listviewpost项listView xml和完整代码适配器中如果您使用的是android.support.design.widget.Coordinator布局,则必须使用循环视图问题应该是您的视图寻呼机与父级不匹配。确保屏幕正确显示。拯救了我的一天。谢天谢地。谢谢。
app:layout\u behavior=“@string/appbar\u scrolling\u view\u behavior”
这一行正是我需要的,谢谢。这到底是什么意思?ScroolView中的ListView=坏习惯。你不能将“”值设置为android:paddingBottom@Elenasys我知道实际上我想说的是为paddingBottom设置一个值,而不是空值
    <android.support.v7.widget.RecyclerView
    android:id="@+id/recycler_prod_category"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:layout_constraintRight_toRightOf="parent"
    android:paddingBottom="?attr/actionBarSize"
    app:layout_constraintTop_toTopOf="parent">
</android.support.v7.widget.RecyclerView>