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
6ac0ec6a
Commit
6ac0ec6a
authored
Aug 24, 2020
by
Trio Saputra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
layout add
parent
5f20f78c
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
189 additions
and
14 deletions
+189
-14
misc.xml
.idea/misc.xml
+1
-1
build.gradle
app/build.gradle
+6
-0
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+4
-3
ProductActivity.java
...ain/java/com/example/yourcashiertest/ProductActivity.java
+14
-0
unnamed.jpg
app/src/main/res/drawable-v24/unnamed.jpg
+0
-0
activity_product.xml
app/src/main/res/layout/activity_product.xml
+143
-0
item_product.xml
app/src/main/res/layout/item_product.xml
+5
-8
dimens.xml
app/src/main/res/values/dimens.xml
+1
-1
strings.xml
app/src/main/res/values/strings.xml
+7
-0
styles.xml
app/src/main/res/values/styles.xml
+7
-0
build.gradle
build.gradle
+1
-1
No files found.
.idea/misc.xml
View file @
6ac0ec6a
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<project
version=
"4"
>
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_1_
7
"
project-jdk-name=
"1.8"
project-jdk-type=
"JavaSDK"
>
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_1_
8
"
project-jdk-name=
"1.8"
project-jdk-type=
"JavaSDK"
>
<output
url=
"file://$PROJECT_DIR$/build/classes"
/>
<output
url=
"file://$PROJECT_DIR$/build/classes"
/>
</component>
</component>
<component
name=
"ProjectType"
>
<component
name=
"ProjectType"
>
...
...
app/build.gradle
View file @
6ac0ec6a
...
@@ -23,6 +23,12 @@ android {
...
@@ -23,6 +23,12 @@ android {
proguardFiles
getDefaultProguardFile
(
'proguard-android-optimize.txt'
),
'proguard-rules.pro'
proguardFiles
getDefaultProguardFile
(
'proguard-android-optimize.txt'
),
'proguard-rules.pro'
}
}
}
}
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
targetCompatibility
JavaVersion
.
VERSION_1_8
}
}
}
dependencies
{
dependencies
{
...
...
app/src/main/AndroidManifest.xml
View file @
6ac0ec6a
...
@@ -8,14 +8,15 @@
...
@@ -8,14 +8,15 @@
android:label=
"@string/app_name"
android:label=
"@string/app_name"
android:roundIcon=
"@mipmap/ic_launcher_round"
android:roundIcon=
"@mipmap/ic_launcher_round"
android:supportsRtl=
"true"
android:supportsRtl=
"true"
android:theme=
"@style/AppTheme"
>
android:theme=
"@style/AppTheme
.NoActionBar
"
>
<activity
android:name=
".
Main
Activity"
>
<activity
android:name=
".
Product
Activity"
>
<intent-filter>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
<action
android:name=
"android.intent.action.MAIN"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
</intent-filter>
</activity>
</activity>
<activity
android:name=
".MainActivity"
>
</activity>
</application>
</application>
</manifest>
</manifest>
\ No newline at end of file
app/src/main/java/com/example/yourcashiertest/ProductActivity.java
0 → 100644
View file @
6ac0ec6a
package
com
.
example
.
yourcashiertest
;
import
androidx.appcompat.app.AppCompatActivity
;
import
android.os.Bundle
;
public
class
ProductActivity
extends
AppCompatActivity
{
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_product
);
}
}
\ No newline at end of file
app/src/main/res/drawable-v24/unnamed.jpg
0 → 100644
View file @
6ac0ec6a
14.4 KB
app/src/main/res/layout/activity_product.xml
0 → 100644
View file @
6ac0ec6a
<?xml version="1.0" encoding="utf-8"?>
<layout
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"
>
<data>
<variable
name=
"photo"
type=
"String"
/>
</data>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/colorBackground"
tools:context=
".activities.ProductActivity"
>
<com.google.android.material.card.MaterialCardView
android:id=
"@+id/cvProduct"
android:layout_width=
"160dp"
android:layout_height=
"160dp"
android:layout_centerHorizontal=
"true"
android:layout_margin=
"16dp"
app:cardCornerRadius=
"80dp"
>
<ImageView
android:id=
"@+id/ivProduct"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:scaleType=
"centerCrop"
android:src=
"@drawable/unnamed"
/>
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.textfield.TextInputLayout
android:id=
"@+id/tilProduct"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/cvProduct"
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/etProduct"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:hint=
"Nama produk"
android:inputType=
"textCapWords"
android:textSize=
"@dimen/text_default"
/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id=
"@+id/tilPrice"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/tilProduct"
android:layout_marginStart=
"@dimen/space_default"
android:layout_marginBottom=
"@dimen/space_default"
android:layout_toStartOf=
"@id/tilQuantity"
>
<com.google.android.material.textfield.TextInputEditText
android:id=
"@+id/etPrice"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:hint=
"Harga"
android:inputType=
"number"
android:textSize=
"@dimen/text_default"
/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id=
"@+id/tilQuantity"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
android:layout_width=
"96dp"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/tilProduct"
android:layout_alignParentEnd=
"true"
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/etQuantity"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:hint=
"Jumlah"
android:inputType=
"number"
android:textSize=
"@dimen/text_default"
/>
</com.google.android.material.textfield.TextInputLayout>
<Spinner
android:id=
"@+id/spCategory"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
tools:listitem=
"@layout/support_simple_spinner_dropdown_item"
android:layout_below=
"@+id/tilPrice"
android:layout_marginStart=
"@dimen/space_default"
android:layout_marginBottom=
"@dimen/space_default"
android:layout_marginEnd=
"@dimen/space_default"
tools:ignore=
"NotSibling"
/>
<com.google.android.material.textfield.TextInputLayout
android:id=
"@+id/tilDescription"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/spCategory"
android:layout_marginStart=
"@dimen/space_default"
android:layout_marginEnd=
"@dimen/space_default"
>
<com.google.android.material.textfield.TextInputEditText
android:id=
"@+id/etDescription"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"start|top"
android:hint=
"Deskripsi produk"
android:inputType=
"textMultiLine"
android:lines=
"3"
android:maxLines=
"3"
android:text=
""
android:textSize=
"@dimen/text_default"
/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.button.MaterialButton
android:id=
"@+id/btnSubmit"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/tilDescription"
android:layout_margin=
"@dimen/space_default"
android:backgroundTint=
"@color/colorPrimary"
android:padding=
"16dp"
android:text=
"Tambah Produk"
android:textColor=
"@color/white"
app:cornerRadius=
"@dimen/space_default"
android:elevation=
"5dp"
/>
</RelativeLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/item_product.xml
View file @
6ac0ec6a
...
@@ -27,16 +27,14 @@
...
@@ -27,16 +27,14 @@
android:id=
"@+id/ivUpdate"
android:id=
"@+id/ivUpdate"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:padding=
"@dimen/space_small"
android:padding=
"@dimen/space_small"
/>
android:src=
"@drawable/ic_update"
/>
<ImageView
<ImageView
android:id=
"@+id/ivDelete"
android:id=
"@+id/ivDelete"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:padding=
"@dimen/space_small"
android:padding=
"@dimen/space_small"
android:layout_alignParentEnd=
"true"
android:layout_alignParentEnd=
"true"
/>
android:src=
"@drawable/ic_delete"
/>
<com.google.android.material.textview.MaterialTextView
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/tvQuantity"
android:id=
"@+id/tvQuantity"
...
@@ -46,7 +44,6 @@
...
@@ -46,7 +44,6 @@
android:layout_alignParentEnd=
"true"
android:layout_alignParentEnd=
"true"
android:layout_marginEnd=
"1dp"
android:layout_marginEnd=
"1dp"
android:layout_marginBottom=
"0dp"
android:layout_marginBottom=
"0dp"
android:background=
"@drawable/bg_quantity"
android:fontFamily=
"monospace"
android:fontFamily=
"monospace"
android:padding=
"@dimen/space_small"
android:padding=
"@dimen/space_small"
android:text=
"@{product.quantity + ``}"
android:text=
"@{product.quantity + ``}"
...
@@ -60,7 +57,7 @@
...
@@ -60,7 +57,7 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/ivProduct"
android:layout_below=
"@id/ivProduct"
android:fontFamily=
"
@font/roboto_medium
"
android:fontFamily=
""
android:gravity=
"center"
android:gravity=
"center"
android:padding=
"@dimen/space_small"
android:padding=
"@dimen/space_small"
android:text=
"@{product.name}"
android:text=
"@{product.name}"
...
@@ -75,7 +72,7 @@
...
@@ -75,7 +72,7 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/tvProduct"
android:layout_below=
"@id/tvProduct"
android:fontFamily=
"
@font/roboto_medium
"
android:fontFamily=
""
android:gravity=
"end"
android:gravity=
"end"
android:paddingStart=
"@dimen/space_small"
android:paddingStart=
"@dimen/space_small"
android:paddingEnd=
"@dimen/space_small"
android:paddingEnd=
"@dimen/space_small"
...
@@ -89,7 +86,7 @@
...
@@ -89,7 +86,7 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/tvPrice"
android:layout_below=
"@id/tvPrice"
android:fontFamily=
"
@font/roboto_medium
"
android:fontFamily=
""
android:padding=
"@dimen/space_small"
android:padding=
"@dimen/space_small"
android:text=
"@{product.description}"
android:text=
"@{product.description}"
android:textColor=
"@android:color/darker_gray"
android:textColor=
"@android:color/darker_gray"
...
...
app/src/main/res/values/dimens.xml
View file @
6ac0ec6a
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<resources>
<dimen
name=
"text_default"
>
16sp
</dimen>
<dimen
name=
"text_default"
>
16sp
</dimen>
<dimen
name=
"space_default"
>
1
6
dp
</dimen>
<dimen
name=
"space_default"
>
1
0
dp
</dimen>
<dimen
name=
"text_large"
>
20sp
</dimen>
<dimen
name=
"text_large"
>
20sp
</dimen>
<dimen
name=
"space_small"
>
8dp
</dimen>
<dimen
name=
"space_small"
>
8dp
</dimen>
<dimen
name=
"text_small"
>
12sp
</dimen>
<dimen
name=
"text_small"
>
12sp
</dimen>
...
...
app/src/main/res/values/strings.xml
View file @
6ac0ec6a
<resources>
<resources>
<string
name=
"app_name"
>
Your Cashier
</string>
<string
name=
"app_name"
>
Your Cashier
</string>
<string-array
name=
"category"
>
<item>
Makanan
</item>
<item>
Minuman
</item>
<item>
Lainnya
</item>
</string-array>
</resources>
</resources>
\ No newline at end of file
app/src/main/res/values/styles.xml
View file @
6ac0ec6a
...
@@ -7,4 +7,11 @@
...
@@ -7,4 +7,11 @@
<item
name=
"colorAccent"
>
@color/colorAccent
</item>
<item
name=
"colorAccent"
>
@color/colorAccent
</item>
</style>
</style>
<style
name=
"AppTheme.NoActionBar"
parent=
"Theme.MaterialComponents.Light.NoActionBar"
>
<!-- Customize your theme here. -->
<item
name=
"colorPrimary"
>
@color/colorPrimary
</item>
<item
name=
"colorPrimaryDark"
>
@color/colorPrimaryDark
</item>
<item
name=
"colorAccent"
>
@color/colorAccent
</item>
</style>
</resources>
</resources>
\ No newline at end of file
build.gradle
View file @
6ac0ec6a
...
@@ -5,7 +5,7 @@ buildscript {
...
@@ -5,7 +5,7 @@ buildscript {
jcenter
()
jcenter
()
}
}
dependencies
{
dependencies
{
classpath
"com.android.tools.build:gradle:4.0.0"
classpath
'com.android.tools.build:gradle:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
// in the individual module build.gradle files
...
...
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