Will it work if I setListViewAdapter dynamically?

by olko » Wed, 04 Mar 2009 16:40:08 GMT

Sponsored Links
 I am trying to change ListView adapter on the  fly like this (the
AdapterMain* extends BaseAdapter):

                                if(main_view) {
                                else {

Should I do other things or this would be enough?

Will it work if I setListViewAdapter dynamically?

by olko » Sat, 07 Mar 2009 03:49:50 GMT

 > It will work :)

yes, it does :)


Sponsored Links

Other Threads

1. Understanding the BroadcastReceiver


I have an application that uses an extended BroadcastReceiver class inside
the Activity. I have the extended BroadcastReceiver class as a member
variable of the Activity class. But it looks like the receiver references
keep changing between its construction and 'onReceive' method call. I would
like to understand this better. Here are some details.

public class MyEventReceiver extends BroadcastReceiver {

    public MyEventReceiver(BNDialogInterface dlg) {
        System.out.println("Receiver Object in constructor: "+this);

    public void onReceive(Context context, Intent intent) {
        System.out.println("Receiver Object in onReceive: "+this);


My Activity class:

public class Notepadv2 extends Activity {
    private MyEventReceiver receiver;

    protected void onStart() {
        // TODO Auto-generated method stub
        receiver = new MyEventReceiver(this);

        Intent myIntent = new Intent("Test");


<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    <application android:icon="@drawable/icon">

      <receiver android:name=".MyEventReceiver" android:enabled="true"
               <action android:name="Test" />

        <activity android:name=".Notepadv2"
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />

<activity android:name=".NoteEdit"></activity>


2. get version from apk

Hi, can I get version from .apk file. I tried to open
androidmanifest.xml but I realized that xml files are destructed when
apk created.

3. Taking Control of Default UI

4. Multitouch support in Donut?

5. Multitouch API for the Hero ??

6. can andriod be in pda area?

7. 'm trying to align a button to the bottom of the frame