2014-11-30 3 views
0

레이아웃에서 패널 슬라이딩 (com.sothree.slidinguppanel.SlidingUpPanelLayout), drawerlayout 및 zoomable image view를 사용하고 있습니다. 문제는 패널 확대/축소 기능을 사용하지 않을 때 작동이 시작될 때입니다. 그러나 그렇지 않다. 어떤 도움을 문제는 패널을 슬라이딩의 FrameLayout이 내부 줌이 이미지 즉 메인 화면의 내용을 배치하여 해결확대/축소 이미지가있는 패널 슬라이딩. 확대/축소가 작동하지 않습니다.

<android.support.v4.widget.DrawerLayout 
xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:fitsSystemWindows="true" 
android:id="@+id/itemlayout"> 


<FrameLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/frame_container" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent"> 

    <RelativeLayout 
     xmlns:android="http://schemas.android.com/apk/res/android" 
     xmlns:tools="http://schemas.android.com/tools" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     tools:context="com.shopistan.shopand.ZoomImage"> 

     <com.shopistan.shopand.ZoomableImageView 
      android:id="@+id/IMAGEID" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content"/> 
    </RelativeLayout> 
    <RelativeLayout 
     android:layout_marginBottom="40dp" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content"> 

     <LinearLayout 
      android:orientation="vertical" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:layout_alignParentBottom="true" 
      android:background="#ff000000" 
      android:id="@+id/layout"> 

      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:textAppearance="?android:attr/textAppearanceMedium" 
       android:text="Medium Text" 
       android:id="@+id/ProductName" 
       android:layout_marginTop="10dp" 
       android:layout_marginLeft="5dp" 
       android:textColor="#ffff0000" /> 

      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:textAppearance="?android:attr/textAppearanceSmall" 
       android:text="Small Text" 
       android:id="@+id/ProductPrice" 
       android:layout_marginTop="10dp" 
       android:layout_marginLeft="5dp" 
       android:textColor="#ffbdbdbd" /> 

      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:textAppearance="?android:attr/textAppearanceSmall" 
       android:text="In Stock" 
       android:textStyle="bold" 
       android:id="@+id/ProductSpecial" 
       android:layout_marginTop="10dp" 
       android:layout_marginBottom="20dp" 
       android:layout_marginLeft="5dp" 
       android:textColor="#ffffffff" /> 
     </LinearLayout> 

     <ImageView 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:id="@+id/imageView" 
     android:src="@drawable/addcart" 
     android:layout_alignParentRight="true" 
     android:layout_alignParentBottom="true" 
     android:layout_marginRight="20dp" 
     android:layout_marginBottom="30dp"/> 


    </RelativeLayout> 


</FrameLayout> 
<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" 
    tools:context=".DemoActivity" > 

    <com.sothree.slidinguppanel.SlidingUpPanelLayout 
     xmlns:sothree="http://schemas.android.com/apk/res-auto" 
     android:id="@+id/sliding_layout" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:gravity="bottom" 
     sothree:panelHeight="40dp" 
     sothree:shadowHeight="4dp" 
     sothree:paralaxOffset="100dp" 
     sothree:dragView="@+id/dragView"> 

     <!-- MAIN CONTENT --> 
     <FrameLayout 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:orientation="vertical"> 

     </FrameLayout> 

     <!-- SLIDING LAYOUT --> 
     <LinearLayout 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:background="#000000" 
      android:orientation="vertical" 
      android:clickable="true" 
      android:focusable="false" 
      android:id="@+id/dragView"> 

      <LinearLayout 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:layout_gravity="center" 
       android:orientation="horizontal"> 

       <TextView 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:textAppearance="?android:attr/textAppearanceSmall" 
        android:text="MORE INFO" 
        android:id="@+id/more" 
        android:layout_marginTop="10dp" 
        android:layout_marginBottom="10dp" 
        android:layout_marginLeft="150dp" 
        android:textColor="#ffbdbdbd" /> 


      </LinearLayout> 

      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:textAppearance="?android:attr/textAppearanceMedium" 
       android:text="Medium Text" 
       android:id="@+id/ProductName1" 
       android:layout_gravity="center" 
       android:layout_marginTop="10dp" 
       android:textColor="#ffff0000" /> 

      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:textAppearance="?android:attr/textAppearanceSmall" 
       android:text="Small Text" 
       android:id="@+id/ProductPrice1" 
       android:layout_marginTop="10dp" 
       android:layout_gravity="center" 
       android:textColor="#ffbdbdbd" /> 

      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:textAppearance="?android:attr/textAppearanceSmall" 
       android:text="Small Text" 
       android:id="@+id/ProductPrice2" 
       android:layout_marginTop="10dp" 
       android:layout_gravity="center" 
       android:textColor="#ffbdbdbd" /> 

      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:textAppearance="?android:attr/textAppearanceSmall" 
       android:text="In Stock" 
       android:textStyle="bold" 
       android:id="@+id/ProductSpecial1" 
       android:layout_marginTop="10dp" 
       android:layout_gravity="center" 
       android:textColor="#ffffffff" /> 
      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:textAppearance="?android:attr/textAppearanceMedium" 
       android:text="Description" 
       android:id="@+id/Desc" 
       android:layout_gravity="center" 
       android:layout_marginTop="10dp" 
       android:textColor="#ffff0000" /> 
      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:textAppearance="?android:attr/textAppearanceSmall" 
       android:text="Small Text" 
       android:id="@+id/desccon" 
       android:layout_marginTop="10dp" 
       android:minLines="1" 
       android:layout_gravity="center" 
       android:textColor="#ffbdbdbd" /> 
      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:textAppearance="?android:attr/textAppearanceMedium" 
       android:text="Care Instructions" 
       android:id="@+id/care" 
       android:layout_gravity="center" 
       android:layout_marginTop="10dp" 
       android:textColor="#ffff0000" /> 
      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:textAppearance="?android:attr/textAppearanceSmall" 
       android:text="Small Text" 
       android:id="@+id/carecon" 
       android:layout_marginTop="10dp" 
       android:layout_gravity="center" 
       android:minLines="1" 
       android:textColor="#ffbdbdbd" /> 
     </LinearLayout> 
    </com.sothree.slidinguppanel.SlidingUpPanelLayout> 

</RelativeLayout> 

<RelativeLayout 
    android:id="@+id/drawercheck" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:layout_gravity="end" 
    android:orientation="vertical" 
    android:background="#ffffffff" 
    android:layout_marginLeft="10dp" 
    > 


    <TextView 
     android:layout_width="match_parent" 
     android:layout_height="20dp" 
     android:textSize="16dp" 
     android:text="My Cart" 
     android:id="@+id/checkoutnavheadertext" 
     android:textColor="#d71920" 
     android:background="#ffffffff" 
     android:layout_marginLeft="10dp" 
     android:layout_alignParentTop="true" 
     android:layout_marginTop="5dp" 
     /> 

    <View 
     android:layout_width="fill_parent" 
     android:layout_height="1dp" 
     android:background="#d6d6d6" 
     android:layout_below="@+id/checkoutnavheadertext" 
     android:layout_marginTop="6dp"/> 

    <RelativeLayout 
     android:id="@+id/drawerchecksubheader" 
     android:layout_width="match_parent" 
     android:layout_height="30dp" 
     android:layout_gravity="end" 
     android:orientation="horizontal" 
     android:background="#ffffffff" 
     android:layout_below="@+id/checkoutnavheadertext" 
     android:layout_marginTop="11dp"> 

     <TextView 

      android:layout_width="wrap_content" 
      android:layout_height="20dp" 
      android:textSize="12dp" 
      android:text="PRODUCT" 
      android:id="@+id/checkoutnavesubheaderprof" 
      android:textColor="#000000" 
      android:background="#ffffffff" 
      android:layout_marginLeft="10dp" 
      android:layout_alignParentLeft="true" 
      /> 
     <TextView 

      android:layout_width="wrap_content" 
      android:layout_height="20dp" 
      android:textSize="12dp" 
      android:text="QTY" 
      android:id="@+id/checkoutnavesubheaderqty" 
      android:textColor="#000000" 
      android:background="#ffffffff" 
      android:layout_toLeftOf="@+id/checkoutnavesubheaderprice" 
      android:layout_marginRight="10dp"/> 
     <TextView 
      android:layout_width="wrap_content" 
      android:layout_height="20dp" 
      android:textSize="12dp" 
      android:text="PRICE(PKR)" 
      android:id="@+id/checkoutnavesubheaderprice" 
      android:textColor="#000000" 
      android:background="#ffffffff" 
      android:layout_alignParentRight="true"/> 

    </RelativeLayout> 
    <View 
     android:layout_width="fill_parent" 
     android:layout_height="1dp" 
     android:background="#d6d6d6" 
     android:layout_below="@+id/drawerchecksubheader" 
     android:layout_marginTop="6dp"/> 

    <ListView 
     android:id="@+id/checkout_slider" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:layout_gravity="end" 
     android:choiceMode="singleChoice" 
     android:dividerHeight="0dp" 
     android:divider="#ff000000" 
     android:background="#ffffffff" 
     android:listSelector="#ff000000" 
     android:layout_below="@+id/drawerchecksubheader" 
     android:layout_marginTop="9dp"/> 
    <View 
     android:layout_width="fill_parent" 
     android:layout_height="2dp" 
     android:background="#000000" 
     android:layout_marginLeft="10dp" 
     android:layout_marginRight="10dp" 
     android:layout_above="@+id/total" 
     android:layout_marginBottom="2dp"/> 

    <TextView 
     android:layout_width="wrap_content" 
     android:layout_height="30dp" 
     android:textSize="12dp" 
     android:text="TOTAL (Before Shipping):" 
     android:id="@+id/total" 
     android:textColor="#000000" 
     android:textStyle="bold" 
     android:background="#ffffffff" 
     android:layout_marginLeft="10dp" 
     android:layout_above="@+id/button" 
     android:layout_marginBottom="5dp"/> 

    <TextView 
     android:layout_width="wrap_content" 
     android:layout_height="30dp" 
     android:textSize="12dp" 
     android:text="PKR 0" 
     android:id="@+id/cost" 
     android:textColor="#000000" 
     android:textStyle="bold" 
     android:background="#ffffffff" 
     android:layout_marginRight="10dp" 
     android:layout_alignParentRight="true" 
     android:layout_above="@+id/button" 
     android:layout_marginBottom="5dp"/> 


    <Button 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:text="CHECKOUT" 
     android:textSize="16dp" 
     android:textStyle="bold" 
     android:id="@+id/button" 
     android:gravity="center" 
     android:textColor="#ffffffff" 
     android:background="#d71920" 
     android:layout_marginRight="10dp" 
     android:layout_marginLeft="10dp" 
     android:layout_alignParentBottom="true" 
     android:layout_marginBottom="15dp"/> 
</RelativeLayout> 
</android.support.v4.widget.DrawerLayout> 

답변

0

좋은 것입니다. 여기 작업 코드입니다. !!

<android.support.v4.widget.DrawerLayout 
xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:fitsSystemWindows="true" 
android:id="@+id/itemlayout"> 


<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" 
    tools:context="com.shopistan.shopand.Prodpage" > 

    <com.sothree.slidinguppanel.SlidingUpPanelLayout 
     xmlns:sothree="http://schemas.android.com/apk/res-auto" 
     android:id="@+id/sliding_layout" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:gravity="bottom" 
     sothree:panelHeight="50dp" 
     sothree:shadowHeight="4dp" 
     sothree:paralaxOffset="100dp" 
     sothree:dragView="@+id/dragView"> 

     <!-- MAIN CONTENT --> 
     <FrameLayout 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:orientation="vertical"> 

      <FrameLayout 
       xmlns:android="http://schemas.android.com/apk/res/android" 
       android:id="@+id/frame_container" 
       android:layout_width="match_parent" 

       android:layout_height="match_parent"> 

       <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" 
        tools:context="com.shopistan.shopand.Prodpage"> 

        <com.shopistan.shopand.TouchImageView 
         android:id="@+id/IMAGEID" 
         android:layout_width="match_parent" 
         android:layout_height="match_parent" 
         android:scaleType="fitXY"/> 
        <!--<com.shopistan.shopand.ZoomableImageView--> 
        <!--android:id="@+id/IMAGEID1"--> 
        <!--android:adjustViewBounds="true"--> 

        <!--android:layout_width="match_parent"--> 
        <!--android:layout_height="wrap_content"/>--> 
        <!--<com.shopistan.shopand.ZoomableImageView--> 
        <!--android:id="@+id/IMAGEID2"--> 
        <!--android:adjustViewBounds="true"--> 

        <!--android:layout_width="match_parent"--> 
        <!--android:layout_height="wrap_content"/>--> 


       </RelativeLayout> 
       <RelativeLayout 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content"> 

        <LinearLayout 
         android:orientation="vertical" 
         android:layout_width="match_parent" 
         android:layout_height="wrap_content" 
         android:layout_alignParentBottom="true" 
         android:background="#ff000000" 
         android:id="@+id/layout"> 

         <TextView 
          android:layout_width="wrap_content" 
          android:layout_height="wrap_content" 
          android:textAppearance="?android:attr/textAppearanceMedium" 
          android:text="Medium Text" 
          android:id="@+id/ProductName" 

          android:layout_marginTop="10dp" 
          android:layout_marginLeft="5dp" 
          android:textColor="#ffff0000" /> 

         <TextView 
          android:layout_width="wrap_content" 
          android:layout_height="wrap_content" 
          android:textAppearance="?android:attr/textAppearanceSmall" 
          android:text="Small Text" 
          android:id="@+id/ProductPrice" 
          android:layout_marginTop="10dp" 

          android:layout_marginLeft="5dp" 
          android:textColor="#ffbdbdbd" /> 

         <TextView 
          android:layout_width="wrap_content" 
          android:layout_height="wrap_content" 
          android:textAppearance="?android:attr/textAppearanceSmall" 
          android:text="In Stock" 
          android:textStyle="bold" 
          android:id="@+id/ProductSpecial" 
          android:layout_marginTop="10dp" 

          android:layout_marginBottom="20dp" 
          android:layout_marginLeft="5dp" 
          android:textColor="#ffffffff" /> 
        </LinearLayout> 

        <ImageView 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:id="@+id/imageViewcart" 
         android:src="@drawable/addcart" 
         android:layout_alignParentRight="true" 
         android:layout_alignParentBottom="true" 
         android:layout_marginRight="20dp" 
         android:layout_marginBottom="150dp" 
         android:clickable="true" /> 


       </RelativeLayout> 


      </FrameLayout> 
     </FrameLayout> 

     <!-- SLIDING LAYOUT --> 
     <LinearLayout 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:background="#000000" 
      android:orientation="vertical" 
      android:clickable="true" 
      android:focusable="false" 
      android:id="@+id/dragView"> 

      <LinearLayout 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:layout_gravity="center" 
       android:orientation="horizontal"> 

       <TextView 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:textAppearance="?android:attr/textAppearanceSmall" 
        android:text="MORE INFO" 
        android:id="@+id/more" 
        android:layout_marginTop="10dp" 
        android:layout_marginBottom="10dp" 
        android:layout_marginLeft="140dp" 
        android:textColor="#ffbdbdbd" /> 


      </LinearLayout> 

      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:textAppearance="?android:attr/textAppearanceMedium" 
       android:text="Medium Text" 
       android:id="@+id/ProductName1" 

       android:layout_gravity="center" 
       android:layout_marginTop="10dp" 
       android:textColor="#ffff0000" /> 

      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:textAppearance="?android:attr/textAppearanceSmall" 
       android:text="Small Text" 
       android:id="@+id/ProductPrice1" 
       android:layout_marginTop="10dp" 
       android:layout_gravity="center" 
       android:textColor="#ffbdbdbd" /> 

      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:textAppearance="?android:attr/textAppearanceSmall" 
       android:text="" 
       android:id="@+id/ProductPrice2" 
       android:layout_marginTop="10dp" 
       android:layout_gravity="center" 
       android:textColor="#ffbdbdbd" /> 

      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:textAppearance="?android:attr/textAppearanceSmall" 
       android:text="In Stock" 
       android:textStyle="bold" 
       android:id="@+id/ProductSpecial1" 
       android:layout_marginTop="10dp" 
       android:layout_gravity="center" 
       android:textColor="#ffffffff" /> 
      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:textAppearance="?android:attr/textAppearanceMedium" 
       android:text="Description" 
       android:id="@+id/Desc" 
       android:layout_gravity="center" 

       android:layout_marginTop="10dp" 
       android:textColor="#ffff0000" /> 
      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:textAppearance="?android:attr/textAppearanceSmall" 
       android:text="" 
       android:id="@+id/desccon" 
       android:layout_marginTop="10dp" 
       android:minLines="1" 
       android:layout_gravity="center" 
       android:textColor="#ffbdbdbd" /> 
      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:textAppearance="?android:attr/textAppearanceMedium" 
       android:text="Care Instructions" 
       android:id="@+id/care" 
       android:layout_gravity="center" 
       android:layout_marginTop="10dp" 
       android:textColor="#ffff0000" /> 
      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:textAppearance="?android:attr/textAppearanceSmall" 
       android:text="" 
       android:id="@+id/carecon" 
       android:layout_marginTop="10dp" 
       android:layout_gravity="center" 
       android:minLines="1" 
       android:textColor="#ffbdbdbd" /> 
     </LinearLayout> 
    </com.sothree.slidinguppanel.SlidingUpPanelLayout> 

</RelativeLayout> 



<RelativeLayout 
    android:id="@+id/drawercheck" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:layout_gravity="end" 
    android:orientation="vertical" 
    android:background="#ffffffff" 
    android:layout_marginLeft="10dp" 
    > 


    <TextView 
     android:layout_width="match_parent" 
     android:layout_height="20dp" 
     android:textSize="16dp" 
     android:text="My Cart" 
     android:id="@+id/checkoutnavheadertext" 
     android:textColor="#d71920" 
     android:background="#ffffffff" 
     android:layout_marginLeft="10dp" 
     android:layout_alignParentTop="true" 
     android:layout_marginTop="5dp" 
     /> 

    <View 
     android:layout_width="fill_parent" 
     android:layout_height="1dp" 
     android:background="#d6d6d6" 
     android:layout_below="@+id/checkoutnavheadertext" 
     android:layout_marginTop="6dp"/> 

    <RelativeLayout 
     android:id="@+id/drawerchecksubheader" 
     android:layout_width="match_parent" 
     android:layout_height="30dp" 
     android:layout_gravity="end" 
     android:orientation="horizontal" 
     android:background="#ffffffff" 
     android:layout_below="@+id/checkoutnavheadertext" 
     android:layout_marginTop="11dp"> 

     <TextView 

      android:layout_width="wrap_content" 
      android:layout_height="20dp" 
      android:textSize="12dp" 
      android:text="PRODUCT" 
      android:id="@+id/checkoutnavesubheaderprof" 
      android:textColor="#000000" 
      android:background="#ffffffff" 
      android:layout_marginLeft="10dp" 
      android:layout_alignParentLeft="true" 
      /> 
     <TextView 

      android:layout_width="wrap_content" 
      android:layout_height="20dp" 
      android:textSize="12dp" 
      android:text="QTY" 
      android:id="@+id/checkoutnavesubheaderqty" 
      android:textColor="#000000" 
      android:background="#ffffffff" 
      android:layout_toLeftOf="@+id/checkoutnavesubheaderprice" 
      android:layout_marginRight="10dp"/> 
     <TextView 
      android:layout_width="wrap_content" 
      android:layout_height="20dp" 
      android:textSize="12dp" 
      android:text="PRICE(PKR)" 
      android:id="@+id/checkoutnavesubheaderprice" 
      android:textColor="#000000" 
      android:background="#ffffffff" 
      android:layout_alignParentRight="true"/> 

    </RelativeLayout> 
    <View 
     android:layout_width="fill_parent" 
     android:layout_height="1dp" 
     android:background="#d6d6d6" 
     android:layout_below="@+id/drawerchecksubheader" 
     android:layout_marginTop="6dp"/> 

    <ListView 
     android:id="@+id/checkout_slider" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:layout_gravity="end" 
     android:choiceMode="singleChoice" 
     android:dividerHeight="0dp" 
     android:divider="#ff000000" 
     android:background="#ffffffff" 
     android:listSelector="#ff000000" 
     android:layout_below="@+id/drawerchecksubheader" 
     android:layout_marginTop="9dp"/> 
    <View 
     android:layout_width="fill_parent" 
     android:layout_height="2dp" 
     android:background="#000000" 
     android:layout_marginLeft="10dp" 
     android:layout_marginRight="10dp" 
     android:layout_above="@+id/total" 
     android:layout_marginBottom="2dp"/> 

    <TextView 
     android:layout_width="wrap_content" 
     android:layout_height="30dp" 
     android:textSize="12dp" 
     android:text="TOTAL (Before Shipping):" 
     android:id="@+id/total" 
     android:textColor="#000000" 
     android:textStyle="bold" 
     android:background="#ffffffff" 
     android:layout_marginLeft="10dp" 
     android:layout_above="@+id/button" 
     android:layout_marginBottom="5dp"/> 

    <TextView 
     android:layout_width="wrap_content" 
     android:layout_height="30dp" 
     android:textSize="12dp" 
     android:text="PKR 0" 
     android:id="@+id/cost" 
     android:textColor="#000000" 
     android:textStyle="bold" 
     android:background="#ffffffff" 

     android:layout_marginRight="10dp" 
     android:layout_alignParentRight="true" 
     android:layout_above="@+id/button" 
     android:layout_marginBottom="5dp"/> 


    <Button 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:text="CHECKOUT" 
     android:textSize="16dp" 
     android:textStyle="bold" 
     android:id="@+id/button" 
     android:gravity="center" 
     android:textColor="#ffffffff" 
     android:background="#d71920" 

     android:layout_marginRight="10dp" 
     android:layout_marginLeft="10dp" 
     android:layout_alignParentBottom="true" 
     android:layout_marginBottom="15dp"/> 



</RelativeLayout> 

관련 문제