├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ ├── drawable-hdpi │ │ │ │ └── add.png │ │ │ ├── drawable-mdpi │ │ │ │ └── add.png │ │ │ ├── drawable-xhdpi │ │ │ │ └── add.png │ │ │ ├── drawable-xxhdpi │ │ │ │ └── add.png │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── menu │ │ │ │ └── add.xml │ │ │ ├── xml │ │ │ │ ├── button.xml │ │ │ │ └── input.xml │ │ │ └── layout │ │ │ │ ├── activity_list.xml │ │ │ │ ├── list_item.xml │ │ │ │ ├── activity_detail_data.xml │ │ │ │ ├── activity_edit.xml │ │ │ │ └── activity_main.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── shashank │ │ │ │ └── crud │ │ │ │ ├── Constants.java │ │ │ │ ├── Model.java │ │ │ │ ├── DetailData.java │ │ │ │ ├── RequestHandler.java │ │ │ │ ├── ListActivity.java │ │ │ │ ├── MainActivity.java │ │ │ │ ├── EditActivity.java │ │ │ │ └── MyAdapter.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── shashank │ │ │ └── crud │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── shashank │ │ └── crud │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── android_API ├── crud_api │ ├── index.php │ ├── connection.php │ ├── delete.php │ ├── add.php │ ├── update.php │ ├── select.php │ └── select_id.php └── crud_android.sql ├── ScreenShots ├── 1.png ├── 2.png ├── 3.png ├── 4.png ├── 5.png └── 6.png ├── .idea ├── caches │ ├── gradle_models.ser │ └── build_file_checksums.ser ├── modules.xml ├── misc.xml ├── runConfigurations.xml ├── gradle.xml └── codeStyles │ └── Project.xml ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── ReadMe Run Project.txt ├── gradle.properties ├── README.md ├── gradlew.bat └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /android_API/crud_api/index.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ScreenShots/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shashank-p/CRUD-Android-App/HEAD/ScreenShots/1.png -------------------------------------------------------------------------------- /ScreenShots/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shashank-p/CRUD-Android-App/HEAD/ScreenShots/2.png -------------------------------------------------------------------------------- /ScreenShots/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shashank-p/CRUD-Android-App/HEAD/ScreenShots/3.png -------------------------------------------------------------------------------- /ScreenShots/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shashank-p/CRUD-Android-App/HEAD/ScreenShots/4.png -------------------------------------------------------------------------------- /ScreenShots/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shashank-p/CRUD-Android-App/HEAD/ScreenShots/5.png -------------------------------------------------------------------------------- /ScreenShots/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shashank-p/CRUD-Android-App/HEAD/ScreenShots/6.png -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | CRUD 3 | 4 | -------------------------------------------------------------------------------- /.idea/caches/gradle_models.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shashank-p/CRUD-Android-App/HEAD/.idea/caches/gradle_models.ser -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shashank-p/CRUD-Android-App/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /.idea/caches/build_file_checksums.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shashank-p/CRUD-Android-App/HEAD/.idea/caches/build_file_checksums.ser -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shashank-p/CRUD-Android-App/HEAD/app/src/main/res/drawable-hdpi/add.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shashank-p/CRUD-Android-App/HEAD/app/src/main/res/drawable-mdpi/add.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shashank-p/CRUD-Android-App/HEAD/app/src/main/res/drawable-xhdpi/add.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shashank-p/CRUD-Android-App/HEAD/app/src/main/res/drawable-xxhdpi/add.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shashank-p/CRUD-Android-App/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shashank-p/CRUD-Android-App/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shashank-p/CRUD-Android-App/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shashank-p/CRUD-Android-App/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shashank-p/CRUD-Android-App/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shashank-p/CRUD-Android-App/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shashank-p/CRUD-Android-App/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shashank-p/CRUD-Android-App/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shashank-p/CRUD-Android-App/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shashank-p/CRUD-Android-App/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Feb 27 23:38:34 IST 2019 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip 7 | -------------------------------------------------------------------------------- /android_API/crud_api/connection.php: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ReadMe Run Project.txt: -------------------------------------------------------------------------------- 1 | * Paste the android_API folder to WWW or htdocs in server 2 | * Rename only android_API folder to android OR change the name of the file in Constant.jav file in Android (path to API) 3 | * Change the Connection file with your DB and Table details 4 | * Within android_API -> you'll find sql file (import in your Database after creating DB -> crud_android table anme -> data) -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/menu/add.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | -------------------------------------------------------------------------------- /android_API/crud_api/delete.php: -------------------------------------------------------------------------------- 1 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/xml/button.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/xml/input.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/test/java/com/shashank/crud/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.shashank.crud; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /android_API/crud_api/add.php: -------------------------------------------------------------------------------- 1 | 21 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /android_API/crud_api/update.php: -------------------------------------------------------------------------------- 1 | 22 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/java/com/shashank/crud/Constants.java: -------------------------------------------------------------------------------- 1 | package com.shashank.crud; 2 | 3 | /** 4 | * Created by Asus on 07/02/2018. 5 | */ 6 | 7 | public class Constants { 8 | public static final String URL= "http://192.168.43.68/"; 9 | public static final String ROOT_URL = URL+"android/crud_api/"; 10 | public static final String URL_ADD = ROOT_URL+"add.php"; 11 | public static final String URL_DELETE = ROOT_URL+"delete.php"; 12 | public static final String URL_UPDATE = ROOT_URL+"update.php"; 13 | public static final String URL_SELECT = ROOT_URL+"select.php"; 14 | public static final String URL_SELECT_ID = ROOT_URL+"select_id.php"; 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/java/com/shashank/crud/Model.java: -------------------------------------------------------------------------------- 1 | package com.shashank.crud; 2 | 3 | public class Model { 4 | String id,uid,name,phone,address; 5 | 6 | public Model(String id ,String uid, String name, String phone, String address ) { 7 | this.id = id; 8 | this.uid = uid; 9 | this.name = name; 10 | this.phone = phone; 11 | this.address = address; 12 | } 13 | 14 | public String getId(){ 15 | return id; 16 | } 17 | public String getUId(){ 18 | return uid; 19 | } 20 | public String getName(){ 21 | return name; 22 | } 23 | 24 | public String getPhone(){ 25 | return phone; 26 | } 27 | 28 | public String getAddress(){ 29 | return address; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | -------------------------------------------------------------------------------- /android_API/crud_api/select.php: -------------------------------------------------------------------------------- 1 | 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CRUD-Android-App 2 | CRUD Android App using Volley, JSON, Php API and MySql Database 3 | 4 | It is Simple Create, Read, Update and Delete function capable Android App, It uses Java based Native Code with PHP API and MySql Databse for CRUD operations. 5 | 6 | It uses Volley Library for CRUD Operations over Android App Network. In this we also used JSON for data transfer. 7 | 8 | Do read the Read Me file in Project to Run Project (Just Simple Guide to begin with) 9 | 10 | 11 | It is built to work on Android 5.1 & above 12 | 13 | Technologies used: Android, Java, XML, PHP, MySQL 14 | 15 | IDE: Android Studio 3.3.1 16 | 17 | ![](ScreenShots/1.png?raw=true) 18 | ![](ScreenShots/2.png?raw=true) 19 | ![](ScreenShots/3.png?raw=true) 20 | ![](ScreenShots/4.png?raw=true) 21 | ![](ScreenShots/5.png?raw=true) 22 | ![](ScreenShots/6.png?raw=true) 23 | -------------------------------------------------------------------------------- /android_API/crud_api/select_id.php: -------------------------------------------------------------------------------- 1 | 32 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/shashank/crud/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.shashank.crud; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.code_revolution.siswa", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/com/shashank/crud/DetailData.java: -------------------------------------------------------------------------------- 1 | package com.shashank.crud; 2 | 3 | import android.support.v7.app.AppCompatActivity; 4 | import android.os.Bundle; 5 | import android.widget.TextView; 6 | 7 | public class DetailData extends AppCompatActivity { 8 | TextView uid, name, address, phone; 9 | @Override 10 | protected void onCreate(Bundle savedInstanceState) { 11 | super.onCreate(savedInstanceState); 12 | setContentView(R.layout.activity_detail_data); 13 | 14 | uid = (TextView) findViewById(R.id.uid); 15 | name = (TextView) findViewById(R.id.name); 16 | address = (TextView) findViewById(R.id.address); 17 | phone = (TextView) findViewById(R.id.phone); 18 | 19 | uid.setText(getIntent().getStringExtra("uid")); 20 | name.setText(getIntent().getStringExtra("name")); 21 | address.setText(getIntent().getStringExtra("address")); 22 | phone.setText(getIntent().getStringExtra("phone")); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in D:\sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 28 5 | defaultConfig { 6 | applicationId "com.code_revolution.siswa" 7 | minSdkVersion 19 8 | targetSdkVersion 28 9 | versionCode 1 10 | versionName "1.0" 11 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | implementation fileTree(include: ['*.jar'], dir: 'libs') 23 | androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { 24 | exclude group: 'com.android.support', module: 'support-annotations' 25 | }) 26 | implementation 'com.android.support:appcompat-v7:28.0.0' 27 | implementation 'com.android.support.constraint:constraint-layout:1.1.3' 28 | implementation 'com.android.volley:volley:1.1.1' 29 | implementation 'com.android.support:cardview-v7:28.0.0' 30 | implementation 'com.android.support:recyclerview-v7:28.0.0' 31 | testImplementation 'junit:junit:4.12' 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/shashank/crud/RequestHandler.java: -------------------------------------------------------------------------------- 1 | package com.shashank.crud; 2 | 3 | import android.content.Context; 4 | 5 | import com.android.volley.Request; 6 | import com.android.volley.RequestQueue; 7 | import com.android.volley.toolbox.Volley; 8 | 9 | 10 | public class RequestHandler { 11 | private static RequestHandler mInstance; 12 | private RequestQueue mRequestQueue; 13 | private static Context mCtx; 14 | 15 | private RequestHandler(Context context) { 16 | mCtx = context; 17 | mRequestQueue = getRequestQueue(); 18 | } 19 | 20 | public static synchronized RequestHandler getInstance(Context context) { 21 | if (mInstance == null) { 22 | mInstance = new RequestHandler(context); 23 | } 24 | return mInstance; 25 | } 26 | 27 | public RequestQueue getRequestQueue() { 28 | if (mRequestQueue == null) { 29 | // getApplicationContext() is key, it keeps you from leaking the 30 | // Activity or BroadcastReceiver if someone passes one in. 31 | mRequestQueue = Volley.newRequestQueue(mCtx.getApplicationContext()); 32 | } 33 | return mRequestQueue; 34 | } 35 | 36 | public void addToRequestQueue(Request req) { 37 | getRequestQueue().add(req); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 15 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 27 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /android_API/crud_android.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 4.7.4 3 | -- https://www.phpmyadmin.net/ 4 | -- 5 | -- Host: 127.0.0.1:3306 6 | -- Generation Time: Feb 27, 2019 at 06:45 PM 7 | -- Server version: 5.7.19 8 | -- PHP Version: 5.6.31 9 | 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 11 | SET AUTOCOMMIT = 0; 12 | START TRANSACTION; 13 | SET time_zone = "+00:00"; 14 | 15 | 16 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 17 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 18 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 19 | /*!40101 SET NAMES utf8mb4 */; 20 | 21 | -- 22 | -- Database: `crud_android` 23 | -- 24 | 25 | -- -------------------------------------------------------- 26 | 27 | -- 28 | -- Table structure for table `data` 29 | -- 30 | 31 | DROP TABLE IF EXISTS `data`; 32 | CREATE TABLE IF NOT EXISTS `data` ( 33 | `id` int(11) NOT NULL AUTO_INCREMENT, 34 | `uid` varchar(20) NOT NULL, 35 | `name` varchar(100) NOT NULL, 36 | `phone` varchar(30) NOT NULL, 37 | `address` varchar(150) NOT NULL, 38 | PRIMARY KEY (`id`) 39 | ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1; 40 | 41 | -- 42 | -- Dumping data for table `data` 43 | -- 44 | 45 | INSERT INTO `data` (`id`, `uid`, `name`, `phone`, `address`) VALUES 46 | (1, '978545698869', 'Shashank P', '8987589538', 'Belagavi'), 47 | (2, '123445677890', 'Test Matt', '8545253698', 'NY, USA'); 48 | COMMIT; 49 | 50 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 51 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 52 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 53 | -------------------------------------------------------------------------------- /.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 15 | 16 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /app/src/main/res/layout/list_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 19 | 20 | 25 | 26 | 34 | 35 | 42 | 43 | 47 | 48 | 51 | 52 | 58 | 59 | 65 | 66 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_detail_data.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 12 | 13 | 19 | 20 | 28 | 29 | 36 | 37 | 43 | 44 | 51 | 52 | 58 | 59 | 66 | 67 | 73 | 74 | 81 | 82 | 88 | 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_edit.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 11 | 17 | 25 | 26 | 32 | 33 | 42 | 43 | 49 | 50 | 59 | 60 | 66 | 67 | 76 | 77 | 83 | 84 | 93 | 94 | 95 |