在http://blog.csdn.net/yancychas/article/details/77254708这个的activity_main.xml基础上,设置小红点。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.administrator.materialtest.Main4Activity">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="45dp">
<TextView
android:id="@+id/text_fragment"
android:layout_gravity="center"
android:gravity="center"
android:text="TEXT"
android:textSize="20sp"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
<android.support.v4.view.ViewPager
android:id="@