I'm trying to get scrolling text (marquee) happening inside a listview, but from my previous reading it seems I need to use setSelected(true) on my textview.
Because the textview is inside listitem instead of listview, I can't seem to use getView on that textView, and thus can't use setSelected.
I'll try and explain with some code:
Here is my oncreate:
setContentView(R.layout.albumsview);
Bundle extras = getIntent().getExtras();
String where = extras.getString("where");
String[] whereVal = extras.getStringArray("whereVal");
String[] columns = { BaseColumns._ID, AudioColumns.ALBUM, };
String orderBy = BaseColumns._ID;
albumCursor = managedQuery(
MediaStore.Audio.Albums.EXTERNAL_CONTENT_URI, columns, where,
whereVal, orderBy);
ListView listView = (ListView) findViewById(R.id.listViewAlbums);
listView.setOnItemClickListener(this);
String[] displayFields = new String[] { AudioColumns.ALBUM };
int[] displayViews = new int[] { R.id.albumTitle };
SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
R.layout.albumitem, albumCursor, displayFields, displayViews);
listView.setAdapter(adapter);
The "albumTitle" is the view containing the textview (called subTitle) which I want to setSelected(true).
Could someone please show me how to do this?
Thanks for your help.