layout - Basics Android UI design issue -


  & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "यूटीएफ -8"? & Gt; & LT; RelativeLayout xmlns: एंड्रॉयड = "http://schemas.android.com/apk/res/android" एंड्रॉयड: layout_width = "match_parent" एंड्रॉयड: layout_height = "200px" एंड्रॉयड: पृष्ठभूमि = "@ लेआउट / roundedshape" एंड्रॉयड: id = "@ + id / mainLayout" & gt; & LT; गैलरी xmlns: एंड्रॉयड = "http://schemas.android.com/apk/res/android" एंड्रॉयड: आईडी = "@ + id / गैलरी" एंड्रॉयड: layout_width = "fill_parent" एंड्रॉयड: layout_height = "100px" / & gt; & LT; LinearLayout एंड्रॉयड: गुरुत्वाकर्षण = "टॉप" एंड्रॉयड: आईडी = "@ + id / gallerytext" एंड्रॉयड: layout_width = "match_parent" एंड्रॉयड: layout_height = "50px" एंड्रॉयड: layout_below = "@ + id / गैलरी" एंड्रॉयड: layout_centerHorizontal = "सच" & gt; & LT; TextView एंड्रॉयड: पाठ = "TextView" एंड्रॉयड: आईडी = "@ + id / taskname" एंड्रॉयड: layout_width = "wrap_content" एंड्रॉयड: layout_height = "wrap_content" & gt; & lt; / TextView & gt; & Lt; / LinearLayout & gt; & LT; LinearLayout एंड्रॉयड: गुरुत्वाकर्षण = "टॉप" एंड्रॉयड: layout_width = "match_parent" एंड्रॉयड: layout_height = "50px" एंड्रॉयड: layout_below = "@ + id / gallerytext" एंड्रॉयड: layout_centerHorizontal = "true" & gt; & Lt; बटन एंड्रॉइड: id = "@ + id / button_left" एंड्रॉइड: layout_width = "27px" एंड्रॉइड: लेआउट_हेइट = "27px" & gt; & lt; / बटन & gt; & LT; बटन एंड्रॉयड: पाठ = "जोड़ें" एंड्रॉयड: आईडी = "@ + id / button_add" एंड्रॉयड: layout_width = "wrap_content" एंड्रॉयड: layout_height = "wrap_content" & gt; & lt; / बटन & gt; & LT; बटन एंड्रॉयड: पाठ = "संपादित करें" एंड्रॉयड: आईडी = "@ + id / button_edit" एंड्रॉयड: layout_width = "wrap_content" एंड्रॉयड: layout_height = "wrap_content" & gt; & lt; / बटन & gt; & Lt; बटन एंड्रॉइड: आईडी = "@ + आईडी / बटन_right" एंड्रॉइड: layout_width = "27px" एंड्रॉइड: लेआउट_हेहट = "27px" & gt; & lt; / बटन & gt; & Lt; / LinearLayout & gt; & Lt; / RelativeLayout & gt;   

संपादित

  & lt; रिलेटिव लेआउट xmlns: एंड्रॉइड = "http://schemas.android.com/apk/res/android" एंड्रॉइड: layout_width = "मैच_पेरेंट" एंड्रॉइड: लेआउट_हेइट = "200px" एंड्रॉइड: पृष्ठभूमि = "@ लेआउट / राउंडेडशैप" & gt; & LT; गैलरी xmlns: एंड्रॉयड = "http://schemas.android.com/apk/res/android" एंड्रॉयड: आईडी = "@ + id / गैलरी" एंड्रॉयड: layout_width = "fill_parent" एंड्रॉयड: layout_height = "100px" / & gt; & LT; TextView एंड्रॉयड: layout_below = "@ + id / गैलरी" एंड्रॉयड: पाठ = "TextView" एंड्रॉयड: आईडी = "@ + id / taskname" एंड्रॉयड: layout_width = "wrap_content" एंड्रॉयड: layout_height = "wrap_content" & gt; & lt; / TextView & gt; & LT; बटन एंड्रॉयड: आईडी = "@ + id / button_left" एंड्रॉयड: layout_below = "@ + id / taskname" एंड्रॉयड: layout_width = "27px" एंड्रॉयड: layout_height = "27px" & gt; & lt; / बटन & gt; & LT; बटन एंड्रॉयड: पाठ = "जोड़ें" एंड्रॉयड: आईडी = "@ + id / button_add" एंड्रॉयड: layout_below = "@ + id / taskname" एंड्रॉयड: layout_toRightOf = "@ + id / button_left" एंड्रॉयड: layout_width = "wrap_content" एंड्रॉयड: layout_height = "wrap_content" & gt; & lt; / बटन & gt; & LT; बटन एंड्रॉयड: पाठ = "संपादित करें" एंड्रॉयड: आईडी = "@ + id / button_edit" एंड्रॉयड: layout_below = "@ + id / taskname" एंड्रॉयड: layout_toRightOf = "@ + id / button_add" एंड्रॉयड: layout_width = "wrap_content" एंड्रॉयड: layout_height = "wrap_content" & gt; & lt; / बटन & gt; & LT; बटन एंड्रॉयड: आईडी = "@ + id / button_right" एंड्रॉयड: layout_below = "@ + id / taskname" एंड्रॉयड: layout_toRightOf = "@ + id / button_edit" एंड्रॉयड: layout_width = "27px" एंड्रॉयड: layout_height = "27px" & gt; & lt; / बटन & gt;   

जब मैं रिलेटिव लेआउट के लिए एक पृष्ठभूमि डालता हूं तो यह दो लाइनर लेआउट को कवर करता है।

कैसे मैं पृष्ठभूमि का रंग और दो LinearLayout s शीर्ष पर दिखाई दे सकता है? या क्या मेरी धारणा गलत है?

आपके लेआउट में कुछ भी गलत नहीं है यदि आप रिलेशनल लेआउट की पृष्ठभूमि को #FFFFFFFF (सफ़ेद) पर सेट करते हैं, तो ठीक उसी तरह से क्या होता है पृष्ठभूमि (जिसमें रैखिक लेआउट हैं) सफ़ेद हो जाता है लेकिन LinearLayouts के शीर्ष पर हैं RelativeLayout - आप अभी भी बटन और किसी भी पाठ LinearLayouts के भीतर से दिखाया गया है देखें। आपको LinearLayouts अलग अलग रंग के लिए की पृष्ठभूमि सेट करते हैं तो आप इस लेआउट में दिखाई देंगे -। वे के लिए RelativeLayout

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -