isn't that what i'm doing?
On Apr 28, 6:02 am, Hielko <[EMAIL PROTECTED]> wrote:
> Do what Dan already suggested: extend thedialogclass.
>
> On Apr 28, 11:46 am, scimitar <[EMAIL PROTECTED]> wrote:
>
> > Ok. I have the following code:
>
> > Dialogdl = newDialog(this);
> > dl.setTitle("Information Prompt");
> > dl.setContentView(R.layout.infodlg);
> > EditText inputBox1 =
> > (EditText)dl.findViewById(R.id.user);
> > inputBox1.setText("");
> > dl.show();
>
> > And my infodlg.xml file is:
>
> > <?xml version="1.0" encoding="utf-8"?>
> > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/
> > android"
> > android:orientation="horizontal"
> > android:layout_width="fill_parent"
> > android:layout_height="200px"
> > >
> > <TextView
> > android:layout_width="fill_parent"
> > android:layout_height="wrap_content"
> > android:text="Please Enter your username and password"
> > android:textStyle="bold"
> > />
> > <EditText android:id="@+id/user"
> > android:layout_width="fill_parent"
> > android:layout_height="wrap_content"
> > android:layout_weight="1">
> > <requestFocus/>
> > </EditText>
> > </LinearLayout>
>
> > However, thedialogboxshows just the text:"Please Enter your
> > username and password", and doesn't show the editbox below it. Why is
> > this:
>
> > Ideally I would want something like this:
>
> > ---------------------------------------------------------------------------------------
> > Information Prompt
> > ----------------------------------------------------------------------------------------
> > Please enter your username and password
> > --------------------------------------------------------------------------------------
> > username: [\editbox]
> > password: [\editbox]
>
> > \button["OK"]
> > ----------------------------------------------------------------------------------------
>
> > Please give me suggestions on how to achieve this.
>
> > thanks,
>
> > On Apr 27, 9:46 pm, "Dan U." <[EMAIL PROTECTED]> wrote:
>
> > > Probably you should look into extending theDialogclass. Just specify
> > > your layout and whatever event handling you need in that class, then
> > > use it like aDialog. In your case, I'd have some kind of setter
> > > method in yourDialogsubclass to set an OnClickListener for whichever
> > > buttons you might have in theDialog. That way, you can specify the
> > > functionality for a button click outside of yourDialog
> > > implementation.
>
> > > On Apr 27, 5:52 pm, scimitar <[EMAIL PROTECTED]> wrote:
>
> > > > Hi,
>
> > > > I want my application to pop up adialogbox that asks for someuser
> > > >input. Theuserenters theinputand clicks a button. Based on the
> > > > text that theuserhas entered, the application then continues it's
> > > > operations. How should I implement this?
>
> > > > thanks
>
> > On Apr 27, 9:46 pm, "Dan U." <[EMAIL PROTECTED]> wrote:
>
> > > Probably you should look into extending theDialogclass. Just specify
> > > your layout and whatever event handling you need in that class, then
> > > use it like aDialog. In your case, I'd have some kind of setter
> > > method in yourDialogsubclass to set an OnClickListener for whichever
> > > buttons you might have in theDialog. That way, you can specify the
> > > functionality for a button click outside of yourDialog
> > > implementation.
>
> > > On Apr 27, 5:52 pm, scimitar <[EMAIL PROTECTED]> wrote:
>
> > > > Hi,
>
> > > > I want my application to pop up adialogbox that asks for someuser
> > > >input. Theuserenters theinputand clicks a button. Based on the
> > > > text that theuserhas entered, the application then continues it's
> > > > operations. How should I implement this?
>
> > > > thanks- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---