2016-08-12 3 views
5

हाय मैं यह नहीं चाहते हैं drawable/draw_arc_corner_shapeलेआउट पर सीमा को हटाने के लिए कैसे

<shape 
xmlns:android="http://schemas.android.com/apk/res/android" 
android:shape="rectangle" > 

<solid 
    android:color="@color/bg_trip_tab_view" > 
</solid> 

<!--<stroke--> 
    <!--android:width="0dp"--> 
    <!--android:color="@color/bg_trip_tab_view" >--> 
<!--</stroke>--> 

<padding 
    android:left="0dp" 
    android:top="5dp" 
    android:right="0dp" 
    android:bottom="5dp" > 
</padding> 

<corners 
    android:radius="11dp" > 
</corners> 

यह हिस्सा शून्य सर्कल: drawable/draw_circle_shape

<?xml version="1.0" encoding="utf-8"?> 
<shape xmlns:android="http://schemas.android.com/apk/res/android" 
    android:shape="oval" 
    android:useLevel="false" > 
    <solid android:color="@color/bg_my_trip_tab_view" /> 
    <size 
     android:height="10dp" 
     android:width="10dp" /> 
</shape> 

इस ड्रॉ पानी का छींटा लाइन: drawable/draw_dash_line_shape

<?xml version="1.0" encoding="utf-8"?> 
    <shape xmlns:android="http://schemas.android.com/apk/res/android" 
    android:shape="line" > 
    <stroke 
     android:dashGap="3dp" 
     android:dashWidth="2dp" 
     android:width="1dp" 
     android:color="@color/bg_my_trip_tab_view" /> 
</shape> 

और यहां आरंभ और समाप्ति और पानी का छींटा लाइन पर वृत्त (अर्धवृत्त) के बीच के साथ (विभाजक) दृश्य बनाते हैं : लेआउट/विभाजक

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:orientation="horizontal" 
android:gravity="center_vertical" 
android:layout_alignParentBottom="true"> 

<View 
    android:layout_width="20dp" 
    android:layout_height="20dp" 
    android:layout_marginLeft="-10dp" 
    android:background="@drawable/draw_circle_shape" 
    /> 

<View 
    android:layout_width="0dp" 
    android:layout_height="5dp" 
    android:background="@drawable/draw_dash_line_shape" 
    android:layerType="software" 
    android:layout_weight="1" 
    android:paddingRight="15dp" 
    /> 

<View 
    android:layout_width="20dp" 
    android:layout_height="20dp" 
    android:layout_marginRight="-10dp" 
    android:background="@drawable/draw_circle_shape" 
    /> 
</LinearLayout> 

और यहाँ मैं इसे का उपयोग करें: लेआउट/main_screen

<?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" 
android:background="@color/bg_my_trip_tab_view" 
> 
<LinearLayout 
    android:id="@+id/linearLayout" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:orientation="vertical" 
    android:layout_marginLeft="10dp" 
    android:layout_marginRight="10dp" 
    android:layout_marginTop="10dp" 
    android:layout_marginBottom="10dp" 
    android:background="@drawable/draw_arc_corner_shape" 
    > 
    <include 
     android:layout_marginTop="@dimen/grid_20" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     layout="@layout/separator" 

     /> 
</LinearLayout> 

और यह मेरा परिणाम है: enter image description here

और मेरे सवाल: मैं कैसे छाया के साथ सीमा को दूर कर सकते हैं? और मैं इसे बेहतर कैसे कर सकता हूं?

+0

संभावित समाधान: मैं छवि 9-पथ का उपयोग कर सकता हूं ... लेकिन मुझे नहीं चाहिए .. –

+0

एंड्रॉइड जोड़ने का प्रयास करें: stateListAnimator = "@ null" आपके मुख्य_स्क्रीन में रैखिक लेआउट – USKMobility

+0

अरे, मैंने आपके लेआउट का परीक्षण किया और किया एपीआई 1 9 और एपीआई 24 दोनों में वास्तव में कोई छाया नहीं मिलती है ... – Shaishav

उत्तर

0

क्या आप एंड्रॉइड स्टूडियो एक्सएमएल डिज़ाइन व्यू में सीमा छाया प्राप्त कर रहे हैं। असली डिवाइस पर कोई छाया दिखाना नहीं है।

+0

आपके रैखिक लेआउट में कुछ माता-पिता कार्ड व्यू हैं? – Ramit

+0

मैं इसे वास्तविक डिवाइस पर परीक्षण करता हूं और छाया –

+0

है, आप कार्डव्यू इत्यादि जैसे रैखिक लेआउट के किसी भी माता-पिता का उपयोग कर रहे हैं। इसमें छाया हो सकती है। – Ramit

संबंधित मुद्दे