Hi all,

I have been trying this thing for  about 16 hours now ...

my code:

public MyDialog (Context context)           //Dialog constructor
{

                super(context);
                this.setTitle(R.string.track_choose);
                //this.setContentView(R.layout.trackmode_);

                                participants = new String [2];
                                participants[1] = "cucu";
                                participants[2] =
"ffffffffffffffffffffffffgggggggggggggggggggggggggggggggggggg";

                ArrayList<String> arr = new ArrayList<String> (2);
                arr.add("cucu");
                arr.add("mirabelafdfjsfgyugfyubjcwfnewhf7387ft38fg");
                //listAdapter = new ArrayAdapter<String>(context,
android.R.layout.simple_list_item_1, participants);
                        listAdapter = new
ArrayAdapter<String>(getContext(), R.layout.trackmode, participants);
                //listAdapter = new ArrayAdapter<String>(context,
R.layout.trackmode, arr);

                //ListView participantList = (ListView)
this.findViewById(R.id.listParticipants);
                                participantList = new ListView
(getContext());
                LinearLayout.LayoutParams params = new 
LinearLayout.LayoutParams (1,
0x77);
                //participantList.setLayoutParams(params);

                                participantList.setAdapter(listAdapter);
                participantList.setOnItemSelectedListener(this);

                                //this.setContentView
(participantList);

                this.addContentView (participantList, params);
                participantList.setEnabled(true);
                //participantList.setItemsCanFocus(true);
                participantList.setVisibility(View.VISIBLE);
        }

I have also tried to move this / part of this code in places such as
onPreparePanel(int featureId, View view, Menu menu)        and
onCreatePanelView(featureId) overridables with no success. Comments
were left there intentionally just to point out what I have already
tried.



R.layout.trackmode's XML is like this (and it makes no difference if I
use my own layout or android.R.layout.simple_list_item_1 resource):

<?xml version="1.0" encoding="UTF-8"?>

<TextView xmlns:android="http://schemas.android.com/apk/res/android";
                  id="textview" android:textStyle="bold" 
android:singleLine="false"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content" />


The result I am able to get right now is a neat looking transparent
dialog, with a title and a ListView object in it. However, the
ListView object only shws a veeeery thin orange vertical line on the
left side. And one can  actually see how that thin line shifts colours
as I press the arrowkeys to select Items in the ListView. Only thing
is that there are not 2 items as I intented to be, but some 5-6 items.
After the 5th or 6th, if  pressed 'down arrow' again, a
nullpointerexception is thrown.

heeeeeeeeeeeeeelp
thank you,
kellogs
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to