android-widget

How to correctly handle click events on Widget

There is a task to make smt like todo list on widget (with dinamic number of elements), how to organize this list for click support on this elements. I only found how add click event on one widget layout element (with setOnClickPendingIntent), and how send text to widget element TextView. But it's unclear how handle click events for sub...

How to use the same receiver for different widget

Hi, I wonder if it's possible to use the same provider (receiver) for 2 different widget (different sizes for example) I tried on my Manifest : <receiver android:name=".provider" android:label="@string/app_name_small"> <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> <...

Android: how do I define an attribute for a custom widget?

Looking at Mark Murphy's excellent example at http://github.com/commonsguy/cw-advandroid/tree/master/Views/ColorMixer/ you can see where he's defined a custom widget called ColorMixer. ColorMixer has an attribute named "initialColor" declared in attrs.xml. In the constructor for ColorMixer, he obtains the attribute value as follows: ...

Hey Guy , I want ot streaming video by using VideView class . Can anyone tell me what format is it supports??

Hi , I am the newbie of android, but i hava seen the tutorial and implement some simple applications. The question i met is that I am tring to stream some video from my server to android, but the android VideoView class just plays the audition sololy without "image"@@!~ Here is my setting and android code : 1. android core code: mVi...

How to use the MediaController

Hi all, I'm trying to integrate a MediaController on top of a MediaPlayer. The controller is displayed all right, but its buttons are disabled, and the progress slider does not respond properly. I found very little documentation about it and I still don't understand how to use it. This is very important and urgent for me. Can anyo...

Move to next item or position in List view on button click

Hi, im new to Android programing I build a listview showing station names, that grabs its data from a URL. I used ArrayAdapter to accomplish listview with data. I need to navigate through station names in listview, using previous, next buttons click. I google for this task and tried in different ways to workout bt im not able to sol...

Android Time&Date Picker

Hello, Is there any android widget that enable to pick the date and the time at the same time ? I already use the basic date picker and date picker: http://developer.android.com/guide/tutorials/views/hello-timepicker.html http://developer.android.com/guide/tutorials/views/hello-datepicker.html but they are not that sexy and user friendl...

Increase size of android upto 1024X600 is it possible ?

Hi, Actually make application on Google Android G1 but it is normal screen size, but I want to increase my screen size up to 1024x600. How can I increase it? If you have any code please send it to me. ...

CheckedTextView Behaving Erratically

Has anyone else had a problem with CheckedTextView showing multiple checked items when only 1 is checked? When a CheckedTexView item is clicked, the response from the OnClickListener is to check the entries before and after the clicked item. Here's the code: mFriendDoneButton = (Button) findViewById(R.id.doneAddAFriendButton); ...

Showing list of items instead of pop up of spinner in android

Hi friends, Spinner in android shows a pop up to select items instead of conventional Combo box control, which shows a list of items just below the control. Now My issue is, I want to show a simple list instead of pop up window for spinner. I am not sure whethere to make a custom view for it. If any one knows the solution please let me ...

Android::Creating a clickable collage?

I am trying to create something like a rectangular grid with pictures. When a picture is clicked, it should zoom in pushing the other ones out. I don't know what you name you call this particular model with but does anyone have suggestions on where I should start? Collage Example ...

Dialog, LinearLayout, ScrollView size issues

I'm building a dialog class which inherits from Dialog, and all internal UI is programmatic. It's structured in the following way: Dialog +LinearLayout ++TextView ++ScrollView +++LinearLayout ++++ListView Unfortunately, when I show() the Dialog, it's too short. I'd like it to maximize and cover as much of the screen as possible, but ...

Render crisp text using Canvas.drawText in Android

Hi, I'm doing an AppWidget and in its settings I'm letting the user enable/disable text shadow. Since I can't invoke the shadow method through the RemoteViews class, I'm doing a "draw" method that dynamically paints the widget and its container. When drawing the text though, it gets kinda blurred and not that crisp like when using a Te...

How to make a smaller RatingBar?

I've added a RatingBar in a layout : <RatingBar android:id="@+id/ratingbar" android:layout_width="wrap_content" android:layout_height="wrap_content" android:numStars="5" android:stepSize="1.0" ></RatingBar> But the default style for the rating bar is too large. I've trie t...

Click event on AutoComplete TextView

Hi Auto complete text view shows list when you starts typing in edit box. But I want to show list on click event of autocomplete textview. So On click event I use isPopupShowing() method to check whether DropDown is showing or not. But each time I get false return from isPopupShowing(). Because of which I can not able to find out when ...

Android TextView Linkify problem with phone numbers and application version number

I have a problem with TextView and autoLink feature. I have an about screen in my application with some information like support phone number, email address, website URL and application version in form like 01.01.01 After setting autoLink="all" on the textView, all values are linked fine - except that version number 01.01.01 is linked ...

findViewById undefined

Eclipse is marking findViewById(int) as undefined; it was doing the same thing for getResources(), but I was able to get around that by calling context.getResources() instead (as seen below) and can't seem to find a similar workaround for findViewById. Here is the code: package com.myapp.android.MyWidget; import android.appwidget.AppW...

Creating a new Intent results in a error

when i do the fallowing i get screamed on : Button newGameButton = (Button) this.findViewById(R.id.newGameButton); newGameButton.setOnClickListener(new OnClickListener() { public void onClick(View view) { startActivity(new Intent(this,gameScreen.class)); } }); apparently my this is not the one nee...

TabLayout custom menu

I have a TabLayout containing tabs as intents to activities. I want to set custom menu items for each tab, but the onCreateOptionsMenu version called is the Host's version. How can I make the menu items created by each activity on its own. ...

Layout problem: scrollview inside a table, inside a custom dialog

I have a layout problem which I can't fix. I've looked through many posts on here, and mine seems to be unique enough to post a question. I've created a custom Dialog which programmatically creates a 3 row table. The top and bottom rows have text, while the middle row contains a ScrollView, which contains a LinearLayout. That LinearLayo...