इस पर नया है और एंड्रॉइड प्रोग्रामिंग के लिए काफी नया है।मल्टीलाइन एडिटटेक्स्ट और इसके आगे के बटन के लिए व्हाट्सएप-जैसे लेआउट
मैं व्हाट्सएप चैट गतिविधि में एक लेआउट बनाने की कोशिश कर रहा हूं। तो मैं जो हासिल करना चाहता हूं वह उसी लेआउट और व्यवहार को एडिटटेक्स्ट और इसके बगल में बटन के लिए प्राप्त करना है। इसका मतलब मध्य में स्माइलीज़ और एडिटटेक्स्ट के लिए बाएं बटन और पाठ भेजने के लिए दाईं ओर एक बटन है।
व्हाट्सएप में जब एडिटटेक्स्ट अपने आकार (मल्टीलाइन) का विस्तार करता है तो बटन नीचे रहते हैं। लेकिन ऐसा लगता है कि मूल दृश्य के नीचे नहीं होना चाहिए क्योंकि बटन पहले संपादन टेक्स्ट में केंद्रित हैं।
मैंने टेबललेआउट की पंक्ति में तीन विचार डालने की कोशिश की। या सिर्फ एक रिलेवेटिवआउट का उपयोग कर। लेकिन इसका कुछ भी ठीक से काम नहीं करता है।
क्या कोई मुझे दिखा सकता है कि इसे कैसे प्राप्त किया जाए? मैं अपना एक्सएमएल प्रदान कर सकता हूं लेकिन .... अच्छा ... यह स्पष्ट रूप से बहुत खराब है: डी
अग्रिम धन्यवाद!
<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"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin">
<ListView
android:id="@+id/messages"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_above="@+id/footer_section">
</ListView>
<LinearLayout
android:id="@+id/footer_section"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:minHeight="48dp">
<ImageView
android:id="@+id/emoticons_button"
android:layout_height="match_parent"
android:layout_width="48dp"
/>
<EditText
android:id="@+id/message_text"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:layout_weight="1"
android:inputType="textMultiLine"
android:minLines="1"
android:maxLines="4"/>
<ImageView
android:id="@+id/send_button"
android:layout_height="match_parent"
android:layout_width="48dp"
android:layout_gravity="center_vertical"/>
</LinearLayout>
अपने xml –