First of all thanks for the quick reply,
Yes i have a 3 different xml file called options1, options2, options3
in the layout folder. In 1 .java file called "callalert" im using
alert.builder concept to display the alert message( which shows all 3
options)using the following code.
final CharSequence[] items = {"Option1", "Option2",
"Option3"};
AlertDialog.Builder builder = new
AlertDialog.Builder(context);
builder.setTitle("Select");
builder.setItems(items, new DialogInterface.OnClickListener()
{
public void onClick(DialogInterface dialog, int item) {
Toast.makeText(context.getApplicationContext(),
items[item], Toast.LENGTH_SHORT).show();
}
});
AlertDialog alert = builder.create();
builder.show();
when the code is executed, it shows an error.
What i feel( which might be wrong) is that, there must be a different
code for widget to display alert, is that true?
Please help me fixing this... Thanks in advance.
Nagaraj P Rao
On Aug 10, 12:08 pm, Kostya Vasilyev <[email protected]> wrote:
> Like Mark already said, you need to create a separate widget_info.xml
> file for each size/content type, with appropriate attributes for
> minWidth and minHeight.
>
> Essentially, this means declaring separate widgets for all size /
> content options. The user would see them all when choosing a widget to
> add to the home screen.
>
> -- Kostya
>
> 10.08.2010 10:47, kaundinya пишет:
>
>
>
>
>
> > Hi,
> > How can i give an option for the user to select 3 options(news only,
> > weather only, News and weather) in the dialog on load of the widget?
>
> > On Aug 10, 3:23 am, mboehmer<[email protected]> wrote:
>
> >> How is this done for the News and Weather widget? After selecting it a
> >> dialog opens and asks for which content (i.e. size) the user wants to
> >> have.
>
> >> On 10 Aug., 00:04, Mark Murphy<[email protected]> wrote:
>
> >>> Have two<provider> elements with two separate metadata files with the
> >>> two sizes, presumably.
>
> >>> On Mon, Aug 9, 2010 at 5:30 PM, Fernando T<[email protected]> wrote:
>
> >>>> I'm looking at creating an AppWidget and want to have the user select
> >>>> which size they want before adding it. Thus, the user can choose 1x1,
> >>>> 2x2, etc. The Calendar widget in Android 2.2 (and possibly earlier,
> >>>> but not in 1.6) does this. How is this done?
>
> >>> --
> >>> Mark Murphy (a Commons
> >>> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> >>> _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
> >>> Available!
>
> --
> Kostya Vasilev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en