Skip to content

Instantly share code, notes, and snippets.

View alfianyusufabdullah's full-sized avatar
📚
Sometimes playing with Code & Fish

Alfian Yusuf Abdullah alfianyusufabdullah

📚
Sometimes playing with Code & Fish
View GitHub Profile
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="MyButton" parent="Theme.AppCompat.Light">
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/rootView"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.alfianyusufabdullah.crudezqlite.MainActivity">
<LinearLayout
android:layout_width="match_parent"
/**
* Created by jonesrandom on 12/31/17.
*
* @site www.androidexample.web.id
* @github @alfianyusufabdullah
*/
public class App extends Application {
@Override
/**
* Created by jonesrandom on 12/31/17.
*
* @site www.androidexample.web.id
* @github @alfianyusufabdullah
*/
public class App extends Application {
@Override
/**
* Created by jonesrandom on 12/31/17.
*
* @site www.androidexample.web.id
* @github @alfianyusufabdullah
*/
public class DatabaseConfig {
<resources>
<string name="app_name">CRUD-EZQLite</string>
<string name="hint_nama">Nama Mahasiswa</string>
<string name="hint_nim">NIM</string>
<string name="hint_semester">Semester Mahasiswa</string>
<string name="btn_text_tambah_data">Tambah Data</string>
<string name="btn_text_liat_data">Liat Data</string>
<string name="btn_text_update_data">Update Data</string>
@alfianyusufabdullah
alfianyusufabdullah / build.gradle
Created January 2, 2018 11:19
medium - gradle2
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support:design:27.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.github.alfianyusufabdullah:ezqlite-db:1.0.0'
testImplementation 'junit:junit:4.12'
@alfianyusufabdullah
alfianyusufabdullah / build.gradle
Created January 2, 2018 11:14
medium - gradle1
allprojects {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
}
}
String textNama = etNama.getText().toString().trim();
String textNim = etNim.getText().toString();
String textSemester = etSemester.getText().toString().trim();
EZQLite.getInstance(context)
.doInsert("TabelMahasiswa")
.putValue("COL_NAMA", textNama)
.putValue("COL_NIM", textNim)
.putValue("COL_SEMESTER", textSemester)
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#00BCD4</color>
<color name="colorPrimaryDark">#0097A7</color>
<color name="colorAccent">#ff9800</color>
</resources>