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
b72ffe3f
Commit
b72ffe3f
authored
Jan 30, 2018
by
陈前
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
# Conflicts: # app/src/main/res/layout/fragment_send_ticker_vip.xml
parents
463e8b66
f3cead13
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
24 deletions
+23
-24
app/src/main/java/com/xingdata/zzdpos/ui/sendticke/fragment/VipFragment.java
...om/xingdata/zzdpos/ui/sendticke/fragment/VipFragment.java
+4
-9
app/src/main/java/com/xingdata/zzdpos/view/SearchBar.java
app/src/main/java/com/xingdata/zzdpos/view/SearchBar.java
+4
-1
app/src/main/res/layout/fragment_send_ticker_vip.xml
app/src/main/res/layout/fragment_send_ticker_vip.xml
+14
-14
app/src/main/res/layout/view_search_bar.xml
app/src/main/res/layout/view_search_bar.xml
+1
-0
No files found.
app/src/main/java/com/xingdata/zzdpos/ui/sendticke/fragment/VipFragment.java
View file @
b72ffe3f
...
@@ -5,7 +5,6 @@ import android.support.v7.widget.LinearLayoutManager;
...
@@ -5,7 +5,6 @@ import android.support.v7.widget.LinearLayoutManager;
import
android.view.View
;
import
android.view.View
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
com.blankj.utilcode.util.KeyboardUtils
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.databinding.FragmentSendTickerVipBinding
;
import
com.xingdata.zzdpos.databinding.FragmentSendTickerVipBinding
;
...
@@ -13,7 +12,6 @@ import com.xingdata.zzdpos.model.Vip;
...
@@ -13,7 +12,6 @@ import com.xingdata.zzdpos.model.Vip;
import
com.xingdata.zzdpos.ui.sendticke.SendTicketPresenter
;
import
com.xingdata.zzdpos.ui.sendticke.SendTicketPresenter
;
import
com.xingdata.zzdpos.ui.sendticke.adapter.VipAdapter
;
import
com.xingdata.zzdpos.ui.sendticke.adapter.VipAdapter
;
import
com.xingdata.zzdpos.ui.settle.SettleActivity
;
import
com.xingdata.zzdpos.ui.settle.SettleActivity
;
import
com.xingdata.zzdpos.util.Global
;
import
com.xingdata.zzdpos.util.OnClickListener
;
import
com.xingdata.zzdpos.util.OnClickListener
;
import
java.util.List
;
import
java.util.List
;
...
@@ -66,14 +64,11 @@ public class VipFragment extends BaseFragment<SendTicketPresenter, FragmentSendT
...
@@ -66,14 +64,11 @@ public class VipFragment extends BaseFragment<SendTicketPresenter, FragmentSendT
}
}
}
}
});
});
mViewBinding
.
etSearch
.
setOnEditorActionListener
((
textView
,
i
,
keyEvent
)
->
{
mViewBinding
.
vSearch
.
setOnSearchListener
(
keyword
->
{
KeyboardUtils
.
hideSoftInput
(
textView
);
mViewBinding
.
vSearch
.
hideSoftInput
();
mPresenter
.
searchVip
(
textView
.
getText
().
toString
());
mPresenter
.
searchVip
(
keyword
);
return
false
;
});
});
Global
.
setFocus
(
mViewBinding
.
etSearch
,
getActivity
());
mViewBinding
.
vSearch
.
showSoftInput
();
// KeyboardUtils.showSoftInput(getActivity());
}
}
/**
/**
...
...
app/src/main/java/com/xingdata/zzdpos/view/SearchBar.java
View file @
b72ffe3f
...
@@ -16,6 +16,7 @@ import com.blankj.utilcode.util.StringUtils;
...
@@ -16,6 +16,7 @@ import com.blankj.utilcode.util.StringUtils;
import
com.blankj.utilcode.util.ToastUtils
;
import
com.blankj.utilcode.util.ToastUtils
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.R
;
import
com.xingdata.zzdpos.databinding.ViewSearchBarBinding
;
import
com.xingdata.zzdpos.databinding.ViewSearchBarBinding
;
import
com.xingdata.zzdpos.util.Global
;
@SuppressLint
(
"AppCompatCustomView"
)
@SuppressLint
(
"AppCompatCustomView"
)
public
class
SearchBar
extends
ConstraintLayout
{
public
class
SearchBar
extends
ConstraintLayout
{
...
@@ -60,7 +61,8 @@ public class SearchBar extends ConstraintLayout {
...
@@ -60,7 +61,8 @@ public class SearchBar extends ConstraintLayout {
* 显示软键盘
* 显示软键盘
*/
*/
public
void
showSoftInput
()
{
public
void
showSoftInput
()
{
KeyboardUtils
.
showSoftInput
(
mViewBinding
.
etSearch
);
Global
.
setFocus
(
mViewBinding
.
etSearch
,
getContext
());
// KeyboardUtils.showSoftInput(mViewBinding.etSearch);
}
}
/**
/**
...
@@ -81,6 +83,7 @@ public class SearchBar extends ConstraintLayout {
...
@@ -81,6 +83,7 @@ public class SearchBar extends ConstraintLayout {
ToastUtils
.
showShort
(
"请输入搜索内容"
);
ToastUtils
.
showShort
(
"请输入搜索内容"
);
return
false
;
return
false
;
}
}
KeyboardUtils
.
hideSoftInput
(
mViewBinding
.
etSearch
);
KeyboardUtils
.
hideSoftInput
(
mViewBinding
.
etSearch
);
mOnSearchListener
.
onSearch
(
str
);
mOnSearchListener
.
onSearch
(
str
);
}
}
...
...
app/src/main/res/layout/fragment_send_ticker_vip.xml
View file @
b72ffe3f
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<data>
<data>
<import
type=
"android.view.View"
/>
<import
type=
"android.view.View"
/>
<variable
<variable
name=
"empty"
name=
"empty"
type=
"boolean"
/>
type=
"boolean"
/>
<variable
<variable
name=
"OnClickListener"
name=
"OnClickListener"
type=
"com.xingdata.zzdpos.util.OnClickListener"
/>
type=
"com.xingdata.zzdpos.util.OnClickListener"
/>
<variable
<variable
name=
"titleMode"
name=
"titleMode"
type=
"int"
/>
type=
"int"
/>
</data>
</data>
<LinearLayout
<LinearLayout
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:layout_height=
"@dimen/all_line_width"
android:layout_gravity=
"bottom"
android:layout_gravity=
"bottom"
android:background=
"@color/gray_huanggai"
/>
android:background=
"@color/gray_huanggai"
/>
<android.support.constraint.ConstraintLayout
<android.support.constraint.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -38,15 +38,15 @@
...
@@ -38,15 +38,15 @@
<ImageButton
<ImageButton
android:id=
"@+id/btn_back"
android:id=
"@+id/btn_back"
android:layout_width=
"
wrap_conten
t"
android:layout_width=
"
@dimen/title_heigh
t"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"?attr/selectableItemBackground"
android:background=
"?attr/selectableItemBackground"
android:contentDescription=
"@string/all_go_back"
android:contentDescription=
"@string/all_go_back"
android:gravity=
"center"
android:gravity=
"center"
android:onClick=
"@{OnClickListener}"
android:onClick=
"@{OnClickListener}"
android:padding=
"@dimen/all_
padding
"
android:padding=
"@dimen/all_
margin
"
android:src=
"@mipmap/back_black"
android:src=
"@mipmap/back_black"
app:layout_constraintLeft_toLeftOf=
"parent"
/>
app:layout_constraintLeft_toLeftOf=
"parent"
/>
<LinearLayout
<LinearLayout
android:layout_width=
"0dp"
android:layout_width=
"0dp"
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
android:maxLength=
"11"
android:maxLength=
"11"
android:textColor=
"@color/black_likui"
android:textColor=
"@color/black_likui"
android:textColorHint=
"@color/gray_huanggai"
android:textColorHint=
"@color/gray_huanggai"
android:textSize=
"@dimen/all_text_size_low"
/>
android:textSize=
"@dimen/all_text_size_low"
/>
</LinearLayout>
</LinearLayout>
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
android:layout_height=
"@dimen/all_line_width"
android:layout_height=
"@dimen/all_line_width"
android:layout_gravity=
"bottom"
android:layout_gravity=
"bottom"
android:background=
"@color/gray_huanggai"
android:background=
"@color/gray_huanggai"
app:layout_constraintBottom_toBottomOf=
"parent"
/>
app:layout_constraintBottom_toBottomOf=
"parent"
/>
</android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>
<View
<View
...
@@ -85,18 +85,18 @@
...
@@ -85,18 +85,18 @@
android:layout_height=
"@dimen/all_line_width"
android:layout_height=
"@dimen/all_line_width"
android:layout_marginBottom=
"@dimen/all_margin"
android:layout_marginBottom=
"@dimen/all_margin"
android:background=
"@color/gray_huanggai"
android:background=
"@color/gray_huanggai"
android:visibility=
"@{empty?View.GONE:View.VISIBLE}"
/>
android:visibility=
"@{empty?View.GONE:View.VISIBLE}"
/>
<View
<View
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_line_width"
android:layout_height=
"@dimen/all_line_width"
android:background=
"@color/gray_huanggai"
/>
android:background=
"@color/gray_huanggai"
/>
<android.support.v7.widget.RecyclerView
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rl_vip"
android:id=
"@+id/rl_vip"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
android:layout_height=
"match_parent"
/>
</LinearLayout>
</LinearLayout>
</layout>
</layout>
\ No newline at end of file
app/src/main/res/layout/view_search_bar.xml
View file @
b72ffe3f
...
@@ -36,6 +36,7 @@
...
@@ -36,6 +36,7 @@
android:background=
"?attr/actionBarItemBackground"
android:background=
"?attr/actionBarItemBackground"
android:contentDescription=
"@string/search_clear"
android:contentDescription=
"@string/search_clear"
android:padding=
"@dimen/all_spacing"
android:padding=
"@dimen/all_spacing"
android:src=
"@mipmap/ic_clear"
android:src=
"@mipmap/ic_clear"
android:visibility=
"@{keywordLength>0?View.VISIBLE:View.GONE}"
android:visibility=
"@{keywordLength>0?View.VISIBLE:View.GONE}"
app:layout_constraintBottom_toTopOf=
"parent"
app:layout_constraintBottom_toTopOf=
"parent"
...
...
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