update protype

This commit is contained in:
mwang 2019-02-12 13:23:07 +08:00
parent cab4703572
commit 0099c3ba3d
7 changed files with 314 additions and 131 deletions

View File

@ -172,11 +172,11 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener
// TitlePageIndicator titleIndicator; // TitlePageIndicator titleIndicator;
private List<Fragment> mFragments; private List<Fragment> mFragments;
ArrayList<View> mList; ArrayList<View> mList;
String[] mTitle; // String[] mTitle;
void initTuijianPagers() { void initTuijianPagers() {
if (mFragments == null || mFragments.size() == 0) { if (mFragments == null || mFragments.size() == 0) {
mTitle = new String[]{"精选", "榜单", "书单"}; // mTitle = new String[]{"精选", "榜单", "书单"};
mFragments = new ArrayList<>(); mFragments = new ArrayList<>();
mFragments.add(new Fragment_jingxuan_tuijian()); mFragments.add(new Fragment_jingxuan_tuijian());
mFragments.add(new Fragment_jingxuan_tuijian()); mFragments.add(new Fragment_jingxuan_tuijian());
@ -198,10 +198,10 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener
} }
//ViewPager与TabLayout绑定后这里获取到PageTitle就是Tab的Text //ViewPager与TabLayout绑定后这里获取到PageTitle就是Tab的Text
@Override // @Override
public CharSequence getPageTitle(int position) { // public CharSequence getPageTitle(int position) {
return mTitle[position]; // return mTitle[position];
} // }
}; };
mViewpagerTuijian.setAdapter(mAdapter); mViewpagerTuijian.setAdapter(mAdapter);

View File

@ -1,49 +1,18 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:orientation="vertical"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".BlankFragment">
<android.support.v4.widget.NestedScrollView android:padding="3dp"
android:id="@+id/n_scroll_view" >
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout <include layout="@layout/fragment_jingxuan_tuijian" />
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent" <android.support.design.widget.TextInputEditText
android:layout_height="wrap_content" android:layout_width="wrap_content"
android:text="哈" android:layout_height="1500dp" />
android:textColor="#0f0"
android:textSize="200sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="哈"
android:textColor="#0f0"
android:textSize="200sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="哈"
android:textColor="#0f0"
android:textSize="200sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="哈"
android:textColor="#0f0"
android:textSize="200sp" />
</LinearLayout> </LinearLayout>
</android.support.v4.widget.NestedScrollView>
</FrameLayout>

View File

@ -7,8 +7,6 @@
tools:context=".Fragment_jingxuan"> tools:context=".Fragment_jingxuan">
<android.support.v4.widget.NestedScrollView <android.support.v4.widget.NestedScrollView
android:id="@+id/n_scroll_view" android:id="@+id/n_scroll_view"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -25,8 +23,7 @@
> >
<com.youth.banner.Banner <com.youth.banner.Banner xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/banner" android:id="@+id/banner"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="150dp" /> android:layout_height="150dp" />
@ -35,45 +32,43 @@
<include layout="@layout/fragment_jingxuan_cates" /> <include layout="@layout/fragment_jingxuan_cates" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center" android:gravity="center"
android:orientation="vertical" android:orientation="vertical">
> <!-- 推荐 -->
<LinearLayout <LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="30dp" android:layout_height="30dp"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:layout_margin="6dp" android:layout_margin="6dp"
> android:orientation="horizontal">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="30dp" android:layout_height="30dp"
android:layout_gravity="left" android:layout_gravity="left"
android:text="重磅推荐"
android:layout_weight="1" android:layout_weight="1"
android:text="重磅推荐"
android:textColor="#212121" /> android:textColor="#212121" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="30dp" android:layout_height="30dp"
android:layout_gravity="right" android:layout_gravity="right"
android:layout_weight="1"
android:gravity="right" android:gravity="right"
android:text="更多>>" android:text="更多>>"
android:layout_weight="1"
android:textColor="#212121" /> android:textColor="#212121" />
</LinearLayout> </LinearLayout>
<com.deiniu.zhuike.utils.MyViewPager <com.deiniu.zhuike.utils.MyViewPager
android:id="@+id/viewpager_tuijian" android:id="@+id/viewpager_tuijian"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"></com.deiniu.zhuike.utils.MyViewPager>
</com.deiniu.zhuike.utils.MyViewPager>
<!-- <!--
<com.viewpagerindicator.TitlePageIndicator <com.viewpagerindicator.TitlePageIndicator
@ -81,34 +76,107 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" /> android:layout_width="fill_parent" />
--> -->
<!--火热新书 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_gravity="center_horizontal"
android:layout_margin="6dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_gravity="left"
android:layout_weight="1"
android:text="火热新书"
android:textColor="#212121" />
<TextView
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_gravity="right"
android:layout_weight="1"
android:gravity="right"
android:text="更多>>"
android:textColor="#212121" />
</LinearLayout> </LinearLayout>
<include layout="@layout/fragment_jingxuan_book_list"></include>
<TextView <!--热门连载 -->
<LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="30dp"
android:text=" " android:layout_gravity="center_horizontal"
android:textColor="#0f0" android:layout_margin="6dp"
android:textSize="200sp" /> android:orientation="horizontal">
<TextView <TextView
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="30dp"
android:text=" " android:layout_gravity="left"
android:textColor="#0f0" android:layout_weight="1"
android:textSize="200sp" /> android:text="热门连载"
android:textColor="#212121" />
<TextView <TextView
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_gravity="right"
android:layout_weight="1"
android:gravity="right"
android:text="更多>>"
android:textColor="#212121" />
</LinearLayout>
<include layout="@layout/fragment_jingxuan_book_list"></include>
<!--完本精选 -->
<LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="30dp"
android:text=" " android:layout_gravity="center_horizontal"
android:textColor="#0f0" android:layout_margin="6dp"
android:textSize="200sp" /> android:orientation="horizontal">
<TextView <TextView
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="30dp"
android:text=" " android:layout_gravity="left"
android:textColor="#0f0" android:layout_weight="1"
android:textSize="200sp" /> android:text="完本精选"
android:textColor="#212121" />
<TextView
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_gravity="right"
android:layout_weight="1"
android:gravity="right"
android:text="更多>>"
android:textColor="#212121" />
</LinearLayout>
<include layout="@layout/fragment_jingxuan_book_list"></include>
</LinearLayout>
<android.support.design.widget.TextInputEditText
android:layout_width="wrap_content"
android:layout_height="100dp" />
</LinearLayout> </LinearLayout>
</android.support.v4.widget.NestedScrollView> </android.support.v4.widget.NestedScrollView>
</LinearLayout> </LinearLayout>

View File

@ -0,0 +1,147 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="3dp"
>
<!-- list with desc -->
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="120dp"
android:gravity="center"
android:background="@drawable/item_selector"
android:clickable="true"
android:layout_weight="1">
<ImageView
android:layout_margin="10dp"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_weight="0"
android:gravity="left"
android:src="@drawable/googleg_standard_color_18" />
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:layout_weight="1">
<TextView
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_gravity="left"
android:text="射雕英雄传"
android:textColor="#212121" />
<TextView
android:layout_marginTop="5dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:textSize="10sp"
android:text="从北宋到南宋到金国到蒙古国,一端荡气回肠的英雄故事,颂扬了爱国主义武侠精神,赞扬了人们对美好爱情的追求。。。"
android:textColor="@color/common_google_signin_btn_text_light" />
<LinearLayout
android:layout_marginTop="5dp"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="金庸"
android:textColor="#212121" />
<TextView
android:layout_marginLeft="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="武侠小说"
android:textColor="@color/colorAccent" />
</LinearLayout>
</LinearLayout>.
</LinearLayout>.
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="120dp"
android:gravity="center"
android:background="@drawable/item_selector"
android:clickable="true"
android:layout_weight="1">
<ImageView
android:layout_margin="10dp"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_weight="0"
android:gravity="left"
android:src="@drawable/googleg_standard_color_18" />
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:layout_weight="1">
<TextView
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_gravity="left"
android:text="射雕英雄传"
android:textColor="#212121" />
<TextView
android:layout_marginTop="5dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:textSize="10sp"
android:text="从北宋到南宋到金国到蒙古国,一端荡气回肠的英雄故事,颂扬了爱国主义武侠精神,赞扬了人们对美好爱情的追求。。。"
android:textColor="@color/common_google_signin_btn_text_light" />
<LinearLayout
android:layout_marginTop="5dp"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="金庸"
android:textColor="#212121" />
<TextView
android:layout_marginLeft="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="武侠小说"
android:textColor="@color/colorAccent" />
</LinearLayout>
</LinearLayout>.
</LinearLayout>.
<!-- list view simple -->
<include layout="@layout/fragment_jingxuan_tuijian"/>
<include layout="@layout/fragment_jingxuan_tuijian"/>
</LinearLayout>

View File

@ -2,7 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:orientation="horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
> >

View File

@ -11,8 +11,9 @@ app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@drawable/common_full_open_on_phone"
> >
<FrameLayout <FrameLayout
android:id="@+id/realtabcontent" android:id="@+id/realtabcontent"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -20,9 +21,10 @@ app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:layout_weight="1"> android:layout_weight="1">
</FrameLayout> </FrameLayout>
<android.support.design.widget.TextInputEditText
android:layout_width="wrap_content"
android:layout_height="10dp" />
</LinearLayout> </LinearLayout>
@ -30,14 +32,12 @@ app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:id="@+id/navigation" android:id="@+id/navigation"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="0dp"
android:layout_marginEnd="0dp"
android:background="?android:attr/windowBackground"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:background="?android:attr/windowBackground"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
app:menu="@menu/navigation" /> app:menu="@menu/navigation" />
</android.support.constraint.ConstraintLayout> </android.support.constraint.ConstraintLayout>

View File

@ -166,7 +166,6 @@
<orderEntry type="library" name="Gradle: com.google.code.gson:gson:2.8.5@jar" level="project" /> <orderEntry type="library" name="Gradle: com.google.code.gson:gson:2.8.5@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:slidingpanelayout:28.0.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:slidingpanelayout:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:appcompat-v7:28.0.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:appcompat-v7:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.google.android:support-v4:r7@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:collections:28.0.0@jar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:collections:28.0.0@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-core-ui:28.0.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:support-core-ui:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:asynclayoutinflater:28.0.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:asynclayoutinflater:28.0.0@aar" level="project" />