Silicon Valley Mall version 2 4-discovery module, Silicon Valley Mall version 2 4 --

Source: Internet
Author: User

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

 


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.