हां, यह अभी तक एक और बदलाव है जो SO पर सवाल बढ़ता है। और हाँ, मैं पहले से ही उन सभी संपादनों के सवालों के माध्यम से गुजर चुका हूं। लेकिन यह थोड़ा विशिष्ट है।एंड्रॉइड एडिटेक्स्ट ऑटो टेक्स्ट के साथ बढ़ता है और चीजों को धक्का देता है
यूआई:
एक यह नीचे edittext और बटन के साथ सरल एंड्रॉयड लेआउट। जब पाठ कम होता है, तो संपादन दृश्य अभी भी नीचे दिए गए बटन के लिए पूरी स्क्रीन छोड़ने वाली जगह को कवर कर रहा है।
एक बार उपयोगकर्ता टेक्स्ट दर्ज करना शुरू कर देता है, तो पाठ को समायोजित करने के लिए edittext लंबवत बढ़ता है। साथ ही, बटन को भी बढ़ने के लिए बटन को नीचे धक्का देना चाहिए।
उपयोगकर्ता पूर्ण पाठ देखने के लिए स्क्रीन के माध्यम से लंबवत स्क्रॉल कर सकते हैं। महत्वपूर्ण पाठ दर्ज करने के बाद
यूआई:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/background"
android:clipToPadding="false"
android:fadingEdge="none"
android:fillViewport="true"
android:padding="13dp"
android:scrollbarStyle="outsideOverlay" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1">
<!-- some fixed width image -->
<ImageView
android:id="@+id/someimage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:src="@drawable/page_white_text" />
<EditText
android:id="@+id/some"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/someimage"
android:background="@null"
android:gravity="top"
android:minLines="10"
android:minHeight="50dp"
android:textColor="#222222"
android:textSize="15dp"
android:typeface="serif" >
<requestFocus />
</EditText>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:baselineAligned="true"
android:layout_marginTop="5dp"
android:padding="10dp"
android:orientation="vertical" >
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button" />
</LinearLayout>
</RelativeLayout>
</ScrollView>
यह कम या ज्यादा काम करता है:
यहाँ edittext और बटन के नीचे के साथ लेआउट है। लेकिन जब मैं बटन को नीचे धक्का देने के बजाय, अधिक टेक्स्ट में प्रवेश करता हूं। यह हो जाता है के पीछे इसे पसंद:
यहाँ किसी भी मदद की बहुत सराहना कर रहा है। धन्यवाद :)
हाय Vinit, कृपया ans ऊपर पर टिप्पणी देखें:
एक उदाहरण देखते हैं। –