Commit 8d1e7065 by Amsal Situmorang

add for the first time

parents
<?php
define('DB_HOST', 'localhost');
define('DB_USER', 'root');
define('DB_PASS', '');
define('DB_NAME', 'pos_resto');
?>
\ No newline at end of file
<?php
require_once 'koneksi.php';
if($_SERVER['REQUEST_METHOD'] == 'POST')
{
$id_makanan = $_POST['id_makanan'];
$query = "DELETE FROM makanan WHERE id_makanan ='$id_makanan'";
$exeQuery = mysqli_query($konek, $query);
echo ($exeQuery) ? json_encode(array('kode' =>1, 'pesan' => 'berhasil Menghapus data')) : json_encode(array('kode' =>2, 'pesan' => 'data gagal dihapus'));
}
else
{
echo json_encode(array('kode' =>101, 'pesan' => 'request tidak valid'));
}
?>
\ No newline at end of file
<?php
require_once 'koneksi.php';
if($_SERVER['REQUEST_METHOD'] == 'POST')
{
$nama = $_POST['nama'];
$harga = $_POST['harga'];
$query = "INSERT INTO makanan (nama, harga) VALUES ('$nama','$harga')";
$exeQuery = mysqli_query($konek, $query);
echo ($exeQuery) ? json_encode(array('kode' =>1, 'pesan' => 'berhasil menambahkan data')) : json_encode(array('kode' =>2, 'pesan' => 'data gagal ditambahkan'));
}
else
{
echo json_encode(array('kode' =>101, 'pesan' => 'request tidak valid'));
}
?>
\ No newline at end of file
<?php
include 'config.php';
$konek = new Mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME) or die(Mysqli_errno());
?>
\ No newline at end of file
<?php
require_once 'koneksi.php';
$query = "SELECT * FROM makanan ORDER BY nama";
$result = mysqli_query($konek,$query);
$array = array();
while ($row = mysqli_fetch_assoc($result))
{
$array[] = $row;
}
echo ($result) ?
json_encode(array("kode" => 1, "result"=>$array)) :
json_encode(array("kode" => 0, "pesan"=>"data tidak ditemukan"));
?>
\ No newline at end of file
<?php
require_once 'koneksi.php';
if($_SERVER['REQUEST_METHOD'] == 'POST')
{
$id_makanan = $_POST['id_makanan'];
$nama = $_POST['nama'];
$harga = $_POST['harga'];
$query = "UPDATE makanan SET nama = '$nama',harga = '$harga' WHERE id_makanan='$id_makanan'";
$exeQuery = mysqli_query($konek, $query);
echo ($exeQuery) ? json_encode(array('kode' =>1, 'pesan' => 'data berhasil update')) : json_encode(array('kode' =>2, 'pesan' => 'data gagal diupdate'));
}
else
{
echo json_encode(array('kode' =>101, 'pesan' => 'request tidak valid'));
}
?>
\ No newline at end of file
<?php
define('DB_HOST', 'localhost');
define('DB_USER', 'root');
define('DB_PASS', '');
define('DB_NAME', 'pos_resto');
?>
\ No newline at end of file
<?php
require_once 'koneksi.php';
if($_SERVER['REQUEST_METHOD'] == 'POST')
{
$id_pegawai = $_POST['id_pegawai'];
$query = "DELETE FROM pegawai WHERE id_pegawai ='$id_pegawai'";
$exeQuery = mysqli_query($konek, $query);
echo ($exeQuery) ? json_encode(array('kode' =>1, 'pesan' => 'berhasil Menghapus data')) : json_encode(array('kode' =>2, 'pesan' => 'data gagal dihapus'));
}
else
{
echo json_encode(array('kode' =>101, 'pesan' => 'request tidak valid'));
}
?>
\ No newline at end of file
<?php
require_once 'koneksi.php';
if($_SERVER['REQUEST_METHOD'] == 'POST')
{
$nama = $_POST['nama'];
$username = $_POST['username'];
$password = $_POST['password'];
$jenis_kelamin = $_POST['jenis_kelamin'];
$alamat = $_POST['alamat'];
$query = "INSERT INTO pegawai (nama, username, password, jenis_kelamin, alamat) VALUES ('$nama','$username', '$password', '$jenis_kelamin', '$alamat')";
$exeQuery = mysqli_query($konek, $query);
echo ($exeQuery) ? json_encode(array('kode' =>1, 'pesan' => 'berhasil menambahkan data')) : json_encode(array('kode' =>2, 'pesan' => 'data gagal ditambahkan'));
}
else
{
echo json_encode(array('kode' =>101, 'pesan' => 'request tidak valid'));
}
?>
\ No newline at end of file
<?php
include 'config.php';
$konek = new Mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME) or die(Mysqli_errno());
?>
\ No newline at end of file
<?php
require_once 'koneksi.php';
$query = "SELECT * FROM pegawai ORDER BY nama";
$result = mysqli_query($konek,$query);
$array = array();
while ($row = mysqli_fetch_assoc($result))
{
$array[] = $row;
}
echo ($result) ?
json_encode(array("kode" => 1, "result"=>$array)) :
json_encode(array("kode" => 0, "pesan"=>"data tidak ditemukan"));
?>
\ No newline at end of file
<?php
require_once 'koneksi.php';
if($_SERVER['REQUEST_METHOD'] == 'POST')
{
// $id_pegawai = $_POST['id_pegawai'];
$nama = $_POST['nama'];
$username = $_POST['username'];
$password = $_POST['password'];
$jenis_kelamin = $_POST['jenis_kelamin'];
$alamat = $_POST['alamat'];
$query = "UPDATE pegawai SET nama = '$nama',username = '$username', password = '$password', jenis_kelamin = '$jenis_kelamin', alamat = '$alamat' WHERE nama='$nama'";
$exeQuery = mysqli_query($konek, $query);
echo ($exeQuery) ? json_encode(array('kode' =>1, 'pesan' => 'data berhasil update')) : json_encode(array('kode' =>2, 'pesan' => 'data gagal diupdate'));
}
else
{
echo json_encode(array('kode' =>101, 'pesan' => 'request tidak valid'));
}
?>
\ No newline at end of file
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<Objective-C-extensions>
<file>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
</file>
<class>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
</class>
<extensions>
<pair source="cpp" header="h" fileNamingConvention="NONE" />
<pair source="c" header="h" fileNamingConvention="NONE" />
</extensions>
</Objective-C-extensions>
</code_scheme>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<compositeConfiguration>
<compositeBuild compositeDefinitionSource="SCRIPT" />
</compositeConfiguration>
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="resolveModulePerSourceSet" value="false" />
</GradleProjectSettings>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
</set>
</option>
</component>
</project>
\ No newline at end of file
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "stud.develops.pointofsale"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.google.firebase:firebase-database:16.0.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
implementation 'com.squareup.retrofit2:retrofit:2.2.0'
implementation 'com.squareup.retrofit2:converter-gson:2.1.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
}
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
package stud.develops.pointofsale;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("stud.develops.pointofsale", appContext.getPackageName());
}
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="stud.develops.pointofsale">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".Kasir"></activity>
<activity android:name=".Splashscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".LoginActivity"></activity>
<activity android:name=".MainActivity" />
<activity android:name=".MenuMakanan" />
<activity android:name=".Profil" />
<activity android:name=".Transaksi" />
<activity android:name=".HomeOwner" />
<activity android:name=".RegisterActivity" />
<activity android:name=".Laporan" />
<activity android:name=".Pegawai" />
<activity android:name=".TambahMakanan" />
<activity android:name=".TambahPegawai" />
<activity android:name=".TampilData" />
<activity android:name=".TampilData2" />
</application>
</manifest>
\ No newline at end of file
package stud.develops.pointofsale;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import java.util.ArrayList;
public class AdapterMakanan extends RecyclerView.Adapter<AdapterMakanan.MakananViewHolder> {
private ArrayList<Makanan>dataList;
public AdapterMakanan(ArrayList<Makanan> dataList){
this.dataList = dataList;
}
@Override
public MakananViewHolder onCreateViewHolder(ViewGroup parent, int i) {
LayoutInflater layoutInflater = LayoutInflater.from(parent.getContext());
View view = layoutInflater.inflate(R.layout.list_item, parent, false);
return new MakananViewHolder(view);
}
@Override
public void onBindViewHolder(MakananViewHolder holder, int position){
holder.txt_nama.setText(dataList.get(position).getNama());
holder.txt_harga.setText(dataList.get(position).getHarga());
holder.txt_jumlah.setText(dataList.get(position).getJumlah());
}
@Override
public int getItemCount(){
return (dataList != null) ? dataList.size():0;
}
public class MakananViewHolder extends RecyclerView.ViewHolder{
private TextView txt_nama, txt_harga, txt_jumlah;
public MakananViewHolder (View itemView){
super(itemView);
txt_nama = (TextView) itemView.findViewById(R.id.txt_nama);
txt_harga = (TextView) itemView.findViewById(R.id.txt_harga);
txt_jumlah = (TextView) itemView.findViewById(R.id.txt_jumlah);
}
}
}
package stud.develops.pointofsale;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import java.util.ArrayList;
public class AdapterPegawai extends RecyclerView.Adapter<AdapterPegawai.PegawaiViewHolder> {
private ArrayList<Pegawaim>dataList;
public AdapterPegawai(ArrayList<Pegawaim> dataList){
this.dataList = dataList;
}
@Override
public AdapterPegawai.PegawaiViewHolder onCreateViewHolder(ViewGroup parent, int i) {
LayoutInflater layoutInflater = LayoutInflater.from(parent.getContext());
View view = layoutInflater.inflate(R.layout.list_pegawai, parent, false);
return new AdapterPegawai.PegawaiViewHolder(view);
}
@Override
public void onBindViewHolder(AdapterPegawai.PegawaiViewHolder holder, int position){
holder.txt_nama.setText(dataList.get(position).getNama());
holder.txt_username.setText(dataList.get(position).getUsername());
holder.txt_password.setText(dataList.get(position).getPassword());
holder.txt_jeniskelamin.setText(dataList.get(position).getJeniskelamin());
holder.txt_alamat.setText(dataList.get(position).getAlamat());
}
@Override
public int getItemCount(){
return (dataList != null) ? dataList.size():0;
}
public class PegawaiViewHolder extends RecyclerView.ViewHolder{
private TextView txt_nama, txt_username, txt_password, txt_jeniskelamin, txt_alamat;
public PegawaiViewHolder (View itemView){
super(itemView);
txt_nama = (TextView) itemView.findViewById(R.id.txt_nama);
txt_username = (TextView) itemView.findViewById(R.id.txt_username);
txt_password = (TextView) itemView.findViewById(R.id.txt_password);
txt_jeniskelamin = (TextView) itemView.findViewById(R.id.txt_jeniskelamin);
txt_alamat = (TextView) itemView.findViewById(R.id.txt_alamat);
}
}
}
package stud.develops.pointofsale;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
public class HomeOwner extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home_owner);
}
public void profi(View view) {
Intent intent = new Intent(HomeOwner.this, Profil.class);
startActivity(intent);
}
public void menumakanan(View view) {
Intent intent = new Intent(HomeOwner.this, TambahMakanan.class);
startActivity(intent);
}
public void transaksi(View view) {
Intent intent = new Intent(HomeOwner.this, Kasir.class);
startActivity(intent);
}
public void laporan(View view) {
Intent intent = new Intent(HomeOwner.this, Laporan.class);
startActivity(intent);
}
public void pegawai(View view) {
Intent intent = new Intent(HomeOwner.this, TampilData2.class);
startActivity(intent);
}
public void kasir(View view) {
Intent intent = new Intent(HomeOwner.this, Transaksi.class);
startActivity(intent);
}
}
package stud.develops.pointofsale;
import android.app.ProgressDialog;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import java.util.ArrayList;
import java.util.List;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import stud.develops.pointofsale.adapter.AdapterData;
import stud.develops.pointofsale.api.ApiRequest;
import stud.develops.pointofsale.api.RetroServer;
import stud.develops.pointofsale.model.DataModel;
import stud.develops.pointofsale.model.ResponsModel;
public class Kasir extends AppCompatActivity {
private RecyclerView mRecycler;
private RecyclerView.Adapter mAdapter;
private RecyclerView.LayoutManager mManager;
private List<DataModel> mItems = new ArrayList<>();
ProgressDialog pd;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tampil_data);
mRecycler = (RecyclerView) findViewById(R.id.recyclerTemp);
mManager = new LinearLayoutManager(this,LinearLayoutManager.VERTICAL, false);
mRecycler.setLayoutManager(mManager);
ApiRequest api = RetroServer.getClient().create(ApiRequest.class);
Call<ResponsModel> getdata = api.getBiodata();
getdata.enqueue(new Callback<ResponsModel>() {
@Override
public void onResponse(Call<ResponsModel> call, Response<ResponsModel> response) {
Log.d("RETRO", "RESPONSE : " + response.body().getKode());
mItems = response.body().getResult();
mAdapter = new AdapterData(Kasir.this,mItems);
mRecycler.setAdapter(mAdapter);
mAdapter.notifyDataSetChanged();
}
@Override
public void onFailure(Call<ResponsModel> call, Throwable t) {
//pd.hide();
Log.d("RETRO", "FAILED : respon gagal");
}
});
}
}
package stud.develops.pointofsale;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class Laporan extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_laporan);
}
}
package stud.develops.pointofsale;
import android.app.ProgressDialog;
import android.content.Intent;
import android.support.design.widget.Snackbar;
import android.support.design.widget.TextInputLayout;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.Html;
import android.text.Spanned;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
public class LoginActivity extends AppCompatActivity {
//Declaration EditTexts
EditText editTextEmail;
EditText editTextPassword;
//Declaration TextInputLayout
TextInputLayout textInputLayoutEmail;
TextInputLayout textInputLayoutPassword;
//Declaration Button
Button buttonLogin;
//Declaration SqliteHelper
SqliteHelper sqliteHelper;
ProgressDialog pDialog;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
sqliteHelper = new SqliteHelper(this);
initCreateAccountTextView();
initViews();
//set click event of login button
buttonLogin.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
pDialog = new ProgressDialog(LoginActivity.this);
pDialog.setMessage("Tunggu.. Anda memasuki Black Yellow Shop");
pDialog.setIndeterminate(false);
pDialog.setCancelable(true);
pDialog.show();
//Check user input is correct or not
if (validate()) {
//Get values from EditText fields
String Email = editTextEmail.getText().toString();
String Password = editTextPassword.getText().toString();
//Authenticate user
User currentUser = sqliteHelper.Authenticate(new User(null, null, Email, Password));
//Check Authentication is successful or not
if (currentUser != null) {
Snackbar.make(buttonLogin, "Successfully Logged in!", Snackbar.LENGTH_LONG).show();
//User Logged in Successfully Launch You home screen activity
Intent intent=new Intent(LoginActivity.this,HomeOwner.class);
startActivity(intent);
finish();
} else {
//User Logged in Failed
Snackbar.make(buttonLogin, "Failed to log in , please try again", Snackbar.LENGTH_LONG).show();
}
}
}
});
}
//this method used to set Create account TextView text and click event( maltipal colors
// for TextView yet not supported in Xml so i have done it programmatically)
private void initCreateAccountTextView() {
TextView textViewCreateAccount = (TextView) findViewById(R.id.textViewCreateAccount);
textViewCreateAccount.setText(fromHtml("<font color='#ffffff'>I don't have account yet. </font><font color='#0c0099'>create one</font>"));
textViewCreateAccount.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(LoginActivity.this, RegisterActivity.class);
startActivity(intent);
}
});
}
//this method is used to connect XML views to its Objects
private void initViews() {
editTextEmail = (EditText) findViewById(R.id.editTextEmail);
editTextPassword = (EditText) findViewById(R.id.editTextPassword);
textInputLayoutEmail = (TextInputLayout) findViewById(R.id.textInputLayoutEmail);
textInputLayoutPassword = (TextInputLayout) findViewById(R.id.textInputLayoutPassword);
buttonLogin = (Button) findViewById(R.id.buttonLogin);
}
//This method is for handling fromHtml method deprecation
@SuppressWarnings("deprecation")
public static Spanned fromHtml(String html) {
Spanned result;
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {
result = Html.fromHtml(html, Html.FROM_HTML_MODE_LEGACY);
} else {
result = Html.fromHtml(html);
}
return result;
}
//This method is used to validate input given by user
public boolean validate() {
boolean valid = false;
//Get values from EditText fields
String Email = editTextEmail.getText().toString();
String Password = editTextPassword.getText().toString();
//Handling validation for Email field
if (!android.util.Patterns.EMAIL_ADDRESS.matcher(Email).matches()) {
valid = false;
textInputLayoutEmail.setError("Please enter valid email!");
} else {
valid = true;
textInputLayoutEmail.setError(null);
}
//Handling validation for Password field
if (Password.isEmpty()) {
valid = false;
textInputLayoutPassword.setError("Please enter valid password!");
} else {
if (Password.length() > 8) {
valid = true;
textInputLayoutPassword.setError(null);
} else {
valid = false;
textInputLayoutPassword.setError("Password is to short!");
}
}
return valid;
}
}
package stud.develops.pointofsale;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
package stud.develops.pointofsale;
public class Makanan {
private String nama;
private String harga;
private String jumlah;
public Makanan(String nama, String harga, String jumlah) {
this.nama = nama;
this.harga = harga;
this.jumlah = jumlah;
}
public Makanan() {
}
public String getNama() {
return nama;
}
public void setNama(String nama) {
this.nama = nama;
}
public String getHarga() {
return harga;
}
public void setHarga(String harga) {
this.harga = harga;
}
public String getJumlah() {
return jumlah;
}
public void setJumlah(String jumlah) {
this.jumlah = jumlah;
}
}
package stud.develops.pointofsale;
import android.content.Intent;
import android.support.design.widget.FloatingActionButton;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import java.util.ArrayList;
public class MenuMakanan extends AppCompatActivity {
private RecyclerView recyclerView;
private AdapterMakanan adapterMakanan;
private ArrayList<Makanan>makananArrayList;
FloatingActionButton fab;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_menu_makanan);
// fab=(FloatingActionButton) findViewById(R.id.fab);
// fab.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// Intent intent = new Intent(MenuMakanan.this, TambahMakanan.class);
// startActivity(intent);
// }
// });
addData();
recyclerView = (RecyclerView) findViewById(R.id.recyclerview);
adapterMakanan = new AdapterMakanan(makananArrayList);
RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(MenuMakanan.this);
recyclerView.setLayoutManager(layoutManager);
recyclerView.setAdapter(adapterMakanan);
}
void addData(){
makananArrayList = new ArrayList<>();
makananArrayList.add(new Makanan("Nasi Goreng", "10000", "10"));
makananArrayList.add(new Makanan("Nasi Ayam", "10000", "10"));
makananArrayList.add(new Makanan("Nasi Pecal", "10000", "10"));
makananArrayList.add(new Makanan("Nasi Soto", "10000", "10"));
makananArrayList.add(new Makanan("Nasi Uduk", "10000", "10"));
}
}
package stud.develops.pointofsale;
import android.content.Intent;
import android.support.design.widget.FloatingActionButton;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import java.util.ArrayList;
public class Pegawai extends AppCompatActivity {
private RecyclerView recyclerView;
private AdapterPegawai adapterPegawai;
private ArrayList<Pegawaim> pegawaimArrayList;
FloatingActionButton fab;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_pegawai);
fab=(FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Pegawai.this, TambahPegawai.class);
startActivity(intent);
}
});
addData();
recyclerView = (RecyclerView) findViewById(R.id.recyclerview);
adapterPegawai = new AdapterPegawai(pegawaimArrayList);
RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(Pegawai.this);
recyclerView.setLayoutManager(layoutManager);
recyclerView.setAdapter(adapterPegawai);
}
void addData(){
pegawaimArrayList = new ArrayList<>();
pegawaimArrayList.add(new Pegawaim("Raissa", "Raissa", "if317015", "perempuan", "parapat"));
pegawaimArrayList.add(new Pegawaim("Amsal", "Amsal", "if317035", "lakilaki", "tarutung"));
pegawaimArrayList.add(new Pegawaim("Sweta", "Sweta", "if317007", "perempuan", "tarutung"));
pegawaimArrayList.add(new Pegawaim("Kornel", "Kornel", "if317040", "lakilaki", "medan"));
pegawaimArrayList.add(new Pegawaim("Miranda", "Miranda", "if317015", "perempuan", "parapat"));
}
}
package stud.develops.pointofsale;
public class Pegawaim {
private String nama;
private String username;
private String password;
private String jeniskelamin;
private String alamat;
public Pegawaim(String nama, String username, String password, String jeniskelamin, String alamat) {
this.nama = nama;
this.username = username;
this.password = password;
this.jeniskelamin = jeniskelamin;
this.alamat = alamat;
}
public Pegawaim() {
}
public String getNama() {
return nama;
}
public void setNama(String nama) {
this.nama = nama;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getJeniskelamin() {
return jeniskelamin;
}
public void setJeniskelamin(String jeniskelamin) {
this.jeniskelamin = jeniskelamin;
}
public String getAlamat() {
return alamat;
}
public void setAlamat(String alamat) {
this.alamat = alamat;
}
}
package stud.develops.pointofsale;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class Profil extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_profil);
}
}
package stud.develops.pointofsale;
import android.app.ProgressDialog;
import android.os.Handler;
import android.support.annotation.Nullable;
import android.support.design.widget.Snackbar;
import android.support.design.widget.TextInputLayout;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.app.ProgressDialog;
import android.os.Handler;
import android.support.annotation.Nullable;
import android.support.design.widget.Snackbar;
import android.support.design.widget.TextInputLayout;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
public class RegisterActivity extends AppCompatActivity {
//Declaration EditTexts
EditText editTextUserName;
EditText editTextEmail;
EditText editTextPassword;
//Declaration TextInputLayout
TextInputLayout textInputLayoutUserName;
TextInputLayout textInputLayoutEmail;
TextInputLayout textInputLayoutPassword;
//Declaration Button
Button buttonRegister;
//Declaration SqliteHelper
SqliteHelper sqliteHelper;
ProgressDialog pDialog;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_register);
sqliteHelper = new SqliteHelper(this);
initTextViewLogin();
initViews();
buttonRegister.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
pDialog = new ProgressDialog(RegisterActivity.this);
pDialog.setMessage("Tunggu.. Anda memasuki Black Yellow Shop");
pDialog.setIndeterminate(false);
pDialog.setCancelable(true);
pDialog.show();
if (validate()) {
String UserName = editTextUserName.getText().toString();
String Email = editTextEmail.getText().toString();
String Password = editTextPassword.getText().toString();
//Check in the database is there any user associated with this email
if (!sqliteHelper.isEmailExists(Email)) {
//Email does not exist now add new user to database
sqliteHelper.addUser(new User(null, UserName, Email, Password));
Snackbar.make(buttonRegister, "User created successfully! Please Login ", Snackbar.LENGTH_LONG).show();
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
finish();
}
}, Snackbar.LENGTH_LONG);
}else {
//Email exists with email input provided so show error user already exist
Snackbar.make(buttonRegister, "User already exists with same email ", Snackbar.LENGTH_LONG).show();
}
}
}
});
}
//this method used to set Login TextView click event
private void initTextViewLogin() {
TextView textViewLogin = (TextView) findViewById(R.id.textViewLogin);
textViewLogin.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
finish();
}
});
}
//this method is used to connect XML views to its Objects
private void initViews() {
editTextEmail = (EditText) findViewById(R.id.editTextEmail);
editTextPassword = (EditText) findViewById(R.id.editTextPassword);
editTextUserName = (EditText) findViewById(R.id.editTextUserName);
textInputLayoutEmail = (TextInputLayout) findViewById(R.id.textInputLayoutEmail);
textInputLayoutPassword = (TextInputLayout) findViewById(R.id.textInputLayoutPassword);
textInputLayoutUserName = (TextInputLayout) findViewById(R.id.textInputLayoutUserName);
buttonRegister = (Button) findViewById(R.id.buttonRegister);
}
//This method is used to validate input given by user
public boolean validate() {
boolean valid = false;
//Get values from EditText fields
String UserName = editTextUserName.getText().toString();
String Email = editTextEmail.getText().toString();
String Password = editTextPassword.getText().toString();
//Handling validation for UserName field
if (UserName.isEmpty()) {
valid = false;
textInputLayoutUserName.setError("Please enter valid username!");
} else {
if (UserName.length() > 5) {
valid = true;
textInputLayoutUserName.setError(null);
} else {
valid = false;
textInputLayoutUserName.setError("Username is to short!");
}
}
//Handling validation for Email field
if (!android.util.Patterns.EMAIL_ADDRESS.matcher(Email).matches()) {
valid = false;
textInputLayoutEmail.setError("Please enter valid email!");
} else {
valid = true;
textInputLayoutEmail.setError(null);
}
//Handling validation for Password field
if (Password.isEmpty()) {
valid = false;
textInputLayoutPassword.setError("Please enter valid password!");
} else {
if (Password.length() > 5) {
valid = true;
textInputLayoutPassword.setError(null);
} else {
valid = false;
textInputLayoutPassword.setError("Password is to short!");
}
}
return valid;
}
}
\ No newline at end of file
package stud.develops.pointofsale;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
public class Splashscreen extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splashscreen);
ImageView imageView = (ImageView) findViewById(R.id.imageView);
Animation startAnimation = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.fadein);
imageView.startAnimation(startAnimation);
new Handler().postDelayed(new Runnable() {
public void run() {
final Intent main = new Intent(getApplicationContext(), LoginActivity.class);
startActivity(main);
finish();
}
}, 3000);
}
}
package stud.develops.pointofsale;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
public class SqliteHelper extends SQLiteOpenHelper {
//DATABASE NAME
public static final String DATABASE_NAME = "by.com";
//DATABASE VERSION
public static final int DATABASE_VERSION = 1;
//TABLE NAME
public static final String TABLE_USERS = "users";
//TABLE USERS COLUMNS
//ID COLUMN @primaryKey
public static final String KEY_ID = "id";
//COLUMN user name
public static final String KEY_USER_NAME = "username";
//COLUMN email
public static final String KEY_EMAIL = "email";
//COLUMN password
public static final String KEY_PASSWORD = "password";
//SQL for creating users table
public static final String SQL_TABLE_USERS = " CREATE TABLE " + TABLE_USERS
+ " ( "
+ KEY_ID + " INTEGER PRIMARY KEY, "
+ KEY_USER_NAME + " TEXT, "
+ KEY_EMAIL + " TEXT, "
+ KEY_PASSWORD + " TEXT"
+ " ) ";
public SqliteHelper(Context context) {
super(context, DATABASE_NAME, null, DATABASE_VERSION);
}
@Override
public void onCreate(SQLiteDatabase sqLiteDatabase) {
//Create Table when oncreate gets called
sqLiteDatabase.execSQL(SQL_TABLE_USERS);
}
@Override
public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {
//drop table to create new one if database version updated
sqLiteDatabase.execSQL(" DROP TABLE IF EXISTS " + TABLE_USERS);
}
//using this method we can add users to user table
public void addUser(User user) {
//get writable database
SQLiteDatabase db = this.getWritableDatabase();
//create content values to insert
ContentValues values = new ContentValues();
//Put username in @values
values.put(KEY_USER_NAME, user.userName);
//Put email in @values
values.put(KEY_EMAIL, user.email);
//Put password in @values
values.put(KEY_PASSWORD, user.password);
// insert row
long todo_id = db.insert(TABLE_USERS, null, values);
}
public User Authenticate(User user) {
SQLiteDatabase db = this.getReadableDatabase();
Cursor cursor = db.query(TABLE_USERS,// Selecting Table
new String[]{KEY_ID, KEY_USER_NAME, KEY_EMAIL, KEY_PASSWORD},//Selecting columns want to query
KEY_EMAIL + "=?",
new String[]{user.email},//Where clause
null, null, null);
if (cursor != null && cursor.moveToFirst() && cursor.getCount() > 0) {
//if cursor has value then in user database there is user associated with this given email
User user1 = new User(cursor.getString(0), cursor.getString(1), cursor.getString(2), cursor.getString(3));
//Match both passwords check they are same or not
if (user.password.equalsIgnoreCase(user1.password)) {
return user1;
}
}
//if user password does not matches or there is no record with that email then return @false
return null;
}
public boolean isEmailExists(String email) {
SQLiteDatabase db = this.getReadableDatabase();
Cursor cursor = db.query(TABLE_USERS,// Selecting Table
new String[]{KEY_ID, KEY_USER_NAME, KEY_EMAIL, KEY_PASSWORD},//Selecting columns want to query
KEY_EMAIL + "=?",
new String[]{email},//Where clause
null, null, null);
if (cursor != null && cursor.moveToFirst() && cursor.getCount() > 0) {
//if cursor has value then in user database there is user associated with this given email so return true
return true;
}
//if email does not exist return false
return false;
}
}
\ No newline at end of file
package stud.develops.pointofsale;
import android.app.ProgressDialog;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import stud.develops.pointofsale.api.ApiRequest;
import stud.develops.pointofsale.api.RetroServer;
import stud.develops.pointofsale.model.ResponsModel;
/**
* Created by ASUS-PC on 14/05/2019.
*/
public class TambahMakanan extends AppCompatActivity {
EditText nama, harga;
Button btnsave, btnTampildata, btnupdate,btndelete;
ProgressDialog pd;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tambah_makanan);
nama = (EditText) findViewById(R.id.edt_nama);
harga = (EditText) findViewById(R.id.edt_harga);
btnTampildata = (Button) findViewById(R.id.btntampildata);
btnupdate =(Button) findViewById(R.id.btnUpdate);
btnsave = (Button) findViewById(R.id.btn_insertdata);
btndelete=(Button) findViewById(R.id.btnhapus);
Intent data = getIntent();
final String id_makanan = data.getStringExtra("id_makanan");
if(id_makanan != null) {
btnsave.setVisibility(View.GONE);
btnTampildata.setVisibility(View.GONE);
btnupdate.setVisibility(View.VISIBLE);
btndelete.setVisibility(View.VISIBLE);
nama.setText(data.getStringExtra("nama"));
harga.setText(data.getStringExtra("harga"));
}
pd = new ProgressDialog(this);
btnTampildata.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent godata = new Intent(TambahMakanan.this, TampilData.class);
startActivity(godata);
}
});
btndelete.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
pd.setMessage("Loading Hapus ...");
pd.setCancelable(false);
pd.show();
ApiRequest api = RetroServer.getClient().create(ApiRequest.class);
Call<ResponsModel> del = api.deleteData(id_makanan);
del.enqueue(new Callback<ResponsModel>() {
@Override
public void onResponse(Call<ResponsModel> call, Response<ResponsModel> response) {
Log.d("Retro", "onResponse");
Toast.makeText(TambahMakanan.this, response.body().getPesan(),Toast.LENGTH_SHORT).show();
Intent gotampil = new Intent(TambahMakanan.this,TampilData.class);
startActivity(gotampil);
}
@Override
public void onFailure(Call<ResponsModel> call, Throwable t) {
pd.hide();
Log.d("Retro", "onFailure");
}
});
}
});
btnupdate.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
pd.setMessage("update ....");
pd.setCancelable(false);
pd.show();
ApiRequest api = RetroServer.getClient().create(ApiRequest.class);
Call<ResponsModel> update = api.updateData(id_makanan,nama.getText().toString(),harga.getText().toString());
update.enqueue(new Callback<ResponsModel>() {
@Override
public void onResponse(Call<ResponsModel> call, Response<ResponsModel> response) {
Log.d("Retro", "Response");
Toast.makeText(TambahMakanan.this,response.body().getPesan(),Toast.LENGTH_SHORT).show();
pd.hide();
}
@Override
public void onFailure(Call<ResponsModel> call, Throwable t) {
pd.hide();
Log.d("Retro", "OnFailure");
}
});
}
});
btnsave.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
pd.setMessage("send data ... ");
pd.setCancelable(false);
pd.show();
String snama = nama.getText().toString();
String sharga = harga.getText().toString();
ApiRequest api = RetroServer.getClient().create(ApiRequest.class);
Call<ResponsModel> sendbio = api.sendBiodata(snama,sharga);
sendbio.enqueue(new Callback<ResponsModel>() {
@Override
public void onResponse(Call<ResponsModel> call, Response<ResponsModel> response) {
pd.hide();
Log.d("RETRO", "response : " + response.body().toString());
String kode = response.body().getKode();
if(kode.equals("1"))
{
Toast.makeText(TambahMakanan.this, "Data berhasil disimpan", Toast.LENGTH_SHORT).show();
}else
{
Toast.makeText(TambahMakanan.this, "Data Error tidak berhasil disimpan", Toast.LENGTH_SHORT).show();
}
}
@Override
public void onFailure(Call<ResponsModel> call, Throwable t) {
pd.hide();
Log.d("RETRO", "Falure : " + "Gagal Mengirim Request");
}
});
}
});
}
}
package stud.develops.pointofsale;
import android.app.ProgressDialog;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import stud.develops.pointofsale.api.ApiRequest2;
import stud.develops.pointofsale.api.RetroServer2;
import stud.develops.pointofsale.model.ResponsModel2;
public class TambahPegawai extends AppCompatActivity {
EditText nama, username, password, jenis_kelamin, alamat;
Button btnsave, btnTampildata, btnupdate,btndelete;
ProgressDialog pd;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tambah_pegawai);
nama = (EditText) findViewById(R.id.edt_nama);
username = (EditText) findViewById(R.id.edt_username);
password = (EditText) findViewById(R.id.edt_password);
jenis_kelamin = (EditText) findViewById(R.id.edt_jeniskelamin);
alamat = (EditText) findViewById(R.id.edt_alamat);
btnTampildata = (Button) findViewById(R.id.btntampildata);
btnupdate =(Button) findViewById(R.id.btnUpdate);
btnsave = (Button) findViewById(R.id.btn_insertdata);
btndelete=(Button) findViewById(R.id.btnhapus);
Intent data = getIntent();
final String id_pegawai = data.getStringExtra("id_pegawai");
if(id_pegawai != null) {
btnsave.setVisibility(View.GONE);
btnTampildata.setVisibility(View.GONE);
btnupdate.setVisibility(View.VISIBLE);
btndelete.setVisibility(View.VISIBLE);
nama.setText(data.getStringExtra("nama"));
username.setText(data.getStringExtra("username"));
password.setText(data.getStringExtra("password"));
jenis_kelamin.setText(data.getStringExtra("jenis_kelamin"));
alamat.setText(data.getStringExtra("alamat"));
}
pd = new ProgressDialog(this);
btnTampildata.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent godata = new Intent(TambahPegawai.this, TampilData2.class);
startActivity(godata);
}
});
btndelete.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
pd.setMessage("Loading Hapus ...");
pd.setCancelable(false);
pd.show();
ApiRequest2 api = RetroServer2.getClient().create(ApiRequest2.class);
Call<ResponsModel2> del = api.deleteData(id_pegawai);
del.enqueue(new Callback<ResponsModel2>() {
@Override
public void onResponse(Call<ResponsModel2> call, Response<ResponsModel2> response) {
Log.d("Retro", "onResponse");
Toast.makeText(TambahPegawai.this, response.body().getPesan(),Toast.LENGTH_SHORT).show();
Intent gotampil = new Intent(TambahPegawai.this,TampilData2.class);
startActivity(gotampil);
}
@Override
public void onFailure(Call<ResponsModel2> call, Throwable t) {
pd.hide();
Log.d("Retro", "onFailure");
}
});
}
});
btnupdate.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
pd.setMessage("update ....");
pd.setCancelable(false);
pd.show();
ApiRequest2 api = RetroServer2.getClient().create(ApiRequest2.class);
Call<ResponsModel2> update = api.updateData(id_pegawai,nama.getText().toString(),username.getText().toString(),password.getText().toString(),jenis_kelamin.getText().toString(),alamat.getText().toString());
update.enqueue(new Callback<ResponsModel2>() {
@Override
public void onResponse(Call<ResponsModel2> call, Response<ResponsModel2> response) {
Log.d("Retro", "Response");
Toast.makeText(TambahPegawai.this,response.body().getPesan(),Toast.LENGTH_SHORT).show();
pd.hide();
}
@Override
public void onFailure(Call<ResponsModel2> call, Throwable t) {
pd.hide();
Log.d("Retro", "OnFailure");
}
});
}
});
btnsave.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
pd.setMessage("send data ... ");
pd.setCancelable(false);
pd.show();
String snama = nama.getText().toString();
String susername = username.getText().toString();
String spassword = password.getText().toString();
String sjenis_kelamin = jenis_kelamin.getText().toString();
String salamat = alamat.getText().toString();
ApiRequest2 api = RetroServer2.getClient().create(ApiRequest2.class);
Call<ResponsModel2> sendbio = api.sendBiodata(snama,susername,spassword,sjenis_kelamin,salamat );
sendbio.enqueue(new Callback<ResponsModel2>() {
@Override
public void onResponse(Call<ResponsModel2> call, Response<ResponsModel2> response) {
pd.hide();
Log.d("RETRO", "response : " + response.body().toString());
String kode = response.body().getKode();
if(kode.equals("1"))
{
Toast.makeText(TambahPegawai.this, "Data berhasil disimpan", Toast.LENGTH_SHORT).show();
}else
{
Toast.makeText(TambahPegawai.this, "Data Error tidak berhasil disimpan", Toast.LENGTH_SHORT).show();
}
}
@Override
public void onFailure(Call<ResponsModel2> call, Throwable t) {
pd.hide();
Log.d("RETRO", "Falure : " + "Gagal Mengirim Request");
}
});
}
});
}
}
package stud.develops.pointofsale;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.app.ProgressDialog;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import java.util.ArrayList;
import java.util.List;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import stud.develops.pointofsale.adapter.AdapterData;
import stud.develops.pointofsale.api.ApiRequest;
import stud.develops.pointofsale.api.RetroServer;
import stud.develops.pointofsale.model.DataModel;
import stud.develops.pointofsale.model.ResponsModel;
public class TampilData extends AppCompatActivity {
private RecyclerView mRecycler;
private RecyclerView.Adapter mAdapter;
private RecyclerView.LayoutManager mManager;
private List<DataModel> mItems = new ArrayList<>();
ProgressDialog pd;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tampil_data);
//pd = new ProgressDialog(this);
mRecycler = (RecyclerView) findViewById(R.id.recyclerTemp);
mManager = new LinearLayoutManager(this,LinearLayoutManager.VERTICAL, false);
mRecycler.setLayoutManager(mManager);
// pd.setMessage("Loading ...");
// pd.setCancelable(false);
// pd.show();
ApiRequest api = RetroServer.getClient().create(ApiRequest.class);
Call<ResponsModel> getdata = api.getBiodata();
getdata.enqueue(new Callback<ResponsModel>() {
@Override
public void onResponse(Call<ResponsModel> call, Response<ResponsModel> response) {
//pd.hide();
Log.d("RETRO", "RESPONSE : " + response.body().getKode());
mItems = response.body().getResult();
mAdapter = new AdapterData(TampilData.this,mItems);
mRecycler.setAdapter(mAdapter);
mAdapter.notifyDataSetChanged();
}
@Override
public void onFailure(Call<ResponsModel> call, Throwable t) {
//pd.hide();
Log.d("RETRO", "FAILED : respon gagal");
}
});
}
}
package stud.develops.pointofsale;
import android.app.ProgressDialog;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.View;
import java.util.ArrayList;
import java.util.List;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import stud.develops.pointofsale.adapter.AdapterData;
import stud.develops.pointofsale.adapter.AdapterData2;
import stud.develops.pointofsale.api.ApiRequest;
import stud.develops.pointofsale.api.ApiRequest2;
import stud.develops.pointofsale.api.RetroServer;
import stud.develops.pointofsale.api.RetroServer2;
import stud.develops.pointofsale.model.DataModel;
import stud.develops.pointofsale.model.DataModel2;
import stud.develops.pointofsale.model.ResponsModel;
import stud.develops.pointofsale.model.ResponsModel2;
public class TampilData2 extends AppCompatActivity {
private RecyclerView mRecycler;
private RecyclerView.Adapter mAdapter;
private RecyclerView.LayoutManager mManager;
private List<DataModel2> mItems = new ArrayList<>();
ProgressDialog pd;
FloatingActionButton fab;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tampil_data_pegawai);
fab=(FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(TampilData2.this, TambahPegawai.class);
startActivity(intent);
}
});
//pd = new ProgressDialog(this);
mRecycler = (RecyclerView) findViewById(R.id.recyclerTemp);
mManager = new LinearLayoutManager(this,LinearLayoutManager.VERTICAL, false);
mRecycler.setLayoutManager(mManager);
// pd.setMessage("Loading ...");
// pd.setCancelable(false);
// pd.show();
ApiRequest2 api = RetroServer2.getClient().create(ApiRequest2.class);
Call<ResponsModel2> getdata = api.getBiodata();
getdata.enqueue(new Callback<ResponsModel2>() {
@Override
public void onResponse(Call<ResponsModel2> call, Response<ResponsModel2> response) {
//pd.hide();
Log.d("RETRO", "RESPONSE : " + response.body().getKode());
mItems = response.body().getResult();
mAdapter = new AdapterData2(TampilData2.this,mItems);
mRecycler.setAdapter(mAdapter);
mAdapter.notifyDataSetChanged();
}
@Override
public void onFailure(Call<ResponsModel2> call, Throwable t) {
//pd.hide();
Log.d("RETRO", "FAILED : respon gagal");
}
});
}
}
package stud.develops.pointofsale;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
public class Transaksi extends AppCompatActivity {
private EditText edtnamapel, edtnamabar, edtjumlahbel, edtharga, edtuangbay;
private Button btnproses;
private Button btnhapus;
private Button btnexit;
private TextView txtnamapel;
private TextView txtnamabar;
private TextView txtjumlahbel;
private TextView txtharga;
private TextView txtuangbay;
private TextView txtbonus;
private TextView txttotalbelanja;
private TextView txtuangkembali;
private TextView txtketerangan;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_transaksi);
getSupportActionBar().setTitle("POS");
edtnamapel = (EditText) findViewById(R.id.namapelanggan);
edtnamabar = (EditText) findViewById(R.id.namabarang);
edtjumlahbel = (EditText) findViewById(R.id.jumlahbeli);
edtharga = (EditText) findViewById(R.id.harga);
edtuangbay = (EditText) findViewById(R.id.uangbayar);
btnproses = (Button) findViewById(R.id.tombol1);
btnhapus = (Button) findViewById(R.id.tombol2);
btnexit = (Button) findViewById(R.id.tombol3);
txtnamapel = (TextView) findViewById(R.id.namapelanggan);
txtnamabar = (TextView) findViewById(R.id.namabarang);
txtjumlahbel = (TextView) findViewById(R.id.jumlahbeli);
txtharga = (TextView) findViewById(R.id.harga);
txtuangbay = (TextView) findViewById(R.id.uangbayar);
txtbonus = (TextView) findViewById(R.id.bonus);
txttotalbelanja = (TextView) findViewById(R.id.totalbelanja);
txtuangkembali = (TextView) findViewById(R.id.uangkembali);
txtketerangan = (TextView) findViewById(R.id.keterangan);
//memberikan action pada tombol proses
btnproses.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String namapelanggan = edtnamapel.getText().toString().trim();
String namabarang = edtnamabar.getText().toString().trim();
String jumlahbeli = edtjumlahbel.getText().toString().trim();
String harga = edtharga.getText().toString().trim();
String uangbayar = edtuangbay.getText().toString().trim();
double jb = Double.parseDouble(jumlahbeli);
double h = Double.parseDouble(harga);
double ub = Double.parseDouble(uangbayar);
double total = (jb * h);
txttotalbelanja.setText("Total Belanja : " + total);
//pemberian if dan else untuk aturan pemberian bonus
if (total >=200000){
txtbonus.setText("Bonus : Sambal");
} else if (total >=50000){
txtbonus.setText("Bonus : Sayur");
} else if (total >=40000){
txtbonus.setText("Bonus : Kecap");
} else {
txtbonus.setText("Bonus : Terasi");
}
double uangkembalian = (ub - total);
if (ub < total){
txtketerangan.setText("Keterangan : uang bayar kurang Rp " + (-uangkembalian));
txtuangkembali.setText("Uang Kembali : Rp 0" );
}else{
txtketerangan.setText("Keterangan : Tunggu Kembalian");
txtuangkembali.setText("Uang Kembali : " + uangkembalian);
}
//memberikan action pada tombol reset data
}
});
btnhapus.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
txtnamapel.setText(" ");
txtnamabar.setText(" ");
txttotalbelanja.setText(" Total Belanja : Rp 0");
txtharga.setText(" ");
txtuangbay.setText(" ");
txtuangkembali.setText("Uang Kembali : Rp 0");
txtbonus.setText("Bonus : - ");
txtjumlahbel.setText(" ");
txtketerangan.setText("Keterangan : - ");
Toast.makeText(getApplicationContext(),"Data sudah direset", Toast.LENGTH_LONG).show();
// memberikan action pada tombol keluar
}
});
btnexit.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
Intent intent = new Intent(Transaksi.this, HomeOwner.class);
startActivity(intent);
}
});
}
}
package stud.develops.pointofsale;
public class User {
public String id;
public String userName;
public String email;
public String password;
public User(String id, String userName, String email, String password) {
this.id = id;
this.userName = userName;
this.email = email;
this.password = password;
}
}
package stud.develops.pointofsale.adapter;
import android.content.Context;
import android.content.Intent;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import java.util.List;
import stud.develops.pointofsale.R;
import stud.develops.pointofsale.TambahMakanan;
import stud.develops.pointofsale.model.DataModel;
/**
* Created by ASUS-PC on 14/05/2019.
*/
public class AdapterData extends RecyclerView.Adapter<AdapterData.HolderData> {
private List<DataModel> mList ;
private Context ctx;
public AdapterData (Context ctx, List<DataModel> mList)
{
this.ctx = ctx;
this.mList = mList;
}
@Override
public HolderData onCreateViewHolder(ViewGroup parent, int viewType) {
View layout = LayoutInflater.from(parent.getContext()).inflate(R.layout.layoutlist,parent, false);
HolderData holder = new HolderData(layout);
return holder;
}
@Override
public void onBindViewHolder(HolderData holder, int position) {
DataModel dm = mList.get(position);
holder.nama.setText(dm.getNama());
holder.harga.setText(dm.getHarga());
holder.dm = dm;
}
@Override
public int getItemCount() {
return mList.size();
}
class HolderData extends RecyclerView.ViewHolder{
TextView nama, harga;
DataModel dm;
public HolderData (View v)
{
super(v);
nama = (TextView) v.findViewById(R.id.tvNama);
harga = (TextView) v.findViewById(R.id.tvHarga);
v.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent goInput = new Intent(ctx, TambahMakanan.class);
// goInput.putExtra("id_makanan", dm.getId_makanan());
goInput.putExtra("nama", dm.getNama());
goInput.putExtra("harga", dm.getHarga());
ctx.startActivity(goInput);
}
});
}
}
}
package stud.develops.pointofsale.adapter;
import android.content.Context;
import android.content.Intent;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import java.util.List;
import stud.develops.pointofsale.R;
import stud.develops.pointofsale.TambahPegawai;
import stud.develops.pointofsale.model.DataModel2;
public class AdapterData2 extends RecyclerView.Adapter<AdapterData2.HolderData> {
private List<DataModel2> mList ;
private Context ctx;
public AdapterData2 (Context ctx, List<DataModel2> mList)
{
this.ctx = ctx;
this.mList = mList;
}
@Override
public HolderData onCreateViewHolder(ViewGroup parent, int viewType) {
View layout = LayoutInflater.from(parent.getContext()).inflate(R.layout.layoutlist2,parent, false);
HolderData holder = new HolderData(layout);
return holder;
}
@Override
public void onBindViewHolder(HolderData holder, int position) {
DataModel2 dm = mList.get(position);
holder.nama.setText(dm.getNama());
holder.username.setText(dm.getUsername());
holder.password.setText(dm.getPassword());
holder.jenis_kelamin.setText(dm.getJenis_kelamin());
holder.alamat.setText(dm.getAlamat());
holder.dm = dm;
}
@Override
public int getItemCount() {
return mList.size();
}
class HolderData extends RecyclerView.ViewHolder{
TextView nama, username, password, jenis_kelamin, alamat;
DataModel2 dm;
public HolderData (View v)
{
super(v);
nama = (TextView) v.findViewById(R.id.tvNama);
username = (TextView) v.findViewById(R.id.tvUsername);
password = (TextView) v.findViewById(R.id.tvPassword);
jenis_kelamin = (TextView) v.findViewById(R.id.tvJenisKelamin);
alamat = (TextView) v.findViewById(R.id.tvAlamat);
v.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent goInput = new Intent(ctx, TambahPegawai.class);
// goInput.putExtra("id_makanan", dm.getId_makanan());
goInput.putExtra("nama", dm.getNama());
goInput.putExtra("username", dm.getUsername());
goInput.putExtra("password", dm.getPassword());
goInput.putExtra("jenis_kelamin", dm.getJenis_kelamin());
goInput.putExtra("alamat", dm.getAlamat());
ctx.startActivity(goInput);
}
});
}
}
}
package stud.develops.pointofsale.api;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import stud.develops.pointofsale.model.ResponsModel;
/**
* Created by ASUS-PC on 14/05/2019.
*/
public interface ApiRequest {
@FormUrlEncoded
@POST("insert.php")
Call<ResponsModel> sendBiodata(@Field("nama") String nama,
@Field("harga") String harga);
@GET("read.php")
Call<ResponsModel> getBiodata();
@FormUrlEncoded
@POST("update.php")
Call<ResponsModel> updateData(@Field("id_makanan") String id_makanan,
@Field("nama") String nama,
@Field("harga") String harga);
@FormUrlEncoded
@POST("delete.php")
Call<ResponsModel> deleteData(@Field("id_makanan") String id_makanan);
}
package stud.develops.pointofsale.api;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import stud.develops.pointofsale.model.ResponsModel;
import stud.develops.pointofsale.model.ResponsModel2;
/**
* Created by ASUS-PC on 14/05/2019.
*/
public interface ApiRequest2 {
@FormUrlEncoded
@POST("insert.php")
Call<ResponsModel2> sendBiodata(@Field("nama") String nama,
@Field("username") String username,
@Field("password") String password,
@Field("jenis_kelamin") String jenis_kelamin,
@Field("alamat") String alamat);
@GET("read.php")
Call<ResponsModel2> getBiodata();
@FormUrlEncoded
@POST("update.php")
Call<ResponsModel2> updateData(@Field("id_pegawai") String id_pegawai,
@Field("nama") String nama,
@Field("username") String username,
@Field("password") String password,
@Field("jenis_kelamin") String jenis_kelamin,
@Field("alamat") String alamat);
@FormUrlEncoded
@POST("delete.php")
Call<ResponsModel2> deleteData(@Field("id_pegawai") String id_pegawai);
}
package stud.develops.pointofsale.api;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
public class RetroServer {
private static final String base_url = "http://192.168.43.246/API1/makanan/";
private static Retrofit retrofit;
public static Retrofit getClient()
{
if(retrofit == null)
{
retrofit = new Retrofit.Builder()
.baseUrl(base_url)
.addConverterFactory(GsonConverterFactory.create())
.build();
}
return retrofit;
}
}
package stud.develops.pointofsale.api;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
public class RetroServer2 {
private static final String base_url = "http://192.168.43.246/API1/pegawai/";
private static Retrofit retrofit;
public static Retrofit getClient()
{
if(retrofit == null)
{
retrofit = new Retrofit.Builder()
.baseUrl(base_url)
.addConverterFactory(GsonConverterFactory.create())
.build();
}
return retrofit;
}
}
package stud.develops.pointofsale.model;
public class DataModel {
String id_makanan, nama, harga;
public String getId_makanan() {
return id_makanan;
}
public void setId_makanan(String id_makanan) {
this.id_makanan = id_makanan;
}
public String getNama() {
return nama;
}
public void setNama(String nama) {
this.nama = nama;
}
public String getHarga() {
return harga;
}
public void setHarga(String harga) {
this.harga = harga;
}
}
\ No newline at end of file
package stud.develops.pointofsale.model;
public class DataModel2 {
String id_pegawai, nama, username, password, jenis_kelamin, alamat ;
public String getId_pegawai() {
return id_pegawai;
}
public void setId_pegawai(String id_pegawai) {
this.id_pegawai = id_pegawai;
}
public String getNama() {
return nama;
}
public void setNama(String nama) {
this.nama = nama;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getJenis_kelamin() {
return jenis_kelamin;
}
public void setJenis_kelamin(String jenis_kelamin) {
this.jenis_kelamin = jenis_kelamin;
}
public String getAlamat() {
return alamat;
}
public void setAlamat(String alamat) {
this.alamat = alamat;
}
}
\ No newline at end of file
package stud.develops.pointofsale.model;
import java.util.List;
public class ResponsModel {
String kode, pesan;
List<DataModel> result;
public List<DataModel> getResult() {
return result;
}
public void setResult(List<DataModel> result) {
this.result = result;
}
public String getKode() {
return kode;
}
public void setKode(String kode) {
this.kode = kode;
}
public String getPesan() {
return pesan;
}
public void setPesan(String pesan) {
this.pesan = pesan;
}
}
\ No newline at end of file
package stud.develops.pointofsale.model;
import java.util.List;
public class ResponsModel2 {
String kode, pesan;
List<DataModel2> result;
public List<DataModel2> getResult() {
return result;
}
public void setResult(List<DataModel2> result) {
this.result = result;
}
public String getKode() {
return kode;
}
public void setKode(String kode) {
this.kode = kode;
}
public String getPesan() {
return pesan;
}
public void setPesan(String pesan) {
this.pesan = pesan;
}
}
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha
android:duration="3000"
android:fromAlpha="0.0"
android:interpolator="@android:anim/accelerate_interpolator"
android:toAlpha="1.0">
</alpha>
</set>
\ No newline at end of file
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path
android:fillType="evenOdd"
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
android:strokeColor="#00000000"
android:strokeWidth="1">
<aapt:attr name="android:fillColor">
<gradient
android:endX="78.5885"
android:endY="90.9159"
android:startX="48.7653"
android:startY="61.0927"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
android:strokeColor="#00000000"
android:strokeWidth="1" />
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM17,13h-4v4h-2v-4L7,13v-2h4L11,7h2v4h4v2z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M21.99,4c0,-1.1 -0.89,-2 -1.99,-2L4,2c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h14l4,4 -0.01,-18zM18,14L6,14v-2h12v2zM18,11L6,11L6,9h12v2zM18,8L6,8L6,6h12v2z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M20,4L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM20,8l-8,5 -8,-5L4,6l8,5 8,-5v2z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M8,10L5,10L5,7L3,7v3L0,10v2h3v3h2v-3h3v-2zM18,11c1.66,0 2.99,-1.34 2.99,-3S19.66,5 18,5c-0.32,0 -0.63,0.05 -0.91,0.14 0.57,0.81 0.9,1.79 0.9,2.86s-0.34,2.04 -0.9,2.86c0.28,0.09 0.59,0.14 0.91,0.14zM13,11c1.66,0 2.99,-1.34 2.99,-3S14.66,5 13,5c-1.66,0 -3,1.34 -3,3s1.34,3 3,3zM19.62,13.16c0.83,0.73 1.38,1.66 1.38,2.84v2h3v-2c0,-1.54 -2.37,-2.49 -4.38,-2.84zM13,13c-2,0 -6,1 -6,3v2h12v-2c0,-2 -4,-3 -6,-3z"/>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<vector
android:height="108dp"
android:width="108dp"
android:viewportHeight="108"
android:viewportWidth="108"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#008577"
android:pathData="M0,0h108v108h-108z"/>
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M6.62,10.79c1.44,2.83 3.76,5.14 6.59,6.59l2.2,-2.2c0.27,-0.27 0.67,-0.36 1.02,-0.24 1.12,0.37 2.33,0.57 3.57,0.57 0.55,0 1,0.45 1,1V20c0,0.55 -0.45,1 -1,1 -9.39,0 -17,-7.61 -17,-17 0,-0.55 0.45,-1 1,-1h3.5c0.55,0 1,0.45 1,1 0,1.25 0.2,2.45 0.57,3.57 0.11,0.35 0.03,0.74 -0.25,1.02l-2.2,2.2z"/>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:background="@color/colorPrimaryDark"
android:layout_height="wrap_content"
android:orientation="vertical"
tools:context=".HomeOwner">
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/card_view"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_margin="8dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center">
<ImageView
android:id="@+id/btn_profil"
android:layout_width="match_parent"
android:layout_height="110dp"
android:layout_alignParentTop="true"
android:layout_marginTop="0dp"
android:foregroundGravity="center_horizontal"
android:onClick="profi"
android:src="@drawable/profile" />
<TextView
android:id="@+id/profil"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_below="@+id/btn_profil"
android:layout_marginTop="0dp"
android:paddingLeft="140dp"
android:maxLines="3"
android:padding="8dp"
android:text="Profil"
android:textColor="#222"
android:textSize="20dp"
android:textStyle="bold" />
</RelativeLayout>
</android.support.v7.widget.CardView>
<!--<Button-->
<!--android:src="@drawable/profile"-->
<!--android:paddingTop="20dp"-->
<!--android:id="@+id/btn_profil"-->
<!--android:text="Profil"-->
<!--android:onClick="profi"-->
<!--android:layout_gravity="center"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="150dp"-->
<!--android:background="@color/colorPrimary"-->
<!--/>-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:paddingTop="0dp"
android:orientation="horizontal">
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/card_view2"
android:layout_gravity="center"
android:layout_width="164dp"
android:layout_height="170dp"
android:layout_margin="8dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center">
<ImageView
android:src="@drawable/makanan"
android:id="@+id/btn_menumakanan"
android:layout_width="match_parent"
android:layout_height="130dp"
android:layout_alignParentTop="true"
android:layout_marginTop="0dp"
android:foregroundGravity="center_horizontal"
android:onClick="menumakanan" />
<TextView
android:id="@+id/makanan"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_below="@+id/btn_menumakanan"
android:layout_marginTop="0dp"
android:paddingLeft="140dp"
android:maxLines="3"
android:padding="8dp"
android:text="Makanan"
android:textColor="#222"
android:textSize="20dp"
android:textStyle="bold" />
</RelativeLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/card_view3"
android:layout_gravity="center"
android:layout_width="162dp"
android:layout_height="170dp"
android:layout_margin="8dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center">
<ImageView
android:src="@drawable/transaksi"
android:id="@+id/btn_transaksi"
android:layout_width="match_parent"
android:layout_height="130dp"
android:layout_alignParentTop="true"
android:layout_marginTop="0dp"
android:foregroundGravity="center_horizontal"
android:onClick="transaksi" />
<TextView
android:id="@+id/transaksi"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_below="@+id/btn_transaksi"
android:layout_marginTop="0dp"
android:paddingLeft="140dp"
android:maxLines="3"
android:padding="8dp"
android:text="Transaksi"
android:textColor="#222"
android:textSize="20dp"
android:textStyle="bold" />
</RelativeLayout>
</android.support.v7.widget.CardView>
<!--<Button-->
<!--android:src="@drawable/makanan"-->
<!--android:id="@+id/btn_menumakanan"-->
<!--android:layout_width="180dp"-->
<!--android:layout_height="120dp"-->
<!--android:background="@color/colorPrimary"-->
<!--android:onClick="menumakanan"-->
<!--android:text="Menu Makanan" />-->
<!--<Button-->
<!--android:layout_marginStart="10dp"-->
<!--android:src="@drawable/transaksi"-->
<!--android:id="@+id/btn_transaksi"-->
<!--android:layout_width="200dp"-->
<!--android:layout_height="120dp"-->
<!--android:background="@color/colorPrimary"-->
<!--android:onClick="transaksi"-->
<!--android:text="Transaksi" />-->
</LinearLayout>
<LinearLayout
android:paddingTop="0dp"
android:layout_gravity="center_horizontal"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/card_view4"
android:layout_gravity="center"
android:layout_width="164dp"
android:layout_height="170dp"
android:layout_margin="8dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center">
<ImageView
android:src="@drawable/laporan"
android:id="@+id/btn_laporan"
android:layout_width="match_parent"
android:layout_height="130dp"
android:layout_alignParentTop="true"
android:layout_marginTop="0dp"
android:foregroundGravity="center_horizontal"
android:onClick="laporan" />
<TextView
android:id="@+id/laporan"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_below="@+id/btn_laporan"
android:layout_marginTop="0dp"
android:paddingLeft="140dp"
android:maxLines="3"
android:padding="8dp"
android:text="Laporan"
android:textColor="#222"
android:textSize="20dp"
android:textStyle="bold" />
</RelativeLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/card_view5"
android:layout_gravity="center"
android:layout_width="162dp"
android:layout_height="170dp"
android:layout_margin="8dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center">
<ImageView
android:src="@drawable/pegawai"
android:id="@+id/btn_pegawai"
android:layout_width="match_parent"
android:layout_height="130dp"
android:layout_alignParentTop="true"
android:layout_marginTop="0dp"
android:foregroundGravity="center_horizontal"
android:onClick="pegawai" />
<TextView
android:id="@+id/pegawai"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_below="@+id/btn_pegawai"
android:layout_marginTop="0dp"
android:paddingLeft="140dp"
android:maxLines="3"
android:padding="8dp"
android:text="Pegawai"
android:textColor="#222"
android:textSize="20dp"
android:textStyle="bold" />
</RelativeLayout>
</android.support.v7.widget.CardView>
<!--<Button-->
<!--android:src="@drawable/laporan"-->
<!--android:id="@+id/btn_laporan"-->
<!--android:text="Laporan"-->
<!--android:background="@color/colorPrimary"-->
<!--android:onClick="laporan"-->
<!--android:layout_width="180dp"-->
<!--android:layout_height="120dp" />-->
<!--<Button-->
<!--android:layout_marginStart="10dp"-->
<!--android:src="@drawable/pegawai"-->
<!--android:id="@+id/pegawai"-->
<!--android:text="Pegawai"-->
<!--android:background="@color/colorPrimary"-->
<!--android:onClick="pegawai"-->
<!--android:layout_width="200dp"-->
<!--android:layout_height="120dp" />-->
</LinearLayout>
<LinearLayout
android:paddingTop="0dp"
android:layout_gravity="center_horizontal"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/card_view6"
android:layout_gravity="center"
android:layout_width="164dp"
android:layout_height="170dp"
android:layout_margin="8dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center">
<ImageView
android:src="@drawable/kasir"
android:id="@+id/btn_kasir"
android:layout_width="match_parent"
android:layout_height="130dp"
android:layout_alignParentTop="true"
android:layout_marginTop="0dp"
android:foregroundGravity="center_horizontal"
android:onClick="kasir" />
<TextView
android:id="@+id/kasir"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_below="@+id/btn_kasir"
android:layout_marginTop="0dp"
android:paddingLeft="140dp"
android:maxLines="3"
android:padding="8dp"
android:text="Kasir"
android:textColor="#222"
android:textSize="20dp"
android:textStyle="bold" />
</RelativeLayout>
</android.support.v7.widget.CardView>
<!--<Button-->
<!--android:src="@drawable/kasir"-->
<!--android:id="@+id/kasir"-->
<!--android:text="Kasir"-->
<!--android:background="@color/colorPrimary"-->
<!--android:onClick="kasir"-->
<!--android:layout_width="195dp"-->
<!--android:layout_height="120dp" />-->
</LinearLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="1">
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerTemp"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Laporan">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Laporan"/>
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:background="@color/colorPrimary"
android:fitsSystemWindows="true"
tools:context=".LoginActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center_horizontal"
android:layout_margin="16dp"
android:src="@drawable/posresto" />
<android.support.design.widget.TextInputLayout
android:id="@+id/textInputLayoutEmail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
app:errorEnabled="true">
<android.support.design.widget.TextInputEditText
android:id="@+id/editTextEmail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/email"
android:inputType="textEmailAddress" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/textInputLayoutPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
app:errorEnabled="true"
app:passwordToggleEnabled="true"
app:passwordToggleTint="@color/colorAccent">
<android.support.design.widget.TextInputEditText
android:id="@+id/editTextPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/password"
android:inputType="textPassword" />
</android.support.design.widget.TextInputLayout>
<Button
android:id="@+id/buttonLogin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="16dp"
android:background="@color/colorAccent"
android:text="@string/login"
android:textColor="@android:color/white" />
<TextView
android:id="@+id/textViewCreateAccount"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:layout_marginTop="16dp"
android:gravity="center_horizontal" />
</LinearLayout>
</ScrollView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MenuMakanan">
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="menu makanan"/>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_marginEnd="20dp"
android:src="@drawable/ic_add_circle_black_24dp"
android:layout_marginBottom="20dp"></android.support.design.widget.FloatingActionButton>
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Pegawai">
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Pegawai"/>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_marginEnd="20dp"
android:src="@drawable/ic_add_circle_black_24dp"
android:layout_marginBottom="20dp"></android.support.design.widget.FloatingActionButton>
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Profil"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="405dp">
<LinearLayout
android:background="@drawable/pegawai"
android:layout_width="match_parent"
android:layout_height="350dp"
android:orientation="vertical">
<ImageView
android:layout_marginTop="45dp"
android:layout_gravity="center_horizontal"
android:layout_width="150dp"
android:layout_height="150dp"
android:src="@drawable/pegawai"/>
<TextView
android:layout_marginTop="10dp"
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Raissa"
android:textColor="#fff"
android:textStyle="bold"
android:textSize="21sp"/>
</LinearLayout>
<android.support.v7.widget.CardView
android:layout_width="400dp"
android:layout_height="120dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="275dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:weightSum="3">
<!--<LinearLayout-->
<!--android:gravity="center"-->
<!--android:orientation="vertical"-->
<!--android:layout_width="0dp"-->
<!--android:layout_weight="1"-->
<!--android:layout_height="match_parent">-->
<!--<TextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:text="Photos"-->
<!--android:textSize="20sp"-->
<!--/>-->
<!--<TextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:text="125"-->
<!--android:textStyle="bold"-->
<!--android:textSize="20sp"-->
<!--android:paddingTop="10dp"-->
<!--android:textColor="@color/colorPrimaryDark"/>-->
<!--</LinearLayout>-->
<!--<LinearLayout-->
<!--android:gravity="center"-->
<!--android:orientation="vertical"-->
<!--android:layout_width="0dp"-->
<!--android:layout_weight="1"-->
<!--android:layout_height="match_parent">-->
<!--<TextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:text="Followers"-->
<!--android:textSize="20sp"-->
<!--/>-->
<!--<TextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:text="1205"-->
<!--android:textStyle="bold"-->
<!--android:textSize="20sp"-->
<!--android:paddingTop="10dp"-->
<!--android:textColor="@color/colorPrimaryDark"/>-->
<!--</LinearLayout>-->
<!--<LinearLayout-->
<!--android:gravity="center"-->
<!--android:orientation="vertical"-->
<!--android:layout_width="0dp"-->
<!--android:layout_weight="1"-->
<!--android:layout_height="match_parent">-->
<!--<TextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:text="Following"-->
<!--android:textSize="20sp"-->
<!--/>-->
<!--<TextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:text="360"-->
<!--android:textStyle="bold"-->
<!--android:textSize="20sp"-->
<!--android:paddingTop="10dp"-->
<!--android:textColor="@color/startblue"/>-->
<!--</LinearLayout>-->
</LinearLayout>
</android.support.v7.widget.CardView>
</RelativeLayout>
<LinearLayout
android:layout_width="360dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_gravity="center"
android:layout_marginTop="45dp">
<LinearLayout
android:orientation="horizontal"
android:paddingLeft="25dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:src="@drawable/ic_email_black_24dp"/>
<TextView
android:textStyle="bold"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="20dp"
android:text="Raissa@gmail.com"/>
</LinearLayout>
<LinearLayout
android:layout_marginTop="25dp"
android:orientation="horizontal"
android:paddingLeft="25dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:src="@drawable/ic_phone_black_24dp"/>
<TextView
android:textStyle="bold"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="20dp"
android:text="+6281260103929"/>
</LinearLayout>
<LinearLayout
android:layout_marginTop="25dp"
android:orientation="horizontal"
android:paddingLeft="25dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:src="@drawable/ic_group_add_black_24dp"/>
<TextView
android:textStyle="bold"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="20dp"
android:text="Add to group"/>
</LinearLayout>
<LinearLayout
android:layout_marginTop="25dp"
android:orientation="horizontal"
android:paddingLeft="25dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:src="@drawable/ic_comment_black_24dp"/>
<TextView
android:textStyle="bold"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="20dp"
android:text="Show all comments"/>
</LinearLayout>
</LinearLayout>
<!--<Button-->
<!--android:textColor="#fff"-->
<!--android:background="@drawable/buttonstyleithgradient"-->
<!--android:layout_marginTop="35dp"-->
<!--android:layout_gravity="center_horizontal"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:text="Follow Me"/>-->
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:background="@color/colorPrimary"
android:fitsSystemWindows="true"
tools:context=".RegisterActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center_horizontal"
android:layout_margin="10dp"
android:src="@drawable/posresto" />
<!--<android.support.design.widget.TextInputLayout-->
<!--app:errorEnabled="true"-->
<!--android:id="@+id/textInputLayoutRestaurant"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_marginTop="10dp">-->
<!--<android.support.design.widget.TextInputEditText-->
<!--android:id="@+id/editTextNamaRestaurant"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="wrap_content"-->
<!--android:hint="@string/restaurantname"-->
<!--android:inputType="textPersonName" />-->
<!--</android.support.design.widget.TextInputLayout>-->
<android.support.design.widget.TextInputLayout
app:errorEnabled="true"
android:id="@+id/textInputLayoutUserName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp">
<android.support.design.widget.TextInputEditText
android:id="@+id/editTextUserName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/username"
android:inputType="textPersonName" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/textInputLayoutEmail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
app:errorEnabled="true">
<android.support.design.widget.TextInputEditText
android:id="@+id/editTextEmail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/email"
android:inputType="textEmailAddress" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/textInputLayoutPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
app:errorEnabled="true"
app:passwordToggleEnabled="true"
app:passwordToggleTint="@color/colorAccent">
<android.support.design.widget.TextInputEditText
android:id="@+id/editTextPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/password"
android:inputType="textPassword" />
</android.support.design.widget.TextInputLayout>
<Button
android:id="@+id/buttonRegister"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@android:color/white"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:layout_weight="1"
android:background="@color/colorAccent"
android:text="@string/register" />
<TextView
android:id="@+id/textViewLogin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:gravity="center"
android:text="@string/back_to_login"
android:textColor="@android:color/black" />
</LinearLayout>
</ScrollView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="0dp"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:paddingTop="0dp"
android:background="#FFFFFF"
tools:context=".Splashscreen">
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:src="@drawable/pos" />
</RelativeLayout>
\ No newline at end of file
<LinearLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
xmlns:android="http://schemas.android.com/apk/res/android"
android:padding="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="Nama"/>
<TextView
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/edt_nama"
android:hint="Nama Makanan"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="Harga"/>
<TextView
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/edt_harga"
android:hint="Harga"/>
</LinearLayout>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Save"
android:id="@+id/btn_insertdata"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Tampil Data"
android:id="@+id/btntampildata"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Update"
android:id="@+id/btnUpdate"
android:visibility="gone"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Hapus"
android:background="#a41a1a"
android:id="@+id/btnhapus"
android:visibility="gone"/>
</LinearLayout>
<LinearLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
xmlns:android="http://schemas.android.com/apk/res/android"
android:padding="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="Nama"/>
<TextView
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/edt_nama"
android:hint="Nama Pegawai"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="Username"/>
<TextView
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/edt_username"
android:hint="Username"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="Password"/>
<TextView
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/edt_password"
android:hint="Password"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="Jenis Kelamin"/>
<TextView
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/edt_jeniskelamin"
android:hint="Jenis Kelamin"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="Alamat"/>
<TextView
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/edt_alamat"
android:hint="Alamat"/>
</LinearLayout>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Save"
android:id="@+id/btn_insertdata"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Tampil Data"
android:id="@+id/btntampildata"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Update"
android:id="@+id/btnUpdate"
android:visibility="gone"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Hapus"
android:background="#a41a1a"
android:id="@+id/btnhapus"
android:visibility="gone"/>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="1">
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerTemp"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_marginEnd="20dp"
android:src="@drawable/ic_add_circle_black_24dp"
android:layout_marginBottom="20dp"></android.support.design.widget.FloatingActionButton>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="1">
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerTemp"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_marginEnd="20dp"
android:src="@drawable/ic_add_circle_black_24dp"
android:layout_marginBottom="20dp"></android.support.design.widget.FloatingActionButton>
</RelativeLayout>
</LinearLayout>
\ No newline at end of file
<?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:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="30dp"
android:orientation="vertical"
tools:context=".Transaksi">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Nama Pembeli : "
android:textStyle="bold"
android:textColor="@color/colorPrimaryDark"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/namapelanggan"
android:text="" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="nama makanan : "
android:textStyle="bold"
android:textColor="@color/colorPrimaryDark"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/namabarang"
android:text="" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Jumlah Beli: "
android:textStyle="bold"
android:textColor="@color/colorPrimaryDark"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/jumlahbeli"
android:text=""
android:inputType="number"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Harga : Rp "
android:textStyle="bold"
android:textColor="@color/colorPrimaryDark"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/harga"
android:text=""
android:inputType="number"
android:layout_marginBottom="8dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Uang Bayar: Rp "
android:textStyle="bold"
android:textColor="@color/colorPrimaryDark"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/uangbayar"
android:text=""
android:inputType="number"/>
</LinearLayout>
<Button
android:layout_marginTop="30dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/tombol1"
android:text="PROSES"
android:background="@color/colorAccent"
android:textStyle="bold"
android:textColor="#ffffff"
android:layout_marginBottom="8dp" />
<TextView
android:layout_marginTop="20dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Total Belanja "
android:textColor="@color/colorPrimaryDark"
android:id="@+id/totalbelanja"
android:textStyle="bold"
android:textSize="18dp"
android:layout_marginBottom="8dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Uang Kembali "
android:textColor="@color/colorPrimaryDark"
android:id="@+id/uangkembali"
android:textStyle="bold"
android:textSize="18dp"
android:layout_marginBottom="8dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Bonus"
android:textColor="@color/colorPrimaryDark"
android:id="@+id/bonus"
android:textStyle="bold"
android:textSize="18dp"
android:layout_marginBottom="8dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Keterangan "
android:textColor="@color/colorPrimaryDark"
android:id="@+id/keterangan"
android:textStyle="bold"
android:textSize="18dp"
android:layout_marginBottom="8dp"/>
<LinearLayout
android:layout_marginTop="20dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal">
<Button
android:layout_width="200dp"
android:layout_height="wrap_content"
android:id="@+id/tombol2"
android:text="RESET DATA"
android:background="@color/colorAccent"
android:textStyle="bold"
android:textColor="#ffffFF"/>
<Button
android:layout_width="200dp"
android:layout_marginLeft="20dp"
android:layout_height="wrap_content"
android:id="@+id/tombol3"
android:text="KELUAR"
android:background="@color/colorAccent"
android:textColor="#FFFFFF"
android:textStyle="bold"/>
</LinearLayout>
</LinearLayout>
</ScrollView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:paddingBottom="10dp"
app:cardElevation="4dp">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="Nama Makanan"/>
<TextView
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text=""
android:id="@+id/tvNama"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="Harga"/>
<TextView
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text=""
android:id="@+id/tvHarga"/>
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="10dp">
<android.support.v7.widget.CardView android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
app:cardElevation="4dp">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="Nama Pegawai"/>
<TextView
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text=""
android:id="@+id/tvNama"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="Username"/>
<TextView
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text=""
android:id="@+id/tvUsername"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="Password"/>
<TextView
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text=""
android:id="@+id/tvPassword"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="Jenis Kelamin"/>
<TextView
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text=""
android:id="@+id/tvJenisKelamin"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="Alamat"/>
<TextView
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text=""
android:id="@+id/tvAlamat"/>
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
card_view:cardCornerRadius="6dp"
card_view:cardElevation="3dp"
card_view:cardUseCompatPadding="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:orientation="vertical"
android:padding="5dp">
<TextView
android:id="@+id/txt_nama"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/txt_harga"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/txt_jumlah"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</android.support.v7.widget.CardView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
card_view:cardCornerRadius="6dp"
card_view:cardElevation="3dp"
card_view:cardUseCompatPadding="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:orientation="vertical"
android:padding="5dp">
<TextView
android:id="@+id/txt_nama"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/txt_username"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/txt_password"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/txt_jeniskelamin"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/txt_alamat"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</android.support.v7.widget.CardView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#ffffff</color>
<color name="colorPrimaryDark">#00574B</color>
<color name="colorAccent">#D81B60</color>
</resources>
<resources>
<string name="app_name">Pointofsale</string>
<string name="create_account"><font color="#00ff00">text</font></string>
<string name="email">Email</string>
<string name="password">Password</string>
<string name="login">Login</string>
<string name="username">Username</string>
<string name="register">SignUp</string>
<string name="back_to_login">Back to Login</string>
<string name="restaurantname">Restaurant Name</string>
</resources>
<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>
</resources>
package stud.develops.pointofsale;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
#Wed May 15 10:17:30 WIB 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
#!/usr/bin/env sh
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Waktu pembuatan: 16 Bulan Mei 2019 pada 21.32
-- Versi server: 10.1.38-MariaDB
-- Versi PHP: 7.1.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `pos_resto`
--
-- --------------------------------------------------------
--
-- Struktur dari tabel `makanan`
--
CREATE TABLE `makanan` (
`id_makanan` int(11) NOT NULL,
`nama` varchar(45) NOT NULL,
`harga` varchar(45) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `makanan`
--
INSERT INTO `makanan` (`id_makanan`, `nama`, `harga`) VALUES
(1, 'nasi goreng', '12000'),
(2, 'coba', 'coba'),
(3, '', ''),
(4, '', ''),
(5, 'gfg', 'jjj'),
(6, '', ''),
(7, '', ''),
(8, 'saksang', '45000'),
(9, 'mie', '12000');
-- --------------------------------------------------------
--
-- Struktur dari tabel `pegawai`
--
CREATE TABLE `pegawai` (
`id_pegawai` int(11) NOT NULL,
`nama` varchar(45) NOT NULL,
`username` varchar(45) NOT NULL,
`password` varchar(45) NOT NULL,
`jenis_kelamin` varchar(45) NOT NULL,
`alamat` varchar(45) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data untuk tabel `pegawai`
--
INSERT INTO `pegawai` (`id_pegawai`, `nama`, `username`, `password`, `jenis_kelamin`, `alamat`) VALUES
(1, 'saya', 'saya', 'saya', 'sa', 'sa'),
(2, '', '', '', '', ''),
(3, '', '', '', '', ''),
(4, 'sweta', 'sweta', 'sweta', 'perempuan', 'tarutung');
--
-- Indexes for dumped tables
--
--
-- Indeks untuk tabel `makanan`
--
ALTER TABLE `makanan`
ADD PRIMARY KEY (`id_makanan`);
--
-- Indeks untuk tabel `pegawai`
--
ALTER TABLE `pegawai`
ADD PRIMARY KEY (`id_pegawai`);
--
-- AUTO_INCREMENT untuk tabel yang dibuang
--
--
-- AUTO_INCREMENT untuk tabel `makanan`
--
ALTER TABLE `makanan`
MODIFY `id_makanan` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
--
-- AUTO_INCREMENT untuk tabel `pegawai`
--
ALTER TABLE `pegawai`
MODIFY `id_pegawai` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment