Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MiYaFastCashier
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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jiangjiantao
MiYaFastCashier
Commits
d9aa2ef1
Commit
d9aa2ef1
authored
Mar 25, 2022
by
zhaopengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update ui
parent
10046a2f
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
111 additions
and
5 deletions
+111
-5
SearchOrderActivity.kt
.../main/java/com/miya/fastcashier/ui/SearchOrderActivity.kt
+14
-0
DateSelectHelper.kt
.../main/java/com/miya/fastcashier/utils/DateSelectHelper.kt
+1
-0
CommonPromptView.java
...in/java/com/miya/fastcashier/widget/CommonPromptView.java
+46
-0
activity_price_input.xml
app/src/main/res/layout/activity_price_input.xml
+1
-1
fragment_search_order.xml
app/src/main/res/layout/fragment_search_order.xml
+14
-1
layout_common_prompt_view.xml
app/src/main/res/layout/layout_common_prompt_view.xml
+30
-0
app_bg_common_empty.png
app/src/main/res/mipmap-hdpi/app_bg_common_empty.png
+0
-0
colors.xml
app/src/main/res/values/colors.xml
+1
-0
strings.xml
app/src/main/res/values/strings.xml
+4
-3
No files found.
app/src/main/java/com/miya/fastcashier/ui/SearchOrderActivity.kt
View file @
d9aa2ef1
...
@@ -151,6 +151,12 @@ class SearchOrderFragment(val payType: MiYaPayPlantformPayWayEnum.MiyaPayType) :
...
@@ -151,6 +151,12 @@ class SearchOrderFragment(val payType: MiYaPayPlantformPayWayEnum.MiyaPayType) :
}
}
it
.
onSuccess
{
list
->
it
.
onSuccess
{
list
->
val
oldSize
=
adapter
.
getDataSource
().
size
val
oldSize
=
adapter
.
getDataSource
().
size
if
(
oldSize
==
0
&&
list
.
size
==
0
)
binding
!!
.
cpEmptyView
.
visibility
=
View
.
VISIBLE
else
binding
!!
.
cpEmptyView
.
visibility
=
View
.
GONE
adapter
.
getDataSource
().
addAll
(
list
)
adapter
.
getDataSource
().
addAll
(
list
)
if
(
oldSize
==
0
)
{
if
(
oldSize
==
0
)
{
adapter
.
notifyDataSetChanged
()
adapter
.
notifyDataSetChanged
()
...
@@ -162,9 +168,17 @@ class SearchOrderFragment(val payType: MiYaPayPlantformPayWayEnum.MiyaPayType) :
...
@@ -162,9 +168,17 @@ class SearchOrderFragment(val payType: MiYaPayPlantformPayWayEnum.MiyaPayType) :
}
}
}
}
}
}
initEmptyView
()
loadMore
(
0
)
loadMore
(
0
)
}
}
private
fun
initEmptyView
()
{
binding
!!
.
cpEmptyView
.
visibility
=
View
.
GONE
binding
!!
.
cpEmptyView
.
setPromptText
(
getString
(
R
.
string
.
search_order_prompt_text
))
binding
!!
.
cpEmptyView
.
setPromptImage
(
R
.
mipmap
.
app_bg_common_empty
)
}
private
fun
loadMore
(
loadIndex
:
Int
)
{
private
fun
loadMore
(
loadIndex
:
Int
)
{
//加载更多
//加载更多
vm
.
getPayData
(
payType
,
loadIndex
)
vm
.
getPayData
(
payType
,
loadIndex
)
...
...
app/src/main/java/com/miya/fastcashier/utils/DateSelectHelper.kt
View file @
d9aa2ef1
...
@@ -60,6 +60,7 @@ class DateSelectHelper(val act: Activity, val callback: (Date) -> Unit) {
...
@@ -60,6 +60,7 @@ class DateSelectHelper(val act: Activity, val callback: (Date) -> Unit) {
.
setContentTextSize
(
30
)
.
setContentTextSize
(
30
)
.
setTitleSize
(
30
)
.
setTitleSize
(
30
)
.
setSubCalSize
(
30
)
.
setSubCalSize
(
30
)
.
setLineSpacingMultiplier
(
1.9f
)
.
setRangDate
(
startDate
,
endDate
)
.
setRangDate
(
startDate
,
endDate
)
.
setOutSideCancelable
(
false
)
.
setOutSideCancelable
(
false
)
.
setDecorView
(
act
.
findViewById
(
android
.
R
.
id
.
content
))
.
setDecorView
(
act
.
findViewById
(
android
.
R
.
id
.
content
))
...
...
app/src/main/java/com/miya/fastcashier/widget/CommonPromptView.java
0 → 100644
View file @
d9aa2ef1
package
com
.
miya
.
fastcashier
.
widget
;
import
android.content.Context
;
import
android.util.AttributeSet
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
com.miya.fastcashier.R
;
import
com.miya.fastcashier.databinding.LayoutCommonPromptViewBinding
;
import
org.jetbrains.annotations.NotNull
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.Nullable
;
import
androidx.constraintlayout.widget.ConstraintLayout
;
public
class
CommonPromptView
extends
ConstraintLayout
{
private
LayoutCommonPromptViewBinding
viewBinding
;
public
CommonPromptView
(
@NonNull
@NotNull
Context
context
)
{
this
(
context
,
null
);
}
public
CommonPromptView
(
@NonNull
@NotNull
Context
context
,
@Nullable
@org
.
jetbrains
.
annotations
.
Nullable
AttributeSet
attrs
)
{
this
(
context
,
attrs
,
0
);
}
public
CommonPromptView
(
@NonNull
@NotNull
Context
context
,
@Nullable
@org
.
jetbrains
.
annotations
.
Nullable
AttributeSet
attrs
,
int
defStyleAttr
)
{
super
(
context
,
attrs
,
defStyleAttr
);
View
inflate
=
LayoutInflater
.
from
(
getContext
()).
inflate
(
R
.
layout
.
layout_common_prompt_view
,
this
);
viewBinding
=
LayoutCommonPromptViewBinding
.
bind
(
inflate
);
}
public
void
setPromptImage
(
int
imageResId
)
{
viewBinding
.
ivPrompt
.
setImageResource
(
imageResId
);
}
public
void
setPromptText
(
String
text
)
{
viewBinding
.
tvPrompt
.
setText
(
text
);
}
}
app/src/main/res/layout/activity_price_input.xml
View file @
d9aa2ef1
...
@@ -98,7 +98,7 @@
...
@@ -98,7 +98,7 @@
android:textColor=
"@color/white"
android:textColor=
"@color/white"
android:textColorHint=
"#89889A"
android:textColorHint=
"#89889A"
android:textAlignment=
"textEnd"
android:textAlignment=
"textEnd"
android:textSize=
"
47
sp"
android:textSize=
"
64
sp"
android:paddingTop=
"5dp"
android:paddingTop=
"5dp"
android:layout_marginEnd=
"32dp"
android:layout_marginEnd=
"32dp"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
...
...
app/src/main/res/layout/fragment_search_order.xml
View file @
d9aa2ef1
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_height=
"match_parent"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<androidx.recyclerview.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rvContent"
android:id=
"@+id/rvContent"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:background=
"@color/color_F8F8F8"
android:background=
"@color/color_F8F8F8"
android:layout_height=
"match_parent"
/>
android:layout_height=
"match_parent"
/>
<com.miya.fastcashier.widget.CommonPromptView
android:id=
"@+id/cpEmptyView"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/color_E5E5E5"
app:layout_constraintStart_toStartOf=
"parent"
android:visibility=
"gone"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/layout_common_prompt_view.xml
0 → 100644
View file @
d9aa2ef1
<?xml version="1.0" encoding="utf-8"?>
<merge
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
>
<ImageView
android:id=
"@+id/iv_prompt"
android:layout_width=
"426dp"
android:layout_height=
"320dp"
android:layout_marginTop=
"123dp"
android:scaleType=
"centerCrop"
android:src=
"@mipmap/app_bg_common_empty"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tv_prompt"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"26dp"
android:textColor=
"@color/color_333333"
android:textSize=
"32sp"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/iv_prompt"
/>
</merge>
app/src/main/res/mipmap-hdpi/app_bg_common_empty.png
0 → 100755
View file @
d9aa2ef1
10.4 KB
app/src/main/res/values/colors.xml
View file @
d9aa2ef1
...
@@ -15,4 +15,5 @@
...
@@ -15,4 +15,5 @@
<color
name=
"color_FF4E33"
>
#FF4E33
</color>
<color
name=
"color_FF4E33"
>
#FF4E33
</color>
<color
name=
"color_ECECEC"
>
#ECECEC
</color>
<color
name=
"color_ECECEC"
>
#ECECEC
</color>
<color
name=
"color_F8F8F8"
>
#F8F8F8
</color>
<color
name=
"color_F8F8F8"
>
#F8F8F8
</color>
<color
name=
"color_E5E5E5"
>
#E5E5E5
</color>
</resources>
</resources>
\ No newline at end of file
app/src/main/res/values/strings.xml
View file @
d9aa2ef1
...
@@ -15,10 +15,11 @@
...
@@ -15,10 +15,11 @@
<string
name=
"username_not_empty"
>
用户名不能为空
</string>
<string
name=
"username_not_empty"
>
用户名不能为空
</string>
<string
name=
"password_not_empty"
>
密码不能为空
</string>
<string
name=
"password_not_empty"
>
密码不能为空
</string>
<string
name=
"invalid_password"
>
密码位数必须得是6位以上
</string>
<string
name=
"invalid_password"
>
密码位数必须得是6位以上
</string>
<string
name=
"search"
>
查询
</string>
<string
name=
"search"
>
查询
账单
</string>
<string
name=
"statistic"
>
统计
</string>
<string
name=
"statistic"
>
统计
打印
</string>
<string
name=
"balance"
>
结算
</string>
<string
name=
"balance"
>
结算
打印
</string>
<string
name=
"cancel"
>
取消
</string>
<string
name=
"cancel"
>
取消
</string>
<string
name=
"sure"
>
确定
</string>
<string
name=
"sure"
>
确定
</string>
<string
name=
"search_order_prompt_text"
>
还没有明细哦~
</string>
</resources>
</resources>
\ 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