त्वरित और गंदे:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:color="#000000">
<View
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/rectangle"
android:layout_margin="20dp"
/>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:background="#000000"
android:layout_marginTop="10dp"
android:text="TITLE!"
android:textColor="#ffffff"/>
</RelativeLayout>
</FrameLayout>
और @drawable/rectangle
एक drawable rectangle.xml
फ़ाइल इस तरह है:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@android:color/transparent"/>
<stroke android:width="2dip" android:color="#ffffff"/>
</shape>
मैं देख रहा हूँ कि यह कैसे जल्दी है, लेकिन यह कैसे गंदा है? क्या यह टैग के लिए है? मुझे लगता है कि आप एक अलग शीर्षक लेआउट भी परिभाषित कर सकते हैं और इसे –
का उपयोग करके शीर्ष पर शामिल कर सकते हैं यह निश्चित रूप से अलग लेआउट हो सकता है। – anthropomo