Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hoe to create a SQLiteDatabase in android studio?How to store and retrive the data in SQLiteDatabase? #82

Closed
amarpulli1994 opened this issue Apr 28, 2016 · 1 comment

Comments

@amarpulli1994
Copy link

amarpulli1994 commented Apr 28, 2016

Hello,
I want to create a database for storing the user profiles.I will keep user profiles options top of the sitemap layout page like menu option item selected the code given as below screen shots
screenshot from 2016-04-28 17-29-32
screenshot from 2016-04-28 17-31-17
Whenever user want to select the "AddProfile" options it will open "Enter user profiles" layout
screenshot from 2016-04-28 17-34-46.
But I don't know how to store the user profiles in database.I create a database class for storing the profile given as below
screenshot from 2016-04-28 17-41-13
I don't know wether it is correct or not.Please a give a suggestion for creating a database.
Where I create a database in local or server.How to create a database in local.
Here the giving a addprofiles class
screenshot from 2016-04-28 17-44-24
here the addprofiles.xml file

<TextView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="Enter your Profiles:"
    android:id="@+id/textView"
    android:layout_alignParentTop="true"
    android:layout_centerHorizontal="true"
    android:textSize="20dp"
    android:textColor="#000000" />

<EditText
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:id="@+id/editText"
    android:layout_below="@+id/textView"
    android:layout_centerHorizontal="true"
    android:textColor="#000000" />

<Button
    style="?android:attr/buttonStyleSmall"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="save"
    android:onClick="addProfiles"
    android:id="@+id/btnsave"
    android:layout_below="@+id/editText"
    android:textColor="#000000" />
Thanks, Amar.
@ibaton
Copy link
Owner

ibaton commented Apr 28, 2016

@amarpulli544 . Take a look at #81
Would be awesome if you stoped opening new issues to get an answer.

@ibaton ibaton closed this as completed Apr 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants