I using a listView, but I set its background color to white, due to
application requirements.
when I run application, it showed a blank white screen when it went
into the 'chapters-menu' activity. It only show when I 'highlight' the
entire listView while application is running.
I've a xml file that has the following layout with listview and
buttons here. I try to change front by using 'android:color' attribute
to "@color/black", but still show blank screen.
Here is the XML file
----
<ListView android:id="@+id/chapters_list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:textColor="@color/black" />
<Button
... />
<Button
... />
----
the following are the sources codes
----
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.Toast;
import android.app.Activity;
import android.view.View;
public class cimaE1Chapters extends Activity
{
String[] chapters;
/** Called when the activity is first created. */
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.cimae1chapters);
ListView list = (ListView) findViewById(R.id.chapters_list);
chapters =
getResources().getStringArray(R.array.chapters_array);
list.setAdapter(new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_1, chapters));
}
}
much help is appreciated. thank you!
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en