Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
杨凯
YDL-Component-Medical
Commits
487e0c3c
Commit
487e0c3c
authored
Jul 01, 2022
by
fengquan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 测评搜索页面UI调整
parent
988f163a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
84 additions
and
35 deletions
+84
-35
TrendTabEntity.java
m-tests/src/main/java/com/yidianling/tests/list/model/bean/TrendTabEntity.java
+38
-0
TestCategoryListActivity.kt
m-tests/src/main/java/com/yidianling/tests/list/view/TestCategoryListActivity.kt
+23
-24
TestSearchKeyActivity.kt
m-tests/src/main/java/com/yidianling/tests/search/TestSearchKeyActivity.kt
+1
-0
tests_activity_test_category_list.xml
m-tests/src/main/res/layout/tests_activity_test_category_list.xml
+13
-11
tests_activity_test_key_search.xml
m-tests/src/main/res/layout/tests_activity_test_key_search.xml
+9
-0
No files found.
m-tests/src/main/java/com/yidianling/tests/list/model/bean/TrendTabEntity.java
0 → 100644
View file @
487e0c3c
package
com
.
yidianling
.
tests
.
list
.
model
.
bean
;
import
com.flyco.tablayout.listener.CustomTabEntity
;
/**
* @author jiucheng
* @描述:
* @Copyright Copyright (c) 2018
* @Company 壹点灵
* @date 2018/7/27
*/
public
class
TrendTabEntity
implements
CustomTabEntity
{
public
String
title
;
public
int
selectedIcon
;
public
int
unSelectedIcon
;
public
TrendTabEntity
(
String
title
,
int
selectedIcon
,
int
unSelectedIcon
)
{
this
.
title
=
title
;
this
.
selectedIcon
=
selectedIcon
;
this
.
unSelectedIcon
=
unSelectedIcon
;
}
@Override
public
String
getTabTitle
()
{
return
title
;
}
@Override
public
int
getTabSelectedIcon
()
{
return
selectedIcon
;
}
@Override
public
int
getTabUnselectedIcon
()
{
return
unSelectedIcon
;
}
}
m-tests/src/main/java/com/yidianling/tests/list/view/TestCategoryListActivity.kt
View file @
487e0c3c
...
...
@@ -9,7 +9,9 @@ import android.widget.TextView
import
androidx.core.content.ContextCompat
import
androidx.viewpager.widget.ViewPager
import
com.alibaba.android.arouter.facade.annotation.Route
import
com.google.android.material.tabs.TabLayout
import
com.flyco.tablayout.CommonTabLayout
import
com.flyco.tablayout.listener.CustomTabEntity
import
com.flyco.tablayout.listener.OnTabSelectListener
import
com.ydl.ydlcommon.base.BaseMvpActivity
import
com.ydl.ydlcommon.bean.StatusBarOptions
import
com.ydl.ydlcommon.utils.BuryPointUtils
...
...
@@ -24,6 +26,7 @@ import com.yidianling.tests.home.utils.TestHomeUtils
import
com.yidianling.tests.list.model.bean.CategotyPopItem
import
com.yidianling.tests.list.model.bean.TestCategory
import
com.yidianling.tests.list.model.bean.TestsRedPacketBean
import
com.yidianling.tests.list.model.bean.TrendTabEntity
import
com.yidianling.tests.list.presenter.TestListActivityPresenter
import
com.yidianling.tests.list.view.adapter.CategoryConditionRecyclerViewAdapter
import
com.yidianling.tests.list.view.adapter.TestListPagerAdapter
...
...
@@ -43,6 +46,7 @@ class TestCategoryListActivity : BaseMvpActivity<TestListActivityView, TestListA
private
var
testCategory
:
MutableList
<
TestCategory
>
=
ArrayList
()
private
var
sortList
:
MutableList
<
CategotyPopItem
>
=
ArrayList
()
private
var
filterList
:
MutableList
<
CategotyPopItem
>
=
ArrayList
()
private
val
titleList
=
java
.
util
.
ArrayList
<
CustomTabEntity
>()
var
sortConditionDefaultKey
:
String
=
"1"
var
filterConditionDefaultKey
:
String
=
"1"
...
...
@@ -59,7 +63,7 @@ class TestCategoryListActivity : BaseMvpActivity<TestListActivityView, TestListA
val
SELECT_SORT
:
String
=
"SELECT_SORT"
val
SELECT_FILTER
:
String
=
"SELECT_FILTER"
private
var
testCategoryAdapter
:
TestListPagerAdapter
?
=
null
var
title
=
arrayOf
(
"全部"
,
"付费"
,
"免费"
)
companion
object
{
private
const
val
EXTRA_IS_MINE
=
"is_mine"
...
...
@@ -119,23 +123,24 @@ class TestCategoryListActivity : BaseMvpActivity<TestListActivityView, TestListA
showSortPopupWindow
()
}
for
(
i
in
title
)
{
val
tab
=
tab_tabLayout
.
newTab
().
setText
(
i
)
tab_tabLayout
.
addTab
(
tab
)
}
titleList
.
add
(
TrendTabEntity
(
"全部"
,
0
,
0
));
titleList
.
add
(
TrendTabEntity
(
"付费"
,
0
,
0
));
titleList
.
add
(
TrendTabEntity
(
"免费"
,
0
,
0
));
tab_tabLayout
.
setTabData
(
titleList
)
tab_tabLayout
.
addOnTabSelectedListener
(
object
:
TabLayout
.
OnTabSelected
Listener
{
override
fun
onTabSelect
ed
(
tab
:
TabLayout
.
Tab
?
)
{
when
(
tab
?.
text
.
toString
()
)
{
"全部"
->
{
tab_tabLayout
.
setOnTabSelectListener
(
object
:
OnTabSelect
Listener
{
override
fun
onTabSelect
(
position
:
Int
)
{
when
(
position
)
{
0
->
{
selectFilterItem
=
filterList
[
0
]
}
"付费"
->
{
1
->
{
selectFilterItem
=
filterList
[
1
]
}
"免费"
->
{
2
->
{
selectFilterItem
=
filterList
[
2
]
}
}
...
...
@@ -143,14 +148,7 @@ class TestCategoryListActivity : BaseMvpActivity<TestListActivityView, TestListA
onDismiss
()
}
override
fun
onTabUnselected
(
tab
:
TabLayout
.
Tab
?)
{
}
override
fun
onTabReselected
(
tab
:
TabLayout
.
Tab
?)
{
}
override
fun
onTabReselect
(
position
:
Int
)
{}
})
mPresenter
.
fetchTestTypeList
()
...
...
@@ -183,6 +181,7 @@ class TestCategoryListActivity : BaseMvpActivity<TestListActivityView, TestListA
}
})
StatusBarUtils
.
statusBarLightMode
(
this
)
}
private
fun
initConditionView
()
{
...
...
@@ -333,18 +332,18 @@ class TestCategoryListActivity : BaseMvpActivity<TestListActivityView, TestListA
}
}
private
fun
updateTabLayoutStatus
(
tabLayout
:
TabLayout
,
text
:
String
)
{
private
fun
updateTabLayoutStatus
(
tabLayout
:
Common
TabLayout
,
text
:
String
)
{
when
(
text
)
{
"全部"
->
{
tabLayout
.
getTabAt
(
0
)
?.
select
()
tabLayout
.
currentTab
=
0
}
"付费"
->
{
tabLayout
.
getTabAt
(
1
)
?.
select
()
tabLayout
.
currentTab
=
1
}
"免费"
->
{
tabLayout
.
getTabAt
(
2
)
?.
select
()
tabLayout
.
currentTab
=
2
}
}
}
...
...
m-tests/src/main/java/com/yidianling/tests/search/TestSearchKeyActivity.kt
View file @
487e0c3c
...
...
@@ -212,6 +212,7 @@ class TestSearchKeyActivity : BaseMvpActivity<TestSearchView, TestSearchPresente
override
fun
showNoResultView
()
{
llKeyEmpty
.
visibility
=
View
.
VISIBLE
iv_Key_empty
.
visibility
=
View
.
VISIBLE
tv_text_search_empty
.
visibility
=
View
.
VISIBLE
}
override
fun
hideNoResultView
()
{
...
...
m-tests/src/main/res/layout/tests_activity_test_category_list.xml
View file @
487e0c3c
...
...
@@ -81,25 +81,27 @@
android:background=
"@color/white"
android:orientation=
"horizontal"
>
<com.
google.android.material.tabs.
TabLayout
<com.
flyco.tablayout.Common
TabLayout
android:id=
"@+id/tab_tabLayout"
android:layout_width=
"0dp"
android:layout_height=
"44dp"
android:layout_weight=
"1"
app:tabIndicator=
"@drawable/tests_bg_indicator_search"
app:tabIndicatorColor=
"#2BB5F5"
app:tabIndicatorFullWidth=
"false"
app:tabSelectedTextColor=
"@color/platform_black"
app:tabTextColor=
"@color/platform_color_999999"
app:tabTextAppearance=
"@style/tests_MyTabLayout"
app:tabPaddingTop=
"@dimen/platform_dp_5"
/>
android:layout_height=
"44dp"
android:layout_centerInParent=
"true"
app:tl_indicator_anim_enable=
"true"
app:tl_indicator_color=
"#2BB5F5"
app:tl_indicator_height=
"4dp"
app:tl_textBold=
"BOTH"
app:tl_indicator_corner_radius=
"@dimen/platform_dp_5"
app:tl_indicator_width=
"@dimen/platform_dp_20"
app:tl_textSelectColor=
"@color/platform_black"
app:tl_textUnselectColor=
"@color/platform_color_999999"
app:tl_textsize=
"@dimen/platform_sp_16"
/>
<com.ydl.ydlcommon.view.DrawableRightTextView
android:id=
"@+id/dr_sort"
style=
"@style/tests_FilterTextViewStyle"
android:layout_width=
"wrap_content"
android:layout_marginTop=
"@dimen/platform_dp_4"
android:layout_height=
"@dimen/platform_dp_40"
android:layout_height=
"44dp"
android:layout_marginLeft=
"@dimen/platform_dp_26"
android:drawableEnd=
"@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:drawableRight=
"@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
...
...
m-tests/src/main/res/layout/tests_activity_test_key_search.xml
View file @
487e0c3c
...
...
@@ -51,6 +51,7 @@
android:id=
"@+id/tv_search_key_empty"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:visibility=
"gone"
android:padding=
"15dp"
/>
...
...
@@ -99,6 +100,14 @@
android:src=
"@drawable/platform_ico_img_zixun_empty"
android:visibility=
"gone"
tools:visibility=
"visible"
/>
<TextView
android:id=
"@+id/tv_text_search_empty"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"没有搜到相关信息,换个关键词看看吧"
android:visibility=
"gone"
android:gravity=
"center"
/>
</LinearLayout>
</RelativeLayout>
...
...
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