Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
Your Cashier
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ahmad Abi Mulya
Your Cashier
Commits
ab827c08
Commit
ab827c08
authored
Sep 02, 2020
by
Wahyu Wibowo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.mdd.co.id:44195/abimulya/your-cashier
parents
50e8ae0d
45f156a2
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
13 deletions
+48
-13
MainActivity.java
.../com/example/yourcashiertest/activities/MainActivity.java
+5
-0
RegisterActivity.java
.../example/yourcashiertest/activities/RegisterActivity.java
+2
-0
activity_order.xml
app/src/main/res/layout/activity_order.xml
+2
-2
activity_product.xml
app/src/main/res/layout/activity_product.xml
+5
-5
activity_register.xml
app/src/main/res/layout/activity_register.xml
+31
-6
settings_menu.xml
app/src/main/res/menu/settings_menu.xml
+3
-0
No files found.
app/src/main/java/com/example/yourcashiertest/activities/MainActivity.java
View file @
ab827c08
...
...
@@ -6,6 +6,7 @@ import androidx.appcompat.app.AppCompatActivity;
import
androidx.databinding.DataBindingUtil
;
import
androidx.lifecycle.ViewModelProvider
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.room.FtsOptions
;
import
android.Manifest
;
...
...
@@ -101,6 +102,10 @@ public class MainActivity extends AppCompatActivity {
overridePendingTransition
(
0
,
0
);
return
true
;
case
R
.
id
.
item_three
:
startActivity
(
new
Intent
(
MainActivity
.
this
,
OrderActivity
.
class
));
finish
();
break
;
case
R
.
id
.
item_four
:
prefManager
.
removeLoginSession
();
startActivity
(
new
Intent
(
MainActivity
.
this
,
LoginActivity
.
class
));
finish
();
...
...
app/src/main/java/com/example/yourcashiertest/activities/RegisterActivity.java
View file @
ab827c08
...
...
@@ -40,6 +40,8 @@ public class RegisterActivity extends AppCompatActivity {
binding
.
etPassword
.
setError
(
"Passwords can only contain Alphanumeric"
);
}
else
if
(
binding
.
etPassword
.
getText
().
toString
().
length
()
<
8
)
{
binding
.
etPassword
.
setError
(
"Password length cannot be less than 8 characters"
);
}
else
if
(
binding
.
etPassword
.
getText
().
toString
()
!=
binding
.
etConfirmPassword
.
getText
().
toString
()){
binding
.
etConfirmPassword
.
setError
(
"Password doesn't match!"
);
}
else
{
user
.
setEmail
(
binding
.
etEmail
.
getText
().
toString
());
user
.
setFullName
(
binding
.
etUsername
.
getText
().
toString
());
...
...
app/src/main/res/layout/activity_order.xml
View file @
ab827c08
...
...
@@ -21,7 +21,7 @@
app:layout_constraintVertical_bias=
"0.105"
/>
<com.google.android.material.button.MaterialButton
android:id=
"@+id/btnPending"
android:layout_width=
"1
9
0dp"
android:layout_width=
"1
6
0dp"
android:layout_height=
"wrap_content"
android:text=
"PENDING"
android:textSize=
"10dp"
...
...
@@ -34,7 +34,7 @@
<com.google.android.material.button.MaterialButton
android:id=
"@+id/btnSuccess"
android:layout_width=
"1
9
0dp"
android:layout_width=
"1
6
0dp"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"4dp"
android:text=
"SUCCESS"
...
...
app/src/main/res/layout/activity_product.xml
View file @
ab827c08
...
...
@@ -64,7 +64,7 @@
android:id=
"@+id/etProduct"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:hint=
"
Nama produk
"
android:hint=
"
Product Name
"
android:text=
"@{viewModel.product.name}"
android:inputType=
"textCapWords"
android:textSize=
"@dimen/text_default"
/>
...
...
@@ -85,7 +85,7 @@
android:id=
"@+id/etPrice"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:hint=
"
Harga
"
android:hint=
"
Price
"
android:text=
"@{viewModel.product.price == 0 ? `` : viewModel.product.price + ``}"
android:inputType=
"number"
android:textSize=
"@dimen/text_default"
/>
...
...
@@ -107,7 +107,7 @@
android:id=
"@+id/etQuantity"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:hint=
"
Jumlah
"
android:hint=
"
Qty
"
android:text=
"@{viewModel.product.quantity == 0 ? `` : viewModel.product.quantity + ``}"
android:inputType=
"number"
android:textSize=
"@dimen/text_default"
/>
...
...
@@ -124,7 +124,7 @@
android:layout_marginEnd=
"@dimen/space_default"
>
<com.google.android.material.textfield.TextInputEditText
android:id=
"@+id/etCategory"
android:hint=
"Categor
i
"
android:hint=
"Categor
y
"
android:text=
"@{viewModel.product.category}"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
...
...
@@ -144,7 +144,7 @@
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"start|top"
android:hint=
"
Deskripsi produk
"
android:hint=
"
Product Description
"
android:inputType=
"textMultiLine"
android:lines=
"3"
android:maxLines=
"3"
...
...
app/src/main/res/layout/activity_register.xml
View file @
ab827c08
...
...
@@ -3,9 +3,9 @@
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
>
<
data>
</data
>
<
ScrollView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
...
...
@@ -109,6 +109,28 @@
android:textSize=
"@dimen/text_default"
/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id=
"@+id/tilConfirmPassword"
app:passwordToggleEnabled=
"true"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:layout_constraintTop_toBottomOf=
"@+id/tilPassword"
android:layout_marginTop=
"20dp"
android:layout_marginStart=
"@dimen/space_default"
android:layout_marginEnd=
"@dimen/space_default"
android:layout_marginBottom=
"@dimen/space_default"
>
<com.google.android.material.textfield.TextInputEditText
android:id=
"@+id/etConfirmPassword"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:hint=
"Confirm Password"
android:inputType=
"textPassword"
android:imeOptions=
"actionNext"
android:textSize=
"@dimen/text_default"
/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/tvDescSk"
android:layout_width=
"wrap_content"
...
...
@@ -118,7 +140,7 @@
android:text=
"By registering you have agreed to the"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tilPassword"
/>
app:layout_constraintTop_toBottomOf=
"@id/til
Confirm
Password"
/>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/tvSK"
...
...
@@ -161,9 +183,10 @@
android:id=
"@+id/tvDontHaveAnAccount"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"
7
5dp"
android:layout_marginStart=
"
8
5dp"
android:layout_marginTop=
"15dp"
android:text=
"@string/dont_have_an_account"
android:layout_marginBottom=
"15dp"
android:text=
"Have an Account? "
app:layout_constraintEnd_toStartOf=
"@id/tvSignInHere"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/btnRegister"
/>
...
...
@@ -175,9 +198,11 @@
android:layout_height=
"wrap_content"
android:layout_marginStart=
"2dp"
android:layout_marginTop=
"15dp"
android:layout_marginBottom=
"15dp"
android:text=
"@string/sign_in_here"
android:textColor=
"@color/blue"
app:layout_constraintStart_toEndOf=
"@id/tvDontHaveAnAccount"
app:layout_constraintTop_toBottomOf=
"@id/btnRegister"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
</layout>
\ No newline at end of file
app/src/main/res/menu/settings_menu.xml
View file @
ab827c08
...
...
@@ -8,5 +8,8 @@
android:title=
"Update / Delete Product"
/>
<item
android:id=
"@+id/item_three"
android:title=
"Transaction List"
/>
<item
android:id=
"@+id/item_four"
android:title=
"Log Out"
/>
</menu>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment