My listview doesn't show last item

后端 未结 9 972
一个人的身影
一个人的身影 2021-01-01 03:30


        
相关标签:
9条回答
  • 2021-01-01 04:01

    Im using tableview from de.codecrafters:

    <?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>
    

    Adding this line, works for me like a charm:

    android:layout_marginBottom="?attr/actionBarSize"

    0 讨论(0)
  • 2021-01-01 04:05

    Add android:paddingBottom to ViewFlipper it works for me.

    <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">
    
    0 讨论(0)
  • 2021-01-01 04:06

    Add this MainActivity:

    @Override
    protected void onResume() {
        super.onResume();
        View decorView = getWindow().getDecorView();
        decorView.setSystemUiVisibility( View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                );
    }
    
    0 讨论(0)
  • 2021-01-01 04:07

    Try this.

    <ListView
    
            android:id="@+id/lv_content"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:background="@color/bg_listview"
            android:dividerHeight="1dp">
    
    0 讨论(0)
  • 2021-01-01 04:10

    as you see your device is a bit smaller than content of your ListView.

    Solution 1.

    Add paddingBottom with at least 20dp value to your olaylar_liste ListView.

    Try also if previous doesn't work, adding also marginBottom="20dp".

    Solution 2.

    Try to implement ScrollView like below:

    <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>
    

    Read also: Working with the ScrollView

    Hope it help

    0 讨论(0)
  • 2021-01-01 04:18

    Adding android:layout_height="0dp" to my ListView and android:layout_height="wrap_content" to the parent ViewGroup of my ListView solved the problem

    0 讨论(0)
提交回复
热议问题