Closed NemoChen317 closed 2 years ago
What is the effect of clicking on more items?
can you see image url?
show small pop window to show other hide item when click more item
here is the image link https://imgur.com/VmdgbYd
What is the effect of clicking these items?
the more item text became click item's text and number
and the arrow still there
thanks for your answer
more item, you can use popWindow.
Do you have support at your library? Or do I have to make my own?
You can do it yourself.
ok thank you i will try it
Thanks for using this library.
sorry
I have a question this is Normal is also what I want of indicator https://imgur.com/a/gG4xEAv
But the last one is a little bit shifted https://imgur.com/FU9aIL8
I want my indicator center form TextView on bottom It would be better if it could be based on TextView width
can i solve it ? thank you
my code
<com.angcyo.tablayout.DslTabLayout
android:id="@+id/states_tab_layout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:minHeight="50dp"
android:background="@android:color/transparent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tab_layout"
app:tab_convex_background="@android:color/white"
app:tab_deselect_color="#80454545"
app:tab_indicator_color="@color/color_mommy_style"
app:tab_indicator_drawable="@color/color_mommy_style"
app:tab_select_color="@color/color_mommy_style"
app:tab_indicator_width="50dp"
tools:tab_default_index="0">
<com.mommyhappy.mhclient.view.service.component.ServiceStatesTab
android:id="@+id/not_service_tab"
android:layout_width="wrap_content"
android:layout_height="match_parent"
app:mommy_state_title="@string/service_count_tab_not_service"/>
<com.mommyhappy.mhclient.view.service.component.ServiceStatesTab
android:id="@+id/serviced_tab"
android:layout_width="wrap_content"
android:layout_height="match_parent"
app:mommy_state_title="@string/service_count_tab_serviced"/>
<com.mommyhappy.mhclient.view.service.component.ServiceStatesTab
android:id="@+id/service_total_tab"
android:layout_width="wrap_content"
android:layout_height="match_parent"
app:mommy_state_title="@string/service_count_tab_total"/>
<com.mommyhappy.mhclient.view.service.component.ServiceStatesTab
android:id="@+id/more_tab"
android:layout_width="wrap_content"
android:layout_height="match_parent"
app:mommy_state_title="@string/service_count_tab_total"
app:mommy_arrow_show="true"
app:mommy_count_show="true"/>
</com.angcyo.tablayout.DslTabLayout>
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingLeft="17dp"
android:orientation="horizontal">
<TextView
android:id="@+id/states_tv"
style="@style/ServiceCountTabStyle"
android:text="@string/service_count_tab_not_service" />
<TextView
android:id="@+id/count_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12dp"
android:textColor="@color/color_mommy_style"
android:alpha="0.5"
android:text="34"
android:layout_gravity="center"
android:layout_marginBottom="4dp"
android:layout_marginLeft="2dp"
tools:text="34"/>
<ImageView
android:id="@+id/arrow_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="gone"
android:src="@drawable/ic_arrow_down"/>
</LinearLayout>
</layout>
if you use app:tab_indicator_width="50dp"
way,
you need to fixed the width of count_tv
and set app:tab_indicator_x_offset
.
example:
<TextView
android:id="@+id/count_tv"
android:layout_width="10dp"
.../>
app:tab_indicator_x_offset="-10dp"
you can also use:
app:tab_indicator_width="WRAP_CONTENT"
app:tab_indicator_content_id="@id/states_tv"
Thanks for your answer
but i can't find
tab_indicator_content_index
i just find
app:tab_indicator_content_index
and i try
app:tab_indicator_content_index="@+id/states_tv"
the view show is. indicator width is tha same with states_tv + count_tv ' width but i hope is just states_tv ' width
ps. states_tv and count_tv width is. Wrap_content
implementation 'com.github.angcyo.DslTablayout:TabLayout:3.2.1'
<com.angcyo.tablayout.DslTabLayout
app:tab_indicator_content_id="@+id/states_tv"
app:tab_indicator_width="WRAP_CONTENT"
...>
Great, thank you very much for your reply! I'm trying to finish that UI feature Now popupWindow is almost done The only thing left is to click on the replacement Tab text feature
good luck!
complete https://youtu.be/MMPCUASWz-M
thank you for your help Very good library for use
Have Fun!
https://imgur.com/wMX3ih8
I want to implement more setting feature
so can I do this ?
thank you