android - Assign Dialog box view to another view -


I am creating a dialogue and set setting of a layout content view. And I'm programmatically adding buttons, set the dialog to display the images in the content view. How can I now see the dialog box in another view? This is a layout that is assigned to any view below

  getview = r LATOOTAL_AlphaBOT_SPEC_WORD;   

Similarly how can I show dialog boxes in another view? Because I am programmatic adding all the elements programmatically to "Tamil Alphabets" because the children are zero, which gives the codes below. alphabetidog = new dialog (Tamil alphabetes.); Alphbetdialog.requestWindowFeature (Window.FEATURE_NO_TITLE); Alphbetdialog.setContentView (R.layout.tamil_alphabetsdialog); (Adding Elements of Layout "Tamil Alphabet" code ..............) LayoutInflator Inflator = (LayoutInflator) TamilAllababets.Is GatesSystemService (TamilAllababets.ILALUINFLATSSE); See line = inflator.inflate (tamil_alphabetsdialog, guardian, wrong); LinearLayout l1 = (LinearLayout) row.findViewById (R.id.alphabetlayout1); ViewGroup vg = (ViewGroup) l1; Vg.getChildCount ();

So I need to allocate a dialog box view in another view, how can I do this? I want something like this

  getview = & lt; I see the dialog box & gt;    

You should avoid using the dialog class directly and Instead, use dialog or dialogue

:

Dialog is the base class for class communication, but You should avoid direct dialing dialogs instead, use one of the following sub-squares:

AlertDialog A dialog that lists up to three buttons, a list of featured items, or a custom layout. Can eat

DatePickerDialog or TimePickerDialog a dialogue with a pre-defined UI that allows the user to select a date or time.

In any case, I guess what you want is the Custom Dialogue and which is being modified, in that case using the Dialogfraagment class here An example is

dialog slice layout

  & lt; TextView xmlns: Android = "http://schemas.android.com/apk/res/android" android: id = "@ + id / textView1" Android: layout_width = "match_parent" Android: layout_height = "match_parent" & gt; Dialog Class  

Dialog Class

Expands Public Class DialogExampleFragment DialogueFragment {

  Personal Static Last String ARG_PARAM = "Extra: PARAM"; Private string mText; Override public zero (activity activity) on @Evereate {super. Antache (activity); } @ Override Crate on Public Zero (Bundle Saved Instantstate) {Super.Nought (Saved Instantstate); Bundle logic = acquisition agreement (); Mteext = Arguments .getString (ARG_PARAM); } @ Override Public Dialog on Critical Dialeg (Bundle Saved InstanceStat) {Dialogue Dialog = Super. Cotet Dialogue (Saved Instantstate); Dialog.setTitle ("title"); Return dialog; } Public Static DialogExamnfragment New Instance (String Message) {Bundle Args = New Bundle (); args.putSerializable (ARG_PARAM, message); DialogExampleFragment fragment = new DialogExampleFragment (); Fragment.setArguments (args); Return piece; } @ Override Public View Creatives (LayoutInflator Inflator, View Group Container, Bundle Saved InstantState) {see Route = Inflator.Flat (R. Late Fragment_Dialog_Wid, Container, False); TextView t = (TextView) root.findViewById (R.id.textView1); T.setText (MTEXT); Return route; }  

}

}

} to show as a dialog

  dialogue.plue.Netu instance ("message"). Show (getFragmentManager (), "Dialog");   

Note that when a dialog fragment is a piece, it can be shown as a dialogue or as a regular piece you can get all the information on the link given above.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -