This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Override | |
| public void onClick(View view) { | |
| switch (view.getId()) { | |
| case R.id.btnLihatData: | |
| break; | |
| case R.id.btnTambahData: | |
| textNama = etNama.getText().toString().trim(); | |
| textNim = etNim.getText().toString(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class MainActivity extends AppCompatActivity implements View.OnClickListener { | |
| TextInputLayout inputNama, inputNim, inputSemester; | |
| TextInputEditText etNama, etNim, etSemester; | |
| Button btnTambahData, btnLiatData; | |
| String textNama, textNim, textSemester; | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <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"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Created by jonesrandom on 12/31/17. | |
| * | |
| * @site www.androidexample.web.id | |
| * @github @alfianyusufabdullah | |
| */ | |
| public class App extends Application { | |
| @Override |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Created by jonesrandom on 12/31/17. | |
| * | |
| * @site www.androidexample.web.id | |
| * @github @alfianyusufabdullah | |
| */ | |
| public class App extends Application { | |
| @Override |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Created by jonesrandom on 12/31/17. | |
| * | |
| * @site www.androidexample.web.id | |
| * @github @alfianyusufabdullah | |
| */ | |
| public class DatabaseConfig { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| allprojects { | |
| repositories { | |
| google() | |
| jcenter() | |
| maven { url 'https://jitpack.io' } | |
| } | |
| } |