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
45f156a2
Commit
45f156a2
authored
Sep 01, 2020
by
Ahmad Abi Mulya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add confirm password in register, fix unconcistance language
parent
e5617de2
Show 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 @
45f156a2
...
@@ -5,6 +5,7 @@ import androidx.appcompat.app.AppCompatActivity;
...
@@ -5,6 +5,7 @@ import androidx.appcompat.app.AppCompatActivity;
import
androidx.databinding.DataBindingUtil
;
import
androidx.databinding.DataBindingUtil
;
import
androidx.lifecycle.ViewModelProvider
;
import
androidx.lifecycle.ViewModelProvider
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.room.FtsOptions
;
import
android.Manifest
;
import
android.Manifest
;
...
@@ -95,6 +96,10 @@ public class MainActivity extends AppCompatActivity {
...
@@ -95,6 +96,10 @@ public class MainActivity extends AppCompatActivity {
overridePendingTransition
(
0
,
0
);
overridePendingTransition
(
0
,
0
);
return
true
;
return
true
;
case
R
.
id
.
item_three
:
case
R
.
id
.
item_three
:
startActivity
(
new
Intent
(
MainActivity
.
this
,
OrderActivity
.
class
));
finish
();
break
;
case
R
.
id
.
item_four
:
prefManager
.
removeLoginSession
();
prefManager
.
removeLoginSession
();
startActivity
(
new
Intent
(
MainActivity
.
this
,
LoginActivity
.
class
));
startActivity
(
new
Intent
(
MainActivity
.
this
,
LoginActivity
.
class
));
finish
();
finish
();
...
...
app/src/main/java/com/example/yourcashiertest/activities/RegisterActivity.java
View file @
45f156a2
...
@@ -40,6 +40,8 @@ public class RegisterActivity extends AppCompatActivity {
...
@@ -40,6 +40,8 @@ public class RegisterActivity extends AppCompatActivity {
binding
.
etPassword
.
setError
(
"Passwords can only contain Alphanumeric"
);
binding
.
etPassword
.
setError
(
"Passwords can only contain Alphanumeric"
);
}
else
if
(
binding
.
etPassword
.
getText
().
toString
().
length
()
<
8
)
{
}
else
if
(
binding
.
etPassword
.
getText
().
toString
().
length
()
<
8
)
{
binding
.
etPassword
.
setError
(
"Password length cannot be less than 8 characters"
);
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
{
}
else
{
user
.
setEmail
(
binding
.
etEmail
.
getText
().
toString
());
user
.
setEmail
(
binding
.
etEmail
.
getText
().
toString
());
user
.
setFullName
(
binding
.
etUsername
.
getText
().
toString
());
user
.
setFullName
(
binding
.
etUsername
.
getText
().
toString
());
...
...
app/src/main/res/layout/activity_order.xml
View file @
45f156a2
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
app:layout_constraintVertical_bias=
"0.105"
/>
app:layout_constraintVertical_bias=
"0.105"
/>
<com.google.android.material.button.MaterialButton
<com.google.android.material.button.MaterialButton
android:id=
"@+id/btnPending"
android:id=
"@+id/btnPending"
android:layout_width=
"1
9
0dp"
android:layout_width=
"1
6
0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"PENDING"
android:text=
"PENDING"
android:textSize=
"10dp"
android:textSize=
"10dp"
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
<com.google.android.material.button.MaterialButton
<com.google.android.material.button.MaterialButton
android:id=
"@+id/btnSuccess"
android:id=
"@+id/btnSuccess"
android:layout_width=
"1
9
0dp"
android:layout_width=
"1
6
0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"4dp"
android:layout_marginEnd=
"4dp"
android:text=
"SUCCESS"
android:text=
"SUCCESS"
...
...
app/src/main/res/layout/activity_product.xml
View file @
45f156a2
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
android:id=
"@+id/etProduct"
android:id=
"@+id/etProduct"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:hint=
"
Nama produk
"
android:hint=
"
Product Name
"
android:text=
"@{viewModel.product.name}"
android:text=
"@{viewModel.product.name}"
android:inputType=
"textCapWords"
android:inputType=
"textCapWords"
android:textSize=
"@dimen/text_default"
/>
android:textSize=
"@dimen/text_default"
/>
...
@@ -85,7 +85,7 @@
...
@@ -85,7 +85,7 @@
android:id=
"@+id/etPrice"
android:id=
"@+id/etPrice"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:hint=
"
Harga
"
android:hint=
"
Price
"
android:text=
"@{viewModel.product.price == 0 ? `` : viewModel.product.price + ``}"
android:text=
"@{viewModel.product.price == 0 ? `` : viewModel.product.price + ``}"
android:inputType=
"number"
android:inputType=
"number"
android:textSize=
"@dimen/text_default"
/>
android:textSize=
"@dimen/text_default"
/>
...
@@ -107,7 +107,7 @@
...
@@ -107,7 +107,7 @@
android:id=
"@+id/etQuantity"
android:id=
"@+id/etQuantity"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:hint=
"
Jumlah
"
android:hint=
"
Qty
"
android:text=
"@{viewModel.product.quantity == 0 ? `` : viewModel.product.quantity + ``}"
android:text=
"@{viewModel.product.quantity == 0 ? `` : viewModel.product.quantity + ``}"
android:inputType=
"number"
android:inputType=
"number"
android:textSize=
"@dimen/text_default"
/>
android:textSize=
"@dimen/text_default"
/>
...
@@ -124,7 +124,7 @@
...
@@ -124,7 +124,7 @@
android:layout_marginEnd=
"@dimen/space_default"
>
android:layout_marginEnd=
"@dimen/space_default"
>
<com.google.android.material.textfield.TextInputEditText
<com.google.android.material.textfield.TextInputEditText
android:id=
"@+id/etCategory"
android:id=
"@+id/etCategory"
android:hint=
"Categor
i
"
android:hint=
"Categor
y
"
android:text=
"@{viewModel.product.category}"
android:text=
"@{viewModel.product.category}"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
android:layout_height=
"wrap_content"
/>
...
@@ -144,7 +144,7 @@
...
@@ -144,7 +144,7 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"start|top"
android:gravity=
"start|top"
android:hint=
"
Deskripsi produk
"
android:hint=
"
Product Description
"
android:inputType=
"textMultiLine"
android:inputType=
"textMultiLine"
android:lines=
"3"
android:lines=
"3"
android:maxLines=
"3"
android:maxLines=
"3"
...
...
app/src/main/res/layout/activity_register.xml
View file @
45f156a2
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
>
xmlns:tools=
"http://schemas.android.com/tools"
>
<
data>
<
ScrollView
android:layout_width=
"match_parent"
</data
>
android:layout_height=
"match_parent"
>
<androidx.constraintlayout.widget.ConstraintLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -109,6 +109,28 @@
...
@@ -109,6 +109,28 @@
android:textSize=
"@dimen/text_default"
/>
android:textSize=
"@dimen/text_default"
/>
</com.google.android.material.textfield.TextInputLayout>
</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
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/tvDescSk"
android:id=
"@+id/tvDescSk"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
...
@@ -118,7 +140,7 @@
...
@@ -118,7 +140,7 @@
android:text=
"By registering you have agreed to the"
android:text=
"By registering you have agreed to the"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"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
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/tvSK"
android:id=
"@+id/tvSK"
...
@@ -161,9 +183,10 @@
...
@@ -161,9 +183,10 @@
android:id=
"@+id/tvDontHaveAnAccount"
android:id=
"@+id/tvDontHaveAnAccount"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"
7
5dp"
android:layout_marginStart=
"
8
5dp"
android:layout_marginTop=
"15dp"
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_constraintEnd_toStartOf=
"@id/tvSignInHere"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/btnRegister"
/>
app:layout_constraintTop_toBottomOf=
"@id/btnRegister"
/>
...
@@ -175,9 +198,11 @@
...
@@ -175,9 +198,11 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"2dp"
android:layout_marginStart=
"2dp"
android:layout_marginTop=
"15dp"
android:layout_marginTop=
"15dp"
android:layout_marginBottom=
"15dp"
android:text=
"@string/sign_in_here"
android:text=
"@string/sign_in_here"
android:textColor=
"@color/blue"
android:textColor=
"@color/blue"
app:layout_constraintStart_toEndOf=
"@id/tvDontHaveAnAccount"
app:layout_constraintStart_toEndOf=
"@id/tvDontHaveAnAccount"
app:layout_constraintTop_toBottomOf=
"@id/btnRegister"
/>
app:layout_constraintTop_toBottomOf=
"@id/btnRegister"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
</layout>
</layout>
\ No newline at end of file
app/src/main/res/menu/settings_menu.xml
View file @
45f156a2
...
@@ -8,5 +8,8 @@
...
@@ -8,5 +8,8 @@
android:title=
"Update / Delete Product"
/>
android:title=
"Update / Delete Product"
/>
<item
<item
android:id=
"@+id/item_three"
android:id=
"@+id/item_three"
android:title=
"Transaction List"
/>
<item
android:id=
"@+id/item_four"
android:title=
"Log Out"
/>
android:title=
"Log Out"
/>
</menu>
</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