मैं डायलॉग फ्रैगमेंट का उपयोग कर रहा हूं। मैं चाहता हूं कि सकारात्मक और नकारात्मक बटन कुंजीपटल के ऊपर बने रहें जब उपयोगकर्ता जीमेल टैबलेट एप्लिकेशन में स्क्रीन से नीचे दिए गए उदाहरण चित्रों जैसे संपादन टेक्स्ट के साथ इंटरैक्ट करता है।सॉफ्ट कीबोर्ड के ऊपर डायलॉगफ्रैगमेंट पॉजिटिव/नकारात्मक बटन कैसे रखें
मेरी प्रयास जो काम नहीं करता है, यहाँ मेरी संवाद टुकड़े onCreateDialog विधि
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
LayoutInflater factory = LayoutInflater.from(getActivity());
final View textEntryView = factory.inflate(R.layout.my_layout, null);
return new AlertDialog.Builder(getActivity())
.setTitle(getString(R.string.paypal))
.setView(textEntryView)
.setPositiveButton(R.string.dialog_ok,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
}
}
)
.setNegativeButton(R.string.dialog_cancel,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
}
}
)
.create();
}
है और यहाँ R.layout.my_layout
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true">
<LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical">
<ImageView android:id="@+id/paypal_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dip"
android:layout_marginBottom="15dip"
/>
<EditText
android:id="@+id/edit_paypal_email"
style="@style/GeneralEditText"
android:hint="@string/contact_info_text_email"
android:inputType="textEmailAddress"
/>
<View
android:id="@id/horizontal_line"
style="@style/HorizontalLine"
android:layout_marginTop="@dimen/contact_info_line_margin_top" />
<!-- Notes -->
<TextView
android:text="@string/paypal_info1"
style="@style/ContactInfoNotes"
android:paddingBottom="5dip"
/>
<TextView
android:text="@string/paypal_info2"
style="@style/ContactInfoNotes"
android:paddingBottom="5dip"
/>
<TextView
android:text="@string/paypal_info3"
style="@style/ContactInfoNotes"
android:paddingBottom="5dip"
/>
<TextView
android:text="@string/paypal_info4"
style="@style/ContactInfoNotes"
android:paddingBottom="5dip"
/>
</LinearLayout>
</ScrollView>
है
मेरे कार्यान्वयन में, ऐसा है फीट कीबोर्ड आता है और संवाद सकारात्मक और नकारात्मक बटन को कवर करता है। कीबोर्ड को कीबोर्ड से ऊपर रहने की अनुमति देने के लिए मुझे क्या याद आ रही है?
अग्रिम धन्यवाद।
बटन को कवर करने से मुलायम कीबोर्ड को नहीं रोका! यह एक समान परिदृश्य में मेरे लिए काम किया; बटन के बजाय edittext। – Karl
यदि आपके पास मानक बटन के बिना डायलॉगफ्रैगमेंट है और आप डायलॉग के लेआउट को स्क्रॉल करने योग्य बनाना चाहते हैं, तो लेआउट को स्क्रॉलव्यू और 'getDialog()। GetWindow() में सेट करना होगा। SetSoftInputMode (WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);' कोViewCreated के अंदर सेट किया जाना चाहिए() ' –