Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TangKuPos
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
王海
TangKuPos
Commits
34370e17
Commit
34370e17
authored
Jan 16, 2018
by
陈前
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UI
parent
ccaad94d
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
135 additions
and
69 deletions
+135
-69
app/src/main/java/com/xingdata/zzdpos/ui/main/fragment/CasherFragment.java
.../com/xingdata/zzdpos/ui/main/fragment/CasherFragment.java
+10
-0
app/src/main/java/com/xingdata/zzdpos/ui/manage/otherselect/fragment/OtherListFragment.java
...pos/ui/manage/otherselect/fragment/OtherListFragment.java
+5
-5
app/src/main/java/com/xingdata/zzdpos/util/RecyclerViewUtil.java
.../main/java/com/xingdata/zzdpos/util/RecyclerViewUtil.java
+4
-4
app/src/main/java/com/xingdata/zzdpos/util/SystemUtil.java
app/src/main/java/com/xingdata/zzdpos/util/SystemUtil.java
+31
-1
app/src/main/res/layout/fragment_casher.xml
app/src/main/res/layout/fragment_casher.xml
+14
-4
app/src/main/res/layout/fragment_inventory.xml
app/src/main/res/layout/fragment_inventory.xml
+3
-1
app/src/main/res/layout/fragment_inventory_add.xml
app/src/main/res/layout/fragment_inventory_add.xml
+18
-17
app/src/main/res/layout/fragment_myself.xml
app/src/main/res/layout/fragment_myself.xml
+2
-13
app/src/main/res/layout/fragment_other_list.xml
app/src/main/res/layout/fragment_other_list.xml
+0
-8
app/src/main/res/layout/fragment_replenishement.xml
app/src/main/res/layout/fragment_replenishement.xml
+24
-16
app/src/main/res/layout/fragment_replenishment_list.xml
app/src/main/res/layout/fragment_replenishment_list.xml
+1
-0
app/src/main/res/layout/item_myself_string.xml
app/src/main/res/layout/item_myself_string.xml
+23
-0
No files found.
app/src/main/java/com/xingdata/zzdpos/ui/main/fragment/CasherFragment.java
View file @
34370e17
...
@@ -2,8 +2,10 @@ package com.xingdata.zzdpos.ui.main.fragment;
...
@@ -2,8 +2,10 @@ package com.xingdata.zzdpos.ui.main.fragment;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.support.constraint.ConstraintLayout
;
import
android.support.v7.widget.GridLayoutManager
;
import
android.support.v7.widget.GridLayoutManager
;
import
android.view.View
;
import
android.view.View
;
import
android.widget.LinearLayout
;
import
com.blankj.utilcode.util.ActivityUtils
;
import
com.blankj.utilcode.util.ActivityUtils
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
...
@@ -21,6 +23,7 @@ import com.xingdata.zzdpos.ui.store.StoreActivity;
...
@@ -21,6 +23,7 @@ import com.xingdata.zzdpos.ui.store.StoreActivity;
import
com.xingdata.zzdpos.ui.vip.VipActivity
;
import
com.xingdata.zzdpos.ui.vip.VipActivity
;
import
com.xingdata.zzdpos.util.MyMenuItemDecoration
;
import
com.xingdata.zzdpos.util.MyMenuItemDecoration
;
import
com.xingdata.zzdpos.util.OnClickListener
;
import
com.xingdata.zzdpos.util.OnClickListener
;
import
com.xingdata.zzdpos.util.SystemUtil
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
...
@@ -39,6 +42,13 @@ public class CasherFragment extends BaseFragment<MainPresenter, FragmentCasherBi
...
@@ -39,6 +42,13 @@ public class CasherFragment extends BaseFragment<MainPresenter, FragmentCasherBi
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
if
(
SystemUtil
.
checkDeviceHasNavigationBar
(
getActivity
())){
LinearLayout
.
LayoutParams
cp
=
new
LinearLayout
.
LayoutParams
(
mViewBinding
.
fragmentCasherRecycler
.
getLayoutParams
());
cp
.
setMargins
(
0
,
0
,
0
,
0
);
mViewBinding
.
fragmentCasherRecycler
.
setLayoutParams
(
cp
);
}
mViewBinding
.
fragmentCasherRecycler
.
setLayoutManager
(
new
GridLayoutManager
(
getActivity
(),
mViewBinding
.
fragmentCasherRecycler
.
setLayoutManager
(
new
GridLayoutManager
(
getActivity
(),
2
));
2
));
...
...
app/src/main/java/com/xingdata/zzdpos/ui/manage/otherselect/fragment/OtherListFragment.java
View file @
34370e17
...
@@ -87,11 +87,11 @@ public class OtherListFragment extends BaseFragment<OtherSelectPresenter, Fragme
...
@@ -87,11 +87,11 @@ public class OtherListFragment extends BaseFragment<OtherSelectPresenter, Fragme
else
if
(
pager
.
getList
().
size
()
>
0
)
mOtherSelectAdapter
.
addData
(
pager
.
getList
());
else
if
(
pager
.
getList
().
size
()
>
0
)
mOtherSelectAdapter
.
addData
(
pager
.
getList
());
if
(
pager
.
isLastPage
())
mOtherSelectAdapter
.
loadMoreEnd
(
isRefresh
);
if
(
pager
.
isLastPage
())
mOtherSelectAdapter
.
loadMoreEnd
(
isRefresh
);
else
mOtherSelectAdapter
.
loadMoreComplete
();
else
mOtherSelectAdapter
.
loadMoreComplete
();
if
(
mOtherSelectAdapter
.
getData
().
size
()
==
0
)
{
//
if (mOtherSelectAdapter.getData().size() == 0) {
mViewBinding
.
viewLine
.
setVisibility
(
View
.
GONE
);
//
mViewBinding.viewLine.setVisibility(View.GONE);
}
else
{
//
} else {
mViewBinding
.
viewLine
.
setVisibility
(
View
.
VISIBLE
);
//
mViewBinding.viewLine.setVisibility(View.VISIBLE);
}
//
}
}
}
...
...
app/src/main/java/com/xingdata/zzdpos/util/RecyclerViewUtil.java
View file @
34370e17
...
@@ -85,7 +85,7 @@ public class RecyclerViewUtil {
...
@@ -85,7 +85,7 @@ public class RecyclerViewUtil {
@Override
@Override
public
void
getItemOffsets
(
Rect
outRect
,
View
view
,
RecyclerView
parent
,
RecyclerView
.
State
state
)
{
public
void
getItemOffsets
(
Rect
outRect
,
View
view
,
RecyclerView
parent
,
RecyclerView
.
State
state
)
{
super
.
getItemOffsets
(
outRect
,
view
,
parent
,
state
);
super
.
getItemOffsets
(
outRect
,
view
,
parent
,
state
);
outRect
.
top
=
mDividerHight
+
20
;
outRect
.
top
=
mDividerHight
;
}
}
@Override
@Override
...
@@ -99,7 +99,7 @@ public class RecyclerViewUtil {
...
@@ -99,7 +99,7 @@ public class RecyclerViewUtil {
public
void
drawHorizontalDivider
(
Canvas
c
,
RecyclerView
parent
)
{
public
void
drawHorizontalDivider
(
Canvas
c
,
RecyclerView
parent
)
{
final
int
childCount
=
parent
.
getChildCount
();
final
int
childCount
=
parent
.
getChildCount
();
for
(
int
i
=
0
;
i
<
childCount
-
1
;
i
++)
{
for
(
int
i
=
0
;
i
<
childCount
;
i
++)
{
final
View
child
=
parent
.
getChildAt
(
i
);
final
View
child
=
parent
.
getChildAt
(
i
);
RecyclerView
.
LayoutParams
params
=
(
RecyclerView
.
LayoutParams
)
child
.
getLayoutParams
();
RecyclerView
.
LayoutParams
params
=
(
RecyclerView
.
LayoutParams
)
child
.
getLayoutParams
();
...
@@ -109,8 +109,8 @@ public class RecyclerViewUtil {
...
@@ -109,8 +109,8 @@ public class RecyclerViewUtil {
int
bottom
=
0
;
int
bottom
=
0
;
top
=
child
.
getTop
()
-
params
.
topMargin
;
bottom
=
child
.
getTop
()
-
params
.
topMargin
;
bottom
=
top
+
mDividerHight
;
top
=
bottom
-
mDividerHight
;
//画分割线
//画分割线
mDividerDarwable
.
setBounds
(
left
,
top
,
right
,
bottom
);
mDividerDarwable
.
setBounds
(
left
,
top
,
right
,
bottom
);
mDividerDarwable
.
draw
(
c
);
mDividerDarwable
.
draw
(
c
);
...
...
app/src/main/java/com/xingdata/zzdpos/util/SystemUtil.java
View file @
34370e17
package
com
.
xingdata
.
zzdpos
.
util
;
package
com
.
xingdata
.
zzdpos
.
util
;
import
android.content.Context
;
import
android.content.res.Resources
;
import
com.blankj.utilcode.util.AppUtils
;
import
com.blankj.utilcode.util.AppUtils
;
import
com.blankj.utilcode.util.DeviceUtils
;
import
com.blankj.utilcode.util.DeviceUtils
;
import
com.blankj.utilcode.util.ScreenUtils
;
import
com.blankj.utilcode.util.ScreenUtils
;
...
@@ -55,7 +58,7 @@ public final class SystemUtil {
...
@@ -55,7 +58,7 @@ public final class SystemUtil {
}
}
}
}
// return deviceSN;
// return deviceSN;
return
"548496
116
"
;
return
"548496"
;
}
}
...
@@ -77,4 +80,31 @@ public final class SystemUtil {
...
@@ -77,4 +80,31 @@ public final class SystemUtil {
return
ScreenUtils
.
isPortrait
();
return
ScreenUtils
.
isPortrait
();
}
}
/**
*
*获取是否存在NavigationBar
*/
public
static
boolean
checkDeviceHasNavigationBar
(
Context
context
)
{
boolean
hasNavigationBar
=
false
;
Resources
rs
=
context
.
getResources
();
int
id
=
rs
.
getIdentifier
(
"config_showNavigationBar"
,
"bool"
,
"android"
);
if
(
id
>
0
)
{
hasNavigationBar
=
rs
.
getBoolean
(
id
);
}
try
{
Class
systemPropertiesClass
=
Class
.
forName
(
"android.os.SystemProperties"
);
Method
m
=
systemPropertiesClass
.
getMethod
(
"get"
,
String
.
class
);
String
navBarOverride
=
(
String
)
m
.
invoke
(
systemPropertiesClass
,
"qemu.hw.mainkeys"
);
if
(
"1"
.
equals
(
navBarOverride
))
{
hasNavigationBar
=
false
;
}
else
if
(
"0"
.
equals
(
navBarOverride
))
{
hasNavigationBar
=
true
;
}
}
catch
(
Exception
e
)
{
}
return
hasNavigationBar
;
}
}
}
app/src/main/res/layout/fragment_casher.xml
View file @
34370e17
...
@@ -70,14 +70,24 @@
...
@@ -70,14 +70,24 @@
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
app:layout_constraintTop_toTopOf=
"parent"
/>
<android.support.v7.widget.RecyclerView
<LinearLayout
android:id=
"@+id/fragment_casher_recycler"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"0dp"
android:layout_height=
"0dp"
android:background=
"@color/white_caocao"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"@id/guideline"
/>
app:layout_constraintTop_toTopOf=
"@id/guideline"
>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/fragment_casher_recycler"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginBottom=
"@dimen/all_padding"
android:layout_marginTop=
"@dimen/all_padding"
android:background=
"@color/white_caocao"
/>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>
</layout>
</layout>
\ No newline at end of file
app/src/main/res/layout/fragment_inventory.xml
View file @
34370e17
...
@@ -61,7 +61,9 @@
...
@@ -61,7 +61,9 @@
android:id=
"@+id/recycler_inventory"
android:id=
"@+id/recycler_inventory"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/gray_zhouyu"
></android.support.v7.widget.RecyclerView>
android:background=
"@color/gray_zhouyu"
>
</android.support.v7.widget.RecyclerView>
</android.support.v4.widget.SwipeRefreshLayout>
</android.support.v4.widget.SwipeRefreshLayout>
...
...
app/src/main/res/layout/fragment_inventory_add.xml
View file @
34370e17
...
@@ -32,37 +32,38 @@
...
@@ -32,37 +32,38 @@
android:background=
"@color/gray_huanggai"
android:background=
"@color/gray_huanggai"
app:layout_constraintTop_toBottomOf=
"@id/ic_title"
/>
app:layout_constraintTop_toBottomOf=
"@id/ic_title"
/>
<TextView
android:id=
"@+id/tv_title_small"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/singleline_zhouyu_huanggai"
android:paddingBottom=
"@dimen/all_padding"
android:paddingStart=
"@dimen/all_padding_left_right"
android:paddingTop=
"@dimen/all_padding"
android:text=
"@string/manage_inventory_add_title"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/all_text_size_small_title"
android:textStyle=
"bold"
app:layout_constraintTop_toBottomOf=
"@id/ic_title"
/>
<
Linear
Layout
<
Relative
Layout
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"0dp"
android:layout_height=
"0dp"
android:orientation=
"vertical"
android:orientation=
"vertical"
app:layout_constraintBottom_toTopOf=
"@id/fl_cart"
app:layout_constraintBottom_toTopOf=
"@id/fl_cart"
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/
tv_title_small
"
>
app:layout_constraintTop_toBottomOf=
"@id/
ic_title
"
>
<android.support.v7.widget.RecyclerView
<android.support.v7.widget.RecyclerView
android:id=
"@+id/recycler_view"
android:id=
"@+id/recycler_view"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_below=
"@id/tv_title_small"
android:layout_marginTop=
"@dimen/Minus_padding_left_right"
android:background=
"@color/gray_zhouyu"
>
android:background=
"@color/gray_zhouyu"
>
</android.support.v7.widget.RecyclerView>
</android.support.v7.widget.RecyclerView>
</LinearLayout>
<TextView
android:id=
"@+id/tv_title_small"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/singleline_zhouyu_huanggai"
android:paddingBottom=
"@dimen/all_padding"
android:paddingStart=
"@dimen/all_padding_left_right"
android:paddingTop=
"@dimen/all_padding"
android:text=
"@string/manage_inventory_add_title"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/all_text_size_small_title"
android:textStyle=
"bold"
/>
</RelativeLayout>
<FrameLayout
<FrameLayout
...
...
app/src/main/res/layout/fragment_myself.xml
View file @
34370e17
...
@@ -123,25 +123,14 @@
...
@@ -123,25 +123,14 @@
<android.support.v7.widget.RecyclerView
<android.support.v7.widget.RecyclerView
android:id=
"@+id/fragment_myself_recycler"
android:id=
"@+id/fragment_myself_recycler"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"
wrap_content
"
android:layout_height=
"
0dp
"
android:layout_marginBottom=
"@dimen/all_padding"
android:layout_marginBottom=
"@dimen/all_padding"
android:layout_marginTop=
"@dimen/all_padding"
android:layout_marginTop=
"@dimen/all_padding"
android:background=
"@color/gray_zhouyu"
android:background=
"@color/gray_zhouyu"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"@id/guideline"
/>
app:layout_constraintTop_toTopOf=
"@id/guideline"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/view_line_L050"
android:background=
"@color/gray_kongming"
app:layout_constraintBottom_toBottomOf=
"@id/fragment_myself_recycler"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/view_line_L050"
android:background=
"@color/gray_kongming"
app:layout_constraintTop_toTopOf=
"@id/fragment_myself_recycler"
/>
</android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>
</layout>
</layout>
\ No newline at end of file
app/src/main/res/layout/fragment_other_list.xml
View file @
34370e17
...
@@ -10,14 +10,6 @@
...
@@ -10,14 +10,6 @@
android:background=
"@color/gray_zhouyu"
android:background=
"@color/gray_zhouyu"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<View
android:id=
"@+id/view_line"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/view_line_L050"
android:layout_marginTop=
"@dimen/padding_small"
android:background=
"@color/gray_huanggai"
android:visibility=
"gone"
/>
<android.support.v4.widget.SwipeRefreshLayout
<android.support.v4.widget.SwipeRefreshLayout
android:id=
"@+id/srl_product"
android:id=
"@+id/srl_product"
...
...
app/src/main/res/layout/fragment_replenishement.xml
View file @
34370e17
...
@@ -49,26 +49,34 @@
...
@@ -49,26 +49,34 @@
android:layout_height=
"@dimen/view_line_L050"
android:layout_height=
"@dimen/view_line_L050"
android:background=
"@color/gray_huanggai"
/>
android:background=
"@color/gray_huanggai"
/>
<android.support.design.widget.TabLayout
<RelativeLayout
android:id=
"@+id/tab"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"match_parent"
>
app:tabMinWidth=
"150dp"
app:tabTextColor=
"@color/black_baozheng"
>
</android.support.design.widget.TabLayout>
<android.support.v4.view.ViewPager
android:id=
"@+id/fragment_container"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_below=
"@id/tab"
android:layout_marginTop=
"-1dp"
/>
<View
<android.support.design.widget.TabLayout
android:layout_width=
"match_parent"
android:id=
"@+id/tab"
android:layout_height=
"@dimen/view_line_L050"
android:layout_width=
"match_parent"
android:background=
"@color/gray_huanggai"
/>
android:layout_height=
"wrap_content"
android:background=
"@color/white_caocao"
<android.support.v4.view.ViewPager
app:tabMinWidth=
"150dp"
android:id=
"@+id/fragment_container"
app:tabTextColor=
"@color/black_baozheng"
>
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
</android.support.design.widget.TabLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/view_line_L050"
android:layout_below=
"@id/tab"
android:background=
"@color/gray_huanggai"
/>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
...
...
app/src/main/res/layout/fragment_replenishment_list.xml
View file @
34370e17
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_below=
"@id/ll_title"
android:layout_below=
"@id/ll_title"
android:background=
"@color/gray_zhouyu"
android:gravity=
"center"
android:gravity=
"center"
android:orientation=
"vertical"
android:orientation=
"vertical"
android:visibility=
"gone"
>
android:visibility=
"gone"
>
...
...
app/src/main/res/layout/item_myself_string.xml
View file @
34370e17
...
@@ -24,6 +24,29 @@
...
@@ -24,6 +24,29 @@
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
app:layout_constraintTop_toTopOf=
"parent"
/>
<View
android:layout_width=
"0dp"
android:layout_height=
"@dimen/view_line_L050"
android:background=
"@color/gray_kongming"
app:layout_constraintEnd_toEndOf=
"@id/item_tv"
app:layout_constraintStart_toStartOf=
"@id/item_tv"
app:layout_constraintTop_toTopOf=
"@id/item_tv"
/>
<View
android:layout_width=
"0dp"
android:layout_height=
"@dimen/view_line_L050"
android:background=
"@color/gray_kongming"
app:layout_constraintBottom_toBottomOf=
"@id/item_tv"
app:layout_constraintEnd_toEndOf=
"@id/item_tv"
app:layout_constraintStart_toStartOf=
"@id/item_tv"
/>
<View
android:layout_width=
"0dp"
android:layout_height=
"@dimen/all_padding"
android:background=
"@color/gray_zhouyu"
app:layout_constraintTop_toBottomOf=
"@id/item_tv"
app:layout_constraintEnd_toEndOf=
"@id/item_tv"
app:layout_constraintStart_toStartOf=
"@id/item_tv"
/>
</android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>
</layout>
</layout>
\ 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