replace page indicator style, add data manager interface, etc.

This commit is contained in:
wangcongtao
2020-02-11 21:52:38 +08:00
parent 4f8b4bb714
commit 19156517ac
38 changed files with 1090 additions and 614 deletions

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="false">
<shape android:shape="rectangle">
<!-- 填充的颜色 -->
<solid android:color="#4DFFFFFF" />
<!-- 设置矩形的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners android:radius="90px" />
</shape>
</item>
<item android:state_selected="true">
<shape android:shape="rectangle">
<!-- 填充的颜色 -->
<solid android:color="#FFFFFF" />
<!-- 设置矩形的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners android:radius="90px" />
</shape>
</item>
</selector>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" android:exitFadeDuration="@android:integer/config_shortAnimTime">
<item android:state_pressed="true" android:drawable="@android:color/transparent" />
<item android:state_focused="true" android:drawable="@android:color/transparent"/>
<item android:drawable="@android:color/transparent"/>
</selector>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<!-- 填充的颜色 -->
<solid android:color="#409EEA" />
<!-- 设置矩形的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners android:radius="18dp" />
</shape>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<View
android:id="@+id/module_apps_id_indicator_dot"
android:layout_width="@dimen/module_apps_indicator_width"
android:background="@drawable/module_apps_pager_indicator"
android:layout_height="@dimen/module_apps_indicator_height" />
</LinearLayout>

View File

@@ -41,16 +41,13 @@
android:layout_marginTop="@dimen/module_apps_pager_marginTop"
android:overScrollMode="never" />
<com.mogo.module.apps.view.LinePageIndicator
<com.mogo.module.apps.view.PagerSlidingTabStripV2
android:id="@+id/module_apps_id_indicator"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal"
android:layout_marginBottom="@dimen/module_apps_indicator_marginBottom"
app:lineWidth="@dimen/module_apps_indicator_width"
app:selectedColor="#ffffffff"
app:strokeWidth="@dimen/module_apps_indicator_height"
app:unselectedColor="#33ffffff" />
app:pstsV2TabPaddingLeftRight="@dimen/module_apps_indicator_interval" />
<ProgressBar
android:id="@+id/module_apps_id_loading"

View File

@@ -9,6 +9,7 @@
<ImageView
android:id="@+id/module_apps_id_app_icon"
android:layout_width="@dimen/module_apps_navigation_icon_width"
android:scaleType="fitXY"
android:layout_height="@dimen/module_apps_navigation_icon_height" />
<TextView

View File

@@ -3,6 +3,7 @@
<dimen name="module_apps_pager_marginTop">117px</dimen>
<dimen name="module_apps_indicator_height">2.7px</dimen>
<dimen name="module_apps_indicator_width">16px</dimen>
<dimen name="module_apps_indicator_interval">2.3px</dimen>
<dimen name="module_apps_indicator_marginBottom">54.9px</dimen>
<dimen name="module_apps_navigation_icon_width">64px</dimen>
<dimen name="module_apps_navigation_icon_height">64px</dimen>

View File

@@ -3,6 +3,7 @@
<dimen name="module_apps_pager_marginTop">260px</dimen>
<dimen name="module_apps_indicator_height">5px</dimen>
<dimen name="module_apps_indicator_width">30px</dimen>
<dimen name="module_apps_indicator_interval">4px</dimen>
<dimen name="module_apps_indicator_marginBottom">103px</dimen>
<dimen name="module_apps_navigation_icon_width">120px</dimen>
<dimen name="module_apps_navigation_icon_height">120px</dimen>

View File

@@ -3,6 +3,7 @@
<dimen name="module_apps_pager_marginTop">260px</dimen>
<dimen name="module_apps_indicator_height">5px</dimen>
<dimen name="module_apps_indicator_width">30px</dimen>
<dimen name="module_apps_indicator_interval">2.3px</dimen>
<dimen name="module_apps_indicator_marginBottom">103px</dimen>
<dimen name="module_apps_navigation_icon_width">120px</dimen>
<dimen name="module_apps_navigation_icon_height">120px</dimen>

View File

@@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="LinePageIndicator">
<!-- Whether or not the indicators should be centered. -->
<attr name="centered" />
<!-- Color of the unselected lines that represent the pages. -->
<attr name="unselectedColor" />
<!-- Color of the selected line that represents the current page. -->
<attr name="selectedColor" />
<!-- Width of each indicator line. -->
<attr name="lineWidth" format="dimension" />
<!-- Width of each indicator line's stroke. -->
<attr name="strokeWidth" />
<!-- Width of the gap between each indicator line. -->
<attr name="gapWidth" format="dimension" />
<!-- View background -->
<attr name="android:background" />
</declare-styleable>
</resources>

View File

@@ -1,25 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="card_common_margin_left">@dimen/dp_15</dimen>
<dimen name="default_line_indicator_line_width">12dp</dimen>
<dimen name="default_line_indicator_gap_width">4dp</dimen>
<dimen name="default_line_indicator_stroke_width">1dp</dimen>
<color name="default_line_indicator_selected_color">#FF33B5E5</color>
<color name="default_line_indicator_unselected_color">#FFBBBBBB</color>
<bool name="default_line_indicator_centered">true</bool>
<declare-styleable name="ViewPagerIndicator">
<!-- Style of the circle indicator. -->
<attr name="vpiCirclePageIndicatorStyle" format="reference" />
<!-- Style of the icon indicator's views. -->
<attr name="vpiIconPageIndicatorStyle" format="reference" />
<!-- Style of the line indicator. -->
<attr name="vpiLinePageIndicatorStyle" format="reference" />
<!-- Style of the title indicator. -->
<attr name="vpiTitlePageIndicatorStyle" format="reference" />
<!-- Style of the tab indicator's tabs. -->
<attr name="vpiTabPageIndicatorStyle" format="reference" />
<!-- Style of the underline indicator. -->
<attr name="vpiUnderlinePageIndicatorStyle" format="reference" />
</declare-styleable>
</resources>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="PagerSlidingTabStripV2">
<attr name="pstsV2IndicatorColor" format="color" />
<attr name="pstsV2UnderlineColor" format="color" />
<attr name="pstsV2DividerColor" format="color" />
<attr name="pstsV2IndicatorHeight" format="dimension" />
<attr name="pstsV2UnderlineHeight" format="dimension" />
<attr name="pstsV2DividerPadding" format="dimension" />
<attr name="pstsV2TabPaddingLeftRight" format="dimension" />
<attr name="pstsV2ScrollOffset" format="dimension" />
<attr name="pstsV2TabBackground" format="reference" />
<attr name="pstsV2ShouldExpand" format="boolean" />
<attr name="pstsV2TextAllCaps" format="boolean" />
<attr name="pstsV2SelectedTabTextColor" format="color" />
<attr name="pstsV2TabTextColorValue" format="color" />
<attr name="pstsV2IndicatorMarginBottom" format="dimension" />
<attr name="pstsV2IndicatorMarginLeft" format="dimension" />
<attr name="pstsV2IndicatorMarginRight" format="dimension" />
<attr name="pstsV2IndicatorMode" format="enum">
<enum name="underline" value="-1" />
<enum name="shadow" value="1" />
<enum name="res" value="2" />
</attr>
<attr name="pstsV2IndicatorRes" format="reference" />
</declare-styleable>
</resources>