Tab Event

by Pinki » Fri, 23 Apr 2010 08:01:58 GMT


Sponsored Links
 Hi I want to add content to linear layout dynamically when i click on
tab .For that purpose i use the following code to create a new Linear
layout and new text view .
LinearLayout ll = new LinearLayout(this);
                                ll.setId(i);
                                ll.setLayoutParams(new
LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));
                                ll.setPadding(0, 0, 0, 5);
                                ll.setClickable(true);

TextView name = new TextView(this);

                        name.setText(user_peoples.get(j).toString());
                                name.setWidth(100);
                                name.setId(++i);
                                name.setClickable(true);
                                name.setLayoutParams(new
LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));

But it is not worked ,Give me some suggestion.Here Null Pointer
Exception is coming.Thanks in advance

--



Other Threads

1. Do I need to protect my code from possible database create/upgrade race conditions?

I have an activity with 2 background threads accessing the same
database.  In each background thread I am using SQLiteOpenHelper to
open the database.  Do I need to worry about onCreate and onUpgrade
potentially being called on each thread?

--
Richard
--~--~---------~--~----~------------~-------~--~----~

2. Samsung Galaxy isn麓t working af ter update - whole system error!!!

Hi everybody,
A few minutes ago I have updated my Samsung Galaxy with the "New PC
Studio" for Germany (not Android 1.6!!!).
After that, my mobile restarted and now the whole system isnt
working.
There always appers an error message that process com.android.phone
has stopped unexpectedly.
Normaly( when I bought this phone ) I was able to tap to Wait, but now
there is no way to do it.
Now I can only tap to close but then it cuttes all my conections.
This wouldnt be the problem if it appeared only one time, but
THE ERROR MESSAGE APPEARS EVERY 5 SECONDS!!!

Do you know what to do now???

Will the problem be fixed with Android 1.6, which (I hope) will appear
in Germany the next days???



Thanks in advance
Viktor
--~--~---------~--~----~------------~-------~--~----~

3. sdcard mounted ok, but get "Unable to open trace file '/sdcard/x.trace", why?

4. onActivityResult() : delivering data problem

5. We do believe in Google !

6. Cursor.moveToPosition(0) is false even with content

7. Notification - Getting Pending Notifications