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. Android Eclipse plugin: setting background in wysiwyg didn't set background

Is this the best place to ask about the Android Eclipse plugin?

I just noticed that when I changed the background property of my main layout 
in the wysiwyg mode ("Graphical Layout"), it looks fine in the graphical 
mode, but it doesn't appear to have changed the actual layout file. The 
display shows the background from the background picture I specified, but 
when I switch to the XML view, the background property isn't set, and when I 
run on the emulator, it doesn't have the new background (just the default). 
There is no indication that my file isn't saved.

-- 

2. Android Mp3 Intent: Shazam does it, how do we?

Nope. Amazon must only provide access to certain people

Aloha,
Rich





-- 

3. Memory management - is usage of direct arguments bad?

4. Android Mp3 Intent: Shazam does it, how do we?

5. WebView Animation Problem

6. Finding ant_rules_r3.xml?

7. Draw event not moving bitmap