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
9bfadc4c
Commit
9bfadc4c
authored
Jan 19, 2018
by
zhang_z
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改扫码逻辑;
parent
3614f2d8
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
64 additions
and
16 deletions
+64
-16
app/libs/arm64-v8a/libjsonpay.so
app/libs/arm64-v8a/libjsonpay.so
+0
-0
app/libs/armeabi-v7a/libjsonpay.so
app/libs/armeabi-v7a/libjsonpay.so
+0
-0
app/libs/armeabi/libjsonpay.so
app/libs/armeabi/libjsonpay.so
+0
-0
app/libs/x86/libjsonpay.so
app/libs/x86/libjsonpay.so
+0
-0
app/src/main/java/com/xingdata/zzdpos/ui/store/StoreActivity.java
...main/java/com/xingdata/zzdpos/ui/store/StoreActivity.java
+18
-9
app/src/main/java/com/xingdata/zzdpos/ui/store/StoreContract.java
...main/java/com/xingdata/zzdpos/ui/store/StoreContract.java
+7
-0
app/src/main/java/com/xingdata/zzdpos/ui/store/StorePresenter.java
...ain/java/com/xingdata/zzdpos/ui/store/StorePresenter.java
+1
-2
app/src/main/java/com/xingdata/zzdpos/ui/store/fragment/SearchFragment.java
...com/xingdata/zzdpos/ui/store/fragment/SearchFragment.java
+16
-0
app/src/main/java/com/xingdata/zzdpos/ui/store/fragment/StoreFragment.java
.../com/xingdata/zzdpos/ui/store/fragment/StoreFragment.java
+1
-2
app/src/main/java/com/xingdata/zzdpos/zxpay.java
app/src/main/java/com/xingdata/zzdpos/zxpay.java
+14
-0
app/src/main/res/layout/fragment_store_search.xml
app/src/main/res/layout/fragment_store_search.xml
+6
-2
app/src/main/res/layout/item_store_sku.xml
app/src/main/res/layout/item_store_sku.xml
+1
-1
No files found.
app/libs/arm64-v8a/libjsonpay.so
View file @
9bfadc4c
No preview for this file type
app/libs/armeabi-v7a/libjsonpay.so
View file @
9bfadc4c
No preview for this file type
app/libs/armeabi/libjsonpay.so
View file @
9bfadc4c
No preview for this file type
app/libs/x86/libjsonpay.so
View file @
9bfadc4c
No preview for this file type
app/src/main/java/com/xingdata/zzdpos/ui/store/StoreActivity.java
View file @
9bfadc4c
...
...
@@ -36,8 +36,7 @@ import java.util.ArrayList;
import
java.util.List
;
public
class
StoreActivity
extends
BaseActivity
<
StorePresenter
,
ActivityStoreBinding
>
implements
StoreContract
.
View
{
public
class
StoreActivity
extends
BaseActivity
<
StorePresenter
,
ActivityStoreBinding
>
implements
StoreContract
.
View
{
private
StoreFragment
mStoreFragment
=
new
StoreFragment
();
private
SearchFragment
mSearchFragment
=
new
SearchFragment
();
...
...
@@ -165,7 +164,17 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin
mViewBinding
.
setTitleMode
(
C
.
TITLE_MODE
.
SKU
);
mViewBinding
.
etSearch
.
setText
(
""
);
mViewBinding
.
etSearch
.
requestFocus
();
this
.
start
(
mSearchFragment
);
this
.
start
(
mSearchFragment
.
setKeyword
(
""
));
}
}
@Override
public
void
showSearchFragment
(
String
keyword
)
{
if
(!
mSearchFragment
.
isAdded
())
{
mViewBinding
.
setTitleMode
(
C
.
TITLE_MODE
.
SKU
);
mViewBinding
.
etSearch
.
setText
(
keyword
);
mViewBinding
.
etSearch
.
requestFocus
();
this
.
start
(
mSearchFragment
.
setKeyword
(
keyword
));
}
}
...
...
@@ -194,28 +203,28 @@ public class StoreActivity extends BaseActivity<StorePresenter, ActivityStoreBin
* @param scaleLarge 放大比例
* @param duration 时间
*/
private
void
startShakeByPropertyAnim
(
View
view
,
float
scaleSmall
,
float
scaleLarge
,
long
duration
)
{
private
void
startShakeByPropertyAnim
(
View
view
,
float
scaleSmall
,
float
scaleLarge
,
long
duration
)
{
if
(
view
==
null
)
{
return
;
}
//先变小后变大
PropertyValuesHolder
scaleXValuesHolder
=
PropertyValuesHolder
.
ofKeyframe
(
View
.
SCALE_X
,
PropertyValuesHolder
scaleXValuesHolder
=
PropertyValuesHolder
.
ofKeyframe
(
View
.
SCALE_X
,
Keyframe
.
ofFloat
(
0
f
,
1.0f
),
Keyframe
.
ofFloat
(
0.25f
,
scaleSmall
),
Keyframe
.
ofFloat
(
0.5f
,
scaleLarge
),
Keyframe
.
ofFloat
(
0.75f
,
scaleLarge
),
Keyframe
.
ofFloat
(
1.0f
,
1.0f
)
);
PropertyValuesHolder
scaleYValuesHolder
=
PropertyValuesHolder
.
ofKeyframe
(
View
.
SCALE_Y
,
PropertyValuesHolder
scaleYValuesHolder
=
PropertyValuesHolder
.
ofKeyframe
(
View
.
SCALE_Y
,
Keyframe
.
ofFloat
(
0
f
,
1.0f
),
Keyframe
.
ofFloat
(
0.25f
,
scaleSmall
),
Keyframe
.
ofFloat
(
0.5f
,
scaleLarge
),
Keyframe
.
ofFloat
(
0.75f
,
scaleLarge
),
Keyframe
.
ofFloat
(
1.0f
,
1.0f
)
);
ObjectAnimator
objectAnimator
=
ObjectAnimator
.
ofPropertyValuesHolder
(
view
,
scaleXValuesHolder
,
scaleYValuesHolder
);
ObjectAnimator
objectAnimator
=
ObjectAnimator
.
ofPropertyValuesHolder
(
view
,
scaleXValuesHolder
,
scaleYValuesHolder
);
objectAnimator
.
setDuration
(
duration
);
objectAnimator
.
start
();
}
...
...
app/src/main/java/com/xingdata/zzdpos/ui/store/StoreContract.java
View file @
9bfadc4c
...
...
@@ -102,6 +102,13 @@ interface StoreContract {
*/
void
showSearchFragment
();
/**
* 显示搜索页面
*
* @param keyword 搜索内容
*/
void
showSearchFragment
(
String
keyword
);
/**
* 显示扫码页面
*/
...
...
app/src/main/java/com/xingdata/zzdpos/ui/store/StorePresenter.java
View file @
9bfadc4c
...
...
@@ -354,8 +354,7 @@ public class StorePresenter extends StoreContract.Presenter {
.
equalTo
(
"skuStatus"
,
0
)
.
findAll
());
if
(
ssskus
.
size
()
+
usskus
.
size
()
>
1
)
{
mView
.
showSearchFragment
();
this
.
searchSku
(
barcode
);
mView
.
showSearchFragment
(
barcode
);
}
else
if
(
ssskus
.
size
()
==
1
&&
usskus
.
size
()
==
0
)
{
this
.
clickAddSku
(
ssskus
.
get
(
0
),
1
);
}
else
if
(
ssskus
.
size
()
==
0
&&
usskus
.
size
()
==
1
)
{
...
...
app/src/main/java/com/xingdata/zzdpos/ui/store/fragment/SearchFragment.java
View file @
9bfadc4c
...
...
@@ -12,6 +12,7 @@ import android.view.animation.LinearInterpolator;
import
android.widget.ImageView
;
import
com.blankj.utilcode.util.ScreenUtils
;
import
com.blankj.utilcode.util.StringUtils
;
import
com.xingdata.zzdpos.C
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseFragment
;
...
...
@@ -26,7 +27,9 @@ import java.util.List;
public
class
SearchFragment
extends
BaseFragment
<
StorePresenter
,
FragmentStoreSearchBinding
>
{
private
SkuAdapter
mSkuAdapter
;
private
List
<
Saledetail
>
mSaledetails
;
private
String
mKeyword
;
@Override
public
int
getLayoutId
()
{
...
...
@@ -52,6 +55,9 @@ public class SearchFragment extends BaseFragment<StorePresenter, FragmentStoreSe
@SuppressLint
(
"InflateParams"
)
View
view
=
getLayoutInflater
().
inflate
(
R
.
layout
.
view_empty
,
null
);
mSkuAdapter
.
setEmptyView
(
view
);
mSkuAdapter
.
isUseEmpty
(
false
);
//init
if
(!
StringUtils
.
isEmpty
(
mKeyword
))
mPresenter
.
searchSku
(
mKeyword
);
}
...
...
@@ -108,6 +114,16 @@ public class SearchFragment extends BaseFragment<StorePresenter, FragmentStoreSe
}
/**
* 设置搜索关键字
*
* @param keyword 关键字
*/
public
SearchFragment
setKeyword
(
String
keyword
)
{
this
.
mKeyword
=
keyword
;
return
this
;
}
/**
* 点击添加按钮
*
...
...
app/src/main/java/com/xingdata/zzdpos/ui/store/fragment/StoreFragment.java
View file @
9bfadc4c
...
...
@@ -31,9 +31,8 @@ import java.util.List;
public
class
StoreFragment
extends
BaseFragment
<
StorePresenter
,
FragmentStoreBinding
>
{
private
SkugrpAdapter
mSkugrpAdapter
;
private
SkuAdapter
mSkuAdapter
;
private
SkugrpAdapter
mSkugrpAdapter
;
public
interface
OnCountChangeListener
{
void
onCountChange
(
View
view
,
BaseSku
sku
,
int
value
);
...
...
app/src/main/java/com/xingdata/zzdpos/zxpay.java
0 → 100644
View file @
9bfadc4c
package
com
.
xingdata
.
zzdpos
;
public
class
zxpay
{
static
{
System
.
loadLibrary
(
"jsonpay"
);
}
public
static
native
String
jsonpay
(
String
string
);
}
app/src/main/res/layout/fragment_store_search.xml
View file @
9bfadc4c
...
...
@@ -10,7 +10,11 @@
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rl_sku"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
android:layout_width=
"0dp"
android:layout_height=
"0dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/item_store_sku.xml
View file @
9bfadc4c
...
...
@@ -81,7 +81,7 @@
android:foreground=
"?android:attr/actionBarItemBackground"
android:padding=
"@dimen/all_spacing"
android:src=
"@mipmap/but_reduce"
android:visibility=
"
visibl
e"
/>
android:visibility=
"
gon
e"
/>
<TextView
android:id=
"@+id/tv_count"
...
...
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