2017-06-11 14 views
0

は、ここで私は最初のアクティビティを開くといけない見える私のレイアウトボタンが消え

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:app="http://schemas.android.com/apk/res-auto" 
xmlns:tools="http://schemas.android.com/tools" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:orientation="vertical" 
tools:context="com.example.esraabalbaa.graduationproject.CartActivity">`enter code here <android.support.v7.widget.Toolbar 
    android:id="@+id/toolb" 
    android:layout_width="match_parent" 
    android:layout_height="?attr/actionBarSize" 
    android:background="#009688" 
    app:popupTheme="@style/AppTheme.PopupOverlay" > 
    <ImageView 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:id="@+id/gotoback" 
     android:src="@drawable/ic_arrow_back_black_24dp" 
     android:layout_alignParentRight="true" 
     android:clickable="true" 
     /> 
    <TextView 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="Cart" 
     android:padding="10dp" 
     android:textSize="20dp" 
     android:textColor="#ffffff"/> 
    <TextView 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:padding="10dp" 
     android:textSize="20dp" 
     android:id="@+id/selecteditemcounter" 
     android:textColor="#ffffff"/> 
    </android.support.v7.widget.Toolbar> 
<android.support.v7.widget.RecyclerView 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:id="@+id/mycartrecycler"/> 
<Button 
    android:layout_width="match_parent" 
    android:layout_height="50dp" 
    android:id="@+id/checkoutsummary" 
    android:layout_alignParentBottom="true" 
    android:text="Checkout" 
    android:textAlignment="center" 
    android:textSize="20dp"/> 

recyclerview下のボタンを表示するイム、ボタンと私は思いからアイテムをDELETときにのみ表示されませんrecyclerviewので、何が問題ですか?

答えて

0

レイアウトの重みを使用して、このような何かを試してみてください:

<?xml version="1.0" encoding="utf-8"?> 
    <LinearLayout 
     xmlns:android="http://schemas.android.com/apk/res/android" 
     xmlns:app="http://schemas.android.com/apk/res-auto" 
     xmlns:tools="http://schemas.android.com/tools" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:orientation="vertical" 
     android:padding="20dp" 
     android:weightSum="1" 
     tools:context=".MainActivity"> 

    <android.support.v7.widget.RecyclerView 
     android:id="@+id/recyclerView" 
     android:layout_width="match_parent" 
     android:layout_height="0dip" 
     android:layout_weight=".90" /> 

    <Button 
     android:id="@+id/addToDo" 
     android:layout_width="match_parent" 
     android:layout_height="0dip" 
     android:layout_weight=".10" 
     android:text="Add Item" /> 

</LinearLayout> 
関連する問題