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

  • SEARCH
  • Home
  • 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 9188081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:55:40+00:00 2026-06-17T19:55:40+00:00

Sorry for the stupid question, but this has been really confusing to me. I’m

  • 0

Sorry for the stupid question, but this has been really confusing to me. I’m making a planner app, and I want the first screen to show a list of Itineraries pulled from a database(but maybe an array would work better?). I need the user to be able to add and delete them as they desire(via a menu button)A, and I want them to show two lines of text.

After clicking on the itinerary, it just should the user to a calendar-like page showing the various events that they’ve created, which will also be pulled from a database. If I can get it figured out for the main screen, I can likely figure it out again. I’m just having a bit of trouble figuring it all out. I’ve read the documentation and all that. It’s just going a bit over my head. I’ve never so much as shaken a stick at a database before.

TL;DR:

I need to create a user editable database(or array) that will be displayed in a ListView. How do I create and manage the database, and how do I get the contents to appear nicely in a ListView?

Thank you everyone!

MainActivity.java

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;

public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }

    public void addEvent(View view) {       

    }
}

/menu/activity_main.xml

<menu xmlns:android="http://schemas.android.com/apk/res/android" >

    <item
        android:id="@+id/menu_settings"
        android:orderInCategory="100"
        android:showAsAction="never"
        android:title="@string/menu_settings"/>

    <item
        android:showAsAction="always|withText"
        android:title="@string/add_event"
        android:icon="@drawable/newcontent" />

</menu>

/layout/activity_main.xml

<ListView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/ListView1"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity" >

</ListView>
  • 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-06-17T19:55:41+00:00Added an answer on June 17, 2026 at 7:55 pm

    Most of the information is found in the android developer resources, but its hard to know what to look for if you haven’t done it before. You can create a SQLite database and the interface to load data from the tables using a ContentProvider. Then use a CursorLoader to a asynchronously load the relevant records to populate your views. To change between the different pages try creating them as separate fragments which you can then change programmatically from the appropriate event handlers.

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

Sidebar

Related Questions

sorry if the question is stupid and has been asked thousands of times but
sorry for stupid question. But really interesting and incomprehensible. In this session discussed about
Sorry if this is a stupid question, but is there an easy way to
Sorry if this question seems stupid, but it's stumped me for a couple days,
first sorry if its a stupid question but im lost a bit. So when
Really stupid question, sorry, but I can't find it on google (I'm sure it's
I'm sorry if this a stupid question, but I am new to this. I
I'm sorry, but I'm sure this sounds like a stupid question but could someone
Sorry if this seems like a stupid question but im actually having a hard
im sorry if this is a stupid question but i was curious, i have

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.