Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6059483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:42:56+00:00 2026-05-23T08:42:56+00:00

I want to make a list contains some username from my sqlite database. I

  • 0

I want to make a list contains some username from my sqlite database. I want it has white background and black text. I felt difficult when find every tutorial thought me to use extends listactivity….is there any technique to make it ?
here is some of my code in nir.java

setContentView(R.layout.changeplayer);
btnCreateN = (Button)findViewById(R.id.btnCreateNew);
btnCreateN.setOnClickListener(this);
btnSetP = (Button)findViewById(R.id.btnOK);
btnSetP.setOnClickListener(this);
//buat listview
lstUnameView = (ListView)findViewById(R.id.listUsername);
adapter = new ArrayAdapter <String>(this, 
          android.R.layout.simple_list_item_1, lstUname);
lstUnameView.setAdapter(adapter);


//koneksi ke db, ngambil username-username
helper = new sqlite(this, "tamadb", 1);
db1 = helper.getWritableDatabase();
c = db1.rawQuery("SELECT username FROM tama", null);
if(c.moveToFirst())
{
    do
    {
    lstUname.add(c.getString(0));
    }while(c.moveToNext());
}
helper.close();

and this my code in layout changeplayer

<RelativeLayout xmlns:android="schemas.android.com/apk/res/android"; 
        android:layout_width="fill_parent" 
        android:layout_height="fill_parent">
    <ListView android:id="@+id/listUsername" 
          android:layout_width="fill_parent" 
          android:layout_height="350px" 
          android:drawSelectorOnTop="false" 
                  android:background = "#FFFFFFFF" 
                  android:cacheColorHint = "#191919" />
    <Button android:id="@+id/btnCreateNew" 
        android:layout_width="120px"
        android:layout_height="wrap_content" 
        android:text="Create New" 
        android:layout_below="@id/listUsername" 
        android:layout_marginLeft="40px" /> 
    <Button android:id="@+id/btnOK"
        android:layout_width="120px"
        android:layout_height="wrap_content" 
        android:text="OK" 
        android:layout_below="@id/listUsername" 
        android:layout_toRightOf="@id/btnCreateNew" />
</RelativeLayout> 

Please help, i want to finish this project too…he9x..thx before…^^

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T08:42:56+00:00Added an answer on May 23, 2026 at 8:42 am

    If you want your whole app to have white background and black text you can set the theme for your app to Theme.Light. Therefore you have to add the attribute android:theme="@android:style/Theme.Light" to the element of the manifest file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to make a long list short by hiding some elements in long
I want to make a drop-down list from scratch. Can anyone please tell me
I have a list view that contains some data, I want to share it
I am traversing a HTML document using javascript DOM. I want make a list
i want to make a dynamic list with buttons on it. My button in
I want to make a query to list cats that took longer than average
i want to make an stylized unordered list like the following, but i don't
I want to using Linq to help make a list of movies an actor
I want to make it so the item I have selected in the list
i want to make a tri-state checkbox inside listview control, iam using image list

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.