Silicon Valley Mall version 2 4-discovery module, Silicon Valley Mall version 2 4 --
1. Use TabLayout to switch titles;
At the google conference in 2015, google released a new Android Support Design library, which contains several new controls, one of which is TabLayout, which can achieve the TabPageIndicator effect, it is also official. The best thing is that it can be compatible with version 2.2 or later, including version 2.2. I used android studio for development. Therefore, it is very easy to reference TabLayout. You only need to add compile 'com. android. support: design: 22.2.0 'to build. gradle.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical">
<android.support.design.widget.TabLayout
android:id="@+id/tab_FindFragment_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/titleBlue"
app:tabIndicatorColor="@color/white"
app:tabSelectedTextColor="@color/gray"
app:tabTextColor="@color/white"
/>
<android.support.v4.view.ViewPager
android:id="@+id/vp_FindFragment_pager"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1"
/>
</LinearLayout>
app: tabIndicatorColor = "@ color / white" // Underline color for scrolling down
app: tabSelectedTextColor = "@ color / gray" // After the tab is selected, the color of the text
app: tabTextColor = "@ color / white" // default text color for tab
2. New posts and posts are all ListView
3. Use OpenDanmaku to implement the bullet screen function