I'm using a mixture of the "Efficient Adapter" and the EndlessAdapter from CommonsGuy, and sometime the holder in getView() is null.
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder;
if (convertView == null) {
convertView = inflater.inflate(R.layout.queue_item, null);
...
Hello, I'm writing a game in which I have a character that can be dressed with clothes, glasses, moustaches, etc. For the Avatar I use a Layout and for the container of the items, I use a scrollview with another layout that contains the items.
When I touch an item in the scrollview I need it to be added to the avatar layout, and modify ...
I have a problem:
take username and password from user from text filed.
Automatically sign in to yahoo/google/facebook account and display the webpage in webview.
Basically I dont want user to directly put username and password to yahoo account but go through my application.
Here is my code:
String login = "abcd";
String pwd = "123...
Hey, Im trying something in android, that has to get the words sent in sms and print on the emulator screen. But the app doesnt update in time.
I send a message. Ok. But when I open the app it doesnt print the words that I've sent. So i have to close the emulator and then open it again, and run the app, and the word is there.
Id like ...
I have an EditText box and I want the default keyboard that comes up when it is selected to be the numeric keypad... however, I do not want to prohibit letters from being entered (as the "numbers" InputType does). What InputType should I use?
...
I just start to use robotium. The demo can be run without any problem, but when I wrote first test script by using EditText and Button, problems occured. My environment is android 2.1 and the script is quite simple, just input username and psw, then click sumbit button to login.
The script is as follows:
package com.tpc.test;
import co...
Hi,
I am trying to post from android to GAE, I am getting unknown host exception. Here is my code,
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://silver-kites.appspot.com");
try {
// Add your data
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>...
I figured out how to pass a String value between activites thanks to this site, however I'm having trouble passing an image. What I'm trying to to is have a user click a button that opens the gallery and allows selecting of a picture. Then I have another button that opens another activity that displays an ImageView. I want to be able to ...
I'm setting an ArrayAdapter and I get the following error:
Thread [<1> main] (Suspended (exception NullPointerException))
ArrayAdapter.createViewFromResource(int, View, ViewGroup, int) line: 355
ArrayAdapter.getView(int, View, ViewGroup) line: 323
ListView(AbsListView).obtainView(int, boolean[]) line: 1294
ListView.measureHei...
I want to layout a button with Drawable image on the top of it and text below the image. I am very new to this so please use detailed instructions. I have not experimented with drawable images yet so I want to clarify before I continue.
If I want to above the text (ie the text is not on the image) how do I go about doing this? I also w...
I am trying to extend HashMap as a Parcelable and I got the syntax to compile, however, at runtime it throws an exception and returns a null pointer trying to un-marshal the data.
The sender has to cast to (Parcelable) to resolve ambiguity, however, the receiver complains that is expected Parcelable but found HashMap.
Has anyone been s...
Hello,
I have made a sample application to flip through different layouts in a viewflipper.
XML is basically (pseudo-code)
<ViewFlipper>
<LinearLayout><TextView text:"this is the first page" /></LinearLayout>
<LinearLayout><TextView text:"this is the second page" /></LinearLayout>
<LinearLayout><TextView text:"this is the third page" ...
there are some error in valuse folder:
An error has occurred. See error log for more details.
java.lang.NullPointerException
...
Hello all,
I am basically trying to display map in Android for the first time.
Now i want to display 3 buttons on the map and when i clicked on the particular button, the button's click event should be raised.
(Map should be in full-screen and buttons are at below side)
I dont know, how do i do it ? becoz when we want to display map us...
I have a database, a ListView, and a CustomCursorAdapter that extends CursorAdapter. A menu button adds an item to the database. I want the ListView to update and show this change. Normally it doesn't show this new item until i go to the homescreen and reopen the application.
I did eventually get it to work by calling cursor.requery() ...
I am using the default android sample code "Bluetooth Chat" with HTC Hero. Search device is working and when I click on the list, it can do the pair job and display connecting on the title. But it will throw IOException when call BluetoothServer.connect().
PS: I am not connecting to a bluetooth adapter on PC.
...
I am having a problem right now with setOnClickListener.
When i put this following line:
button.setOnClickListener(this);
And run the application then it does not run and show a message that "Application closed forcefully".
Could you please help me how I can set button onclick event in Android 2.2
Thanks
Chandu
...
ParsedNotificationDataSet result = new ParsedNotificationDataSet();
Cursor c = db.rawQuery("select * from notificationtable", null);
if (c.getCount() > 0) {
c.moveToFirst();
do {
result.setclassurl(c.getString(c.getColumnIndex("Id")));
result.settype(c.getString(c....
Is it possible to add or change the existing applications?
For example, I would like to add a new floating window following the current people when I open the contact manager.
I just want to change it a little bit. And I don't want to rewrite all the features of contact manager.
Is it possible to do this?
As I understanding, the view...
Hi,
Currently iam using droid motorola device for developement.I need to update one patch file to overcome the Bluetooth connection error from .cpp file.Still now i don't have any experience on this and Iam unable to traverse the core/jni/ folder of my device.Please give me guidance to update the patch and how to move to the jni folder?...