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
d0d421ad
Commit
d0d421ad
authored
Jan 17, 2018
by
陈前
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UI
parent
47cc1a85
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
50 deletions
+63
-50
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/ms/MsMainFragment.java
...data/zzdpos/ui/statistics/fragment/ms/MsMainFragment.java
+56
-38
app/src/main/res/layout/fragment_replenishement_detail.xml
app/src/main/res/layout/fragment_replenishement_detail.xml
+1
-7
app/src/main/res/layout/item_inventory.xml
app/src/main/res/layout/item_inventory.xml
+5
-5
app/src/main/res/layout/item_replenishment_detail.xml
app/src/main/res/layout/item_replenishment_detail.xml
+1
-0
No files found.
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/ms/MsMainFragment.java
View file @
d0d421ad
...
...
@@ -23,7 +23,9 @@ import java.util.List;
import
io.reactivex.Observable
;
import
io.reactivex.ObservableEmitter
;
import
io.reactivex.ObservableOnSubscribe
;
import
io.reactivex.Observer
;
import
io.reactivex.android.schedulers.AndroidSchedulers
;
import
io.reactivex.disposables.Disposable
;
import
io.reactivex.functions.Consumer
;
import
io.reactivex.schedulers.Schedulers
;
...
...
@@ -84,46 +86,62 @@ public class MsMainFragment extends BaseFragment<MainPresenter, FragmentMsMainBi
public
void
subscribe
(
ObservableEmitter
<
View
>
e
)
throws
Exception
{
e
.
onNext
(
getLayoutInflater
().
inflate
(
R
.
layout
.
item_string
,
null
));
e
.
onNext
(
getLayoutInflater
().
inflate
(
R
.
layout
.
item_string
,
null
));
e
.
onComplete
();
}
}).
subscribeOn
(
Schedulers
.
newThread
()).
observeOn
(
AndroidSchedulers
.
mainThread
()).
subscribe
(
new
Consumer
<
View
>()
{
int
i
=
0
;
}).
subscribeOn
(
Schedulers
.
newThread
()).
observeOn
(
AndroidSchedulers
.
mainThread
()).
subscribe
(
new
Observer
<
View
>()
{
private
int
i
=
0
;
@Override
public
void
onSubscribe
(
Disposable
d
)
{
}
@Override
public
void
onNext
(
View
view
)
{
ItemStringBinding
itemMenuBottomBinding
=
DataBindingUtil
.
bind
(
view
);
if
(
i
==
0
)
{
itemMenuBottomBinding
.
itemTv
.
setTypeface
(
Typeface
.
defaultFromStyle
(
Typeface
.
BOLD
));
}
itemMenuBottomBinding
.
itemTv
.
setText
(
titleInts
[
i
]);
itemMenuBottomBinding
.
itemTv
.
setPadding
(
0
,
0
,
0
,
0
);
mViewBinding
.
tabLayout
.
getTabAt
(
i
).
setCustomView
(
view
);
i
++;
}
@Override
public
void
onError
(
Throwable
e
)
{
}
@Override
public
void
onComplete
()
{
mViewBinding
.
tabLayout
.
addOnTabSelectedListener
(
new
TabLayout
.
OnTabSelectedListener
()
{
@Override
public
void
onTabSelected
(
TabLayout
.
Tab
tab
)
{
TextView
textView
=
(
TextView
)
tab
.
getCustomView
().
findViewById
(
R
.
id
.
item_tv
);
textView
.
setTypeface
(
Typeface
.
defaultFromStyle
(
Typeface
.
BOLD
));
textView
.
setText
(
tab
.
getText
());
}
@Override
public
void
onTabUnselected
(
TabLayout
.
Tab
tab
)
{
TextView
textView
=
(
TextView
)
tab
.
getCustomView
().
findViewById
(
R
.
id
.
item_tv
);
textView
.
setTypeface
(
Typeface
.
defaultFromStyle
(
Typeface
.
NORMAL
));
textView
.
setText
(
tab
.
getText
());
}
@Override
public
void
onTabReselected
(
TabLayout
.
Tab
tab
)
{
}
});
}
});
@Override
public
void
accept
(
View
view
)
throws
Exception
{
ItemStringBinding
itemMenuBottomBinding
=
DataBindingUtil
.
bind
(
view
);
if
(
i
==
0
)
{
itemMenuBottomBinding
.
itemTv
.
setTypeface
(
Typeface
.
defaultFromStyle
(
Typeface
.
BOLD
));
}
itemMenuBottomBinding
.
itemTv
.
setText
(
titleInts
[
i
]);
itemMenuBottomBinding
.
itemTv
.
setPadding
(
0
,
0
,
0
,
0
);
mViewBinding
.
tabLayout
.
getTabAt
(
i
).
setCustomView
(
view
);
i
++;
}
});
mViewBinding
.
tabLayout
.
addOnTabSelectedListener
(
new
TabLayout
.
OnTabSelectedListener
()
{
@Override
public
void
onTabSelected
(
TabLayout
.
Tab
tab
)
{
TextView
textView
=
(
TextView
)
tab
.
getCustomView
().
findViewById
(
R
.
id
.
item_tv
);
textView
.
setTypeface
(
Typeface
.
defaultFromStyle
(
Typeface
.
BOLD
));
textView
.
setText
(
tab
.
getText
());
}
@Override
public
void
onTabUnselected
(
TabLayout
.
Tab
tab
)
{
TextView
textView
=
(
TextView
)
tab
.
getCustomView
().
findViewById
(
R
.
id
.
item_tv
);
textView
.
setTypeface
(
Typeface
.
defaultFromStyle
(
Typeface
.
NORMAL
));
textView
.
setText
(
tab
.
getText
());
}
@Override
public
void
onTabReselected
(
TabLayout
.
Tab
tab
)
{
}
});
}
...
...
app/src/main/res/layout/fragment_replenishement_detail.xml
View file @
d0d421ad
...
...
@@ -108,12 +108,7 @@
app:layout_constraintEnd_toEndOf=
"@id/tv_supplier_title"
app:layout_constraintTop_toTopOf=
"@id/tv_supplier_title"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/all_slight_line_width"
android:background=
"@color/gray_kongming"
android:visibility=
"@{isShowSupplier? View.VISIBLE: View.GONE}"
app:layout_constraintTop_toTopOf=
"@id/tv_supplier_title"
/>
<View
android:id=
"@+id/view_line_left_1"
...
...
@@ -522,7 +517,6 @@
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/view_line_L050"
android:layout_above=
"@id/ed_title"
android:layout_marginTop=
"@dimen/all_bounced_padding"
android:background=
"@color/gray_huanggai"
/>
<View
...
...
app/src/main/res/layout/item_inventory.xml
View file @
d0d421ad
...
...
@@ -61,7 +61,7 @@
android:id=
"@+id/tv_unit"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@
drawable/singleline_white_gray
"
android:background=
"@
color/white_caocao
"
android:paddingTop=
"@dimen/all_padding"
android:paddingEnd=
"@dimen/all_padding"
android:paddingBottom=
"@dimen/all_padding"
...
...
@@ -76,7 +76,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:padding=
"@dimen/all_padding"
android:background=
"@
drawable/singleline_white_gray
"
android:background=
"@
color/white_caocao
"
android:textColor=
"@color/black_baozheng"
android:textSize=
"@dimen/all_text_size_low"
android:textStyle=
"bold"
...
...
@@ -87,7 +87,7 @@
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:background=
"@
drawable/singleline_white_gray
"
android:background=
"@
color/white_caocao
"
android:padding=
"@dimen/all_padding"
android:text=
"盘点件数:"
android:textColor=
"@color/black"
...
...
@@ -100,7 +100,7 @@
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:background=
"@
drawable/singleline_white_gray
"
android:background=
"@
color/white_caocao
"
android:padding=
"@dimen/all_padding"
android:text=
"盘点结果:"
android:textColor=
"@color/black"
...
...
@@ -114,7 +114,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"@dimen/all_padding"
android:background=
"@
drawable/singleline_white_gray
"
android:background=
"@
color/white_caocao
"
android:padding=
"@dimen/all_padding"
android:paddingEnd=
"@dimen/all_margin"
android:text=
"不相符"
...
...
app/src/main/res/layout/item_replenishment_detail.xml
View file @
d0d421ad
...
...
@@ -205,6 +205,7 @@
android:layout_marginTop=
"@dimen/all_padding"
android:text=
"进价:"
android:textStyle=
"bold"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"@id/tv_stock_hint"
app:layout_constraintTop_toBottomOf=
"@id/tv_stock_hint"
/>
...
...
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