update protype
This commit is contained in:
parent
ddac68ff82
commit
b8eeffda23
|
@ -0,0 +1,9 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Gradle: __local_aars__:D.\android\sdk\build-tools\28.0.3\renderscript\lib\renderscript-v8.jar:unspecified@jar">
|
||||
<CLASSES>
|
||||
<root url="jar://D:/android/sdk/build-tools/28.0.3/renderscript/lib/renderscript-v8.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,10 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Gradle: io.alterac.blurkit:blurkit:1.1.1@aar">
|
||||
<CLASSES>
|
||||
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/blurkit-1.1.1.aar/a6c3350140689432218998875abe677f/res" />
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/blurkit-1.1.1.aar/a6c3350140689432218998875abe677f/jars/classes.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
|
@ -7,7 +7,7 @@ android {
|
|||
|
||||
defaultConfig {
|
||||
applicationId "com.example.testapp"
|
||||
minSdkVersion 15
|
||||
minSdkVersion 21 //target 19 Android 4.4 以下版本仅占比4.1%
|
||||
targetSdkVersion 28
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
|
|
@ -91,6 +91,8 @@
|
|||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundle_manifest" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/check_manifest_result" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/compatible_screen_manifest" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/external_libs_dex" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-runtime-classes" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-verifier" />
|
||||
|
|
|
@ -6,7 +6,7 @@ android {
|
|||
buildToolsVersion "28.0.3"
|
||||
defaultConfig {
|
||||
applicationId "com.deiniu.zhuike"
|
||||
minSdkVersion 15
|
||||
minSdkVersion 21 //target 19 Android 4.4 以下版本仅占比4.1%
|
||||
targetSdkVersion 28
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
@ -18,6 +18,8 @@ android {
|
|||
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
|
||||
renderscriptTargetApi 24 //blurkit
|
||||
renderscriptSupportModeEnabled true //blurkit
|
||||
|
||||
}
|
||||
|
||||
|
@ -61,5 +63,5 @@ dependencies {
|
|||
// implementation 'com.viewpagerindicator:library:2.4.1'
|
||||
//implementation 'com.github.auv1107:tablayout-android:-SNAPSHOT'
|
||||
implementation 'com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar'
|
||||
//implementation 'io.alterac.blurkit:blurkit:1.1.0'
|
||||
implementation 'io.alterac.blurkit:blurkit:1.1.1'
|
||||
}
|
||||
|
|
|
@ -16,7 +16,10 @@
|
|||
android:usesCleartextTraffic="true">
|
||||
<activity
|
||||
android:name=".Main5Activity"
|
||||
android:label="@string/title_activity_main5"></activity>
|
||||
android:label="@string/title_activity_main5">
|
||||
|
||||
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".BookActivity"
|
||||
android:label="@string/title_activity_book"
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package com.deiniu.zhuike;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.design.widget.Snackbar;
|
||||
|
@ -7,20 +9,58 @@ import android.support.v7.app.AppCompatActivity;
|
|||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.View;
|
||||
|
||||
//import io.alterac.blurkit.BlurKit;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import io.alterac.blurkit.BlurKit;
|
||||
import io.alterac.blurkit.BlurLayout;
|
||||
|
||||
public class BookActivity extends AppCompatActivity {
|
||||
|
||||
// @BindView(R.id.blurLayout)
|
||||
// BlurLayout blurLayout;
|
||||
// private float movement = 150;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_book);
|
||||
ButterKnife.bind(this);
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
String title = getIntent().getStringExtra("BOOKNAME");
|
||||
this.setTitle(title);
|
||||
findViewById(R.id.head_img);
|
||||
//BlurKit.getInstance().fastBlur(findViewById(R.id.head_img),20, 0.3f);
|
||||
|
||||
/*
|
||||
blurLayout.animate().translationY(movement).setDuration(1500).setListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
super.onAnimationEnd(animation);
|
||||
movement = movement > 0 ? -150 : 150;
|
||||
blurLayout.animate().translationY(movement).setDuration(1500).setListener(this).start();
|
||||
}
|
||||
}).start();
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
// View v =findViewById(R.id.head_img);
|
||||
// v.measure(0,0);
|
||||
// BlurKit.getInstance().blur(v, 20);
|
||||
// BlurKit.getInstance().fastBlur(v,20, 0.3f);
|
||||
}
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
// blurLayout.startBlur();
|
||||
// blurLayout.lockView();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
// blurLayout.pauseBlur();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -265,27 +265,27 @@ public class Fragment_paihang extends BasicFragment {
|
|||
// final int height = llTabs.getLayoutParams().height;
|
||||
mNestedScrollView.setOnScrollChangeListener(new NestedScrollView.OnScrollChangeListener() {
|
||||
// 将透明度声明成局部变量用于判断
|
||||
int alpha = 0;
|
||||
int count = 0;
|
||||
float scale = 0;
|
||||
//int alpha = 0;
|
||||
// int count = 0;
|
||||
// float scale = 0;
|
||||
@Override
|
||||
public void onScrollChange(NestedScrollView v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) {
|
||||
|
||||
if (scrollY <= height) {
|
||||
scale = (float) scrollY / height;
|
||||
alpha = (int) (255 * scale);
|
||||
// scale = (float) scrollY / height;
|
||||
// alpha = (int) (255 * scale);
|
||||
tvHint.setVisibility(View.GONE);
|
||||
// 随着滑动距离改变透明度
|
||||
// Log.e("al=","="+alpha);
|
||||
// re.setBackgroundColor(Color.argb(alpha, 255, 0, 0));
|
||||
} else {
|
||||
tvHint.setVisibility(View.VISIBLE);
|
||||
if (alpha < 255) {
|
||||
// if (alpha < 255) {
|
||||
// Log.e("执行次数", "=" + (++count));
|
||||
// 防止频繁重复设置相同的值影响性能
|
||||
alpha = 255;
|
||||
// alpha = 255;
|
||||
// re.setBackgroundColor(Color.argb(alpha, 255, 0, 0));
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -53,8 +53,7 @@ public class Main2Activity extends AppCompatActivity
|
|||
Toolbar toolbar;
|
||||
@BindView(R.id.fab)
|
||||
FloatingActionButton fab ;
|
||||
@BindView(R.id.mTextMessage)
|
||||
TextView mTextMessage;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
|
@ -246,15 +245,15 @@ public class Main2Activity extends AppCompatActivity
|
|||
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case R.id.navigation_home:
|
||||
mTextMessage.setText(R.string.title_home);
|
||||
//mTextMessage.setText(R.string.title_home);
|
||||
showHome();
|
||||
return true;
|
||||
case R.id.navigation_dashboard:
|
||||
mTextMessage.setText(R.string.title_dashboard);
|
||||
// mTextMessage.setText(R.string.title_dashboard);
|
||||
showBookStore();
|
||||
return true;
|
||||
case R.id.navigation_notifications:
|
||||
mTextMessage.setText(R.string.title_notifications);
|
||||
// mTextMessage.setText(R.string.title_notifications);
|
||||
showPaihang();
|
||||
return true;
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package com.deiniu.zhuike;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.design.widget.BottomNavigationView;
|
||||
|
@ -7,38 +9,39 @@ import android.support.v7.app.AppCompatActivity;
|
|||
import android.view.MenuItem;
|
||||
import android.widget.TextView;
|
||||
|
||||
import io.alterac.blurkit.BlurLayout;
|
||||
|
||||
public class Main5Activity extends AppCompatActivity {
|
||||
|
||||
private TextView mTextMessage;
|
||||
|
||||
private BottomNavigationView.OnNavigationItemSelectedListener mOnNavigationItemSelectedListener
|
||||
= new BottomNavigationView.OnNavigationItemSelectedListener() {
|
||||
|
||||
@Override
|
||||
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case R.id.navigation_home:
|
||||
mTextMessage.setText(R.string.title_home);
|
||||
return true;
|
||||
case R.id.navigation_dashboard:
|
||||
mTextMessage.setText(R.string.title_dashboard);
|
||||
return true;
|
||||
case R.id.navigation_notifications:
|
||||
mTextMessage.setText(R.string.title_notifications);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
private BlurLayout blurLayout;
|
||||
private float movement = 150;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main5);
|
||||
blurLayout = (BlurLayout) findViewById(R.id.blurLayout);
|
||||
|
||||
mTextMessage = (TextView) findViewById(R.id.message);
|
||||
BottomNavigationView navigation = (BottomNavigationView) findViewById(R.id.navigation);
|
||||
navigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);
|
||||
blurLayout.animate().translationY(movement).setDuration(1500).setListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
super.onAnimationEnd(animation);
|
||||
movement = movement > 0 ? -150 : 150;
|
||||
blurLayout.animate().translationY(movement).setDuration(1500).setListener(this).start();
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
blurLayout.startBlur();
|
||||
blurLayout.lockView();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
blurLayout.pauseBlur();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,12 +4,15 @@ import android.app.Application;
|
|||
|
||||
import org.xutils.x;
|
||||
|
||||
import io.alterac.blurkit.BlurKit;
|
||||
|
||||
public class MyApp extends Application {
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
x.Ext.init(this);
|
||||
x.Ext.setDebug(false); //输出debug日志,开启会影响性能
|
||||
// BlurKit.init(this);
|
||||
}
|
||||
|
||||
public boolean exit() {
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:color="@color/grey"
|
||||
tools:targetApi="lollipop">
|
||||
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/colorAccent" />
|
||||
<corners android:radius="3dp" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
</ripple>
|
||||
<!--
|
||||
<item
|
||||
android:id="@android:id/mask"
|
||||
android:drawable="@color/colorAccent" />
|
||||
|
||||
|
||||
以此作为 backGround时,控件初始时使用 item 作为bg ; 按压时会有一个色值渐变效果,按住不松时会显示 ripple 和 item 中颜色的混合值;
|
||||
松手的瞬间会显示 ripple 中色值,然后再渐变为item中的色值-->
|
|
@ -1,19 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".Main5Activity">
|
||||
android:orientation="vertical"
|
||||
tools:context=".BookActivity"
|
||||
>
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
|
||||
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context=".BookActivity">
|
||||
android:layout_weight="1"
|
||||
>
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:id="@+id/app_bar"
|
||||
|
@ -31,6 +32,7 @@
|
|||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
||||
app:toolbarId="@+id/toolbar">
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/login_layout"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -40,11 +42,12 @@
|
|||
app:layout_collapseParallaxMultiplier="0.7">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/head_img"
|
||||
android:id="@+id/head_img2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@mipmap/side_bg" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
@ -86,7 +89,7 @@
|
|||
android:maxLines="2"
|
||||
android:text="吹牛逼的都是年轻人"
|
||||
android:textColor="@color/common_google_signin_btn_text_light"
|
||||
android:textSize="11sp" />
|
||||
android:textSize="12sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -123,29 +126,59 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:layout_collapseMode="pin"
|
||||
app:popupTheme="@style/ToolBarTheme.PopupOverlay" />
|
||||
app:popupTheme="@style/ToolBarTheme.PopupOverlay" >
|
||||
|
||||
<TextView android:id="@+id/mTextMessage"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right|center_vertical"
|
||||
android:layout_marginRight="10dp"
|
||||
android:text="书架" />
|
||||
|
||||
</android.support.v7.widget.Toolbar>
|
||||
|
||||
</android.support.design.widget.CollapsingToolbarLayout>
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<include layout="@layout/content_book" />
|
||||
|
||||
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
|
||||
<android.support.design.widget.BottomNavigationView
|
||||
android:id="@+id/navigation"
|
||||
android:layout_width="0dp"
|
||||
<include layout="@layout/content_book" />
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginEnd="0dp"
|
||||
android:background="?android:attr/windowBackground"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:menu="@menu/bookactivity_navi" />
|
||||
android:orientation="horizontal"
|
||||
android:layout_weight="0"
|
||||
android:layout_gravity="bottom"
|
||||
>
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
<Button
|
||||
android:text="加入书架"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:drawableTop="@drawable/ic_mood_black_24dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/item_selector"
|
||||
/>
|
||||
<Button
|
||||
android:text="立即阅读"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.8"
|
||||
android:background="@drawable/item_selector_red"
|
||||
/>
|
||||
<Button
|
||||
android:text="全本缓存"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:drawableTop="@drawable/ic_mood_black_24dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/item_selector"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
|
|
@ -1,33 +1,33 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/container"
|
||||
android:id="@+id/activity_main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".Main5Activity">
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/message"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginLeft="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginTop="@dimen/activity_vertical_margin"
|
||||
android:text="@string/title_home"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/side_bg" />
|
||||
|
||||
<android.support.design.widget.BottomNavigationView
|
||||
android:id="@+id/navigation"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginEnd="0dp"
|
||||
android:background="?android:attr/windowBackground"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:menu="@menu/navigation" />
|
||||
<io.alterac.blurkit.BlurLayout xmlns:blurkit="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/blurLayout"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="150dp"
|
||||
android:layout_centerInParent="true"
|
||||
blurkit:blk_cornerRadius="150dp"
|
||||
blurkit:blk_downscaleFactor="0.25">
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="BlurKit!"
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
</io.alterac.blurkit.BlurLayout>
|
||||
|
||||
</RelativeLayout>
|
|
@ -26,10 +26,22 @@
|
|||
android:background="?attr/colorPrimary"
|
||||
app:popupTheme="@style/ToolBarTheme.PopupOverlay" >
|
||||
|
||||
<TextView android:id="@+id/mTextMessage"
|
||||
<android.support.v7.widget.AppCompatSpinner
|
||||
android:id="@+id/sexSelect"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Clock" />
|
||||
android:minWidth="50dp"
|
||||
style="@style/common_spinner"
|
||||
app:theme="@style/common_spinner"
|
||||
android:popupTheme="@style/common_spinner"
|
||||
android:entries="@array/sex"
|
||||
android:layout_gravity="left|center_vertical"
|
||||
>
|
||||
|
||||
|
||||
</android.support.v7.widget.AppCompatSpinner>
|
||||
|
||||
|
||||
</android.support.v7.widget.Toolbar>
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
|
|
|
@ -1,13 +1,77 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<android.support.v4.widget.NestedScrollView
|
||||
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:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:context=".BookActivity"
|
||||
tools:showIn="@layout/activity_book">
|
||||
tools:showIn="@layout/activity_book"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginBottom="3dp"
|
||||
>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_weight="0"
|
||||
android:layout_gravity="bottom"
|
||||
>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"/>
|
||||
<Button
|
||||
android:text="推荐"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:drawableLeft="@drawable/ic_mood_black_24dp"
|
||||
android:layout_weight="0"
|
||||
android:background="@drawable/item_selector"
|
||||
android:paddingLeft="5dp"
|
||||
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:text="分享"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:drawableLeft="@drawable/ic_toys_black_24dp"
|
||||
android:layout_weight="0"
|
||||
android:background="@drawable/item_selector"
|
||||
android:paddingLeft="5dp"
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:text="报错"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:drawableLeft="@drawable/ic_sentiment_very_satisfied_black_24dp"
|
||||
android:layout_weight="0"
|
||||
android:background="@drawable/item_selector"
|
||||
android:paddingLeft="5dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -15,4 +79,63 @@
|
|||
android:layout_margin="@dimen/text_margin"
|
||||
android:text="@string/large_text" />
|
||||
|
||||
</android.support.v4.widget.NestedScrollView>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</android.support.v4.widget.NestedScrollView>
|
||||
<!--
|
||||
<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:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v4.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:context=".BookActivity"
|
||||
tools:showIn="@layout/activity_book"
|
||||
android:layout_weight="1"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/text_margin"
|
||||
android:text="@string/large_text" />
|
||||
|
||||
</android.support.v4.widget.NestedScrollView>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_weight="0"
|
||||
>
|
||||
<ImageButton
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_sentiment_very_satisfied_black_24dp"
|
||||
android:layout_weight="1"
|
||||
/>
|
||||
<ImageButton
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_toys_black_24dp"
|
||||
android:layout_weight="1"
|
||||
/>
|
||||
<ImageButton
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_mood_black_24dp"
|
||||
android:layout_weight="1"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
-->
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string-array name="sex">
|
||||
<item>男生</item>
|
||||
<item>女生</item>
|
||||
</string-array>
|
||||
|
||||
|
||||
</resources>
|
|
@ -113,4 +113,5 @@
|
|||
<string name="title_on_shelf">加入书架</string>
|
||||
<string name="title_read">立即阅读</string>
|
||||
<string name="title_download">下载序列</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -42,4 +42,36 @@
|
|||
<item name="android:background">@color/black_overlay</item>
|
||||
</style>
|
||||
|
||||
<!-- spinner-->
|
||||
|
||||
<style name="common_spinner">
|
||||
<!--设置弹窗背景为 系统设置的 应用主色调 在application 的colorPrimay 中配置的颜色, actionBar toolbar 默认使用这个为背景颜色-->
|
||||
<item name="android:popupBackground">?attr/colorPrimary</item>
|
||||
<item name="android:layout_gravity">center</item>
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">match_parent</item>
|
||||
<!--设置 spinner 显示位置往下偏移 actionBarSize 的高度, 默认显示是直接显示在 Spinner 的选中项的上方
|
||||
<item name="android:dropDownVerticalOffset">?attr/actionBarSize</item>-->
|
||||
<item name="android:dropDownVerticalOffset">30dp</item>
|
||||
<!--设置选中之后Item 的背景变换 设置背景为 灰色背景色-->
|
||||
<item name="android:dropDownSelector">@color/lightgray</item>
|
||||
<!--设置下拉框的 list 的样式, 主要是设置 分割线, 当然也可以设置下拉的 list 的背景颜色-->
|
||||
<item name="android:dropDownListViewStyle">@style/spinnerListStyle</item>
|
||||
<!--设置显示在 popup 中 item(TextView) 的样式-->
|
||||
<item name="android:dropDownItemStyle">@style/itemSpinnerStyle</item>
|
||||
</style>
|
||||
|
||||
<!--设置分割线-->
|
||||
<style name="spinnerListStyle" parent="@android:style/Widget.ListView.DropDown">
|
||||
<item name="android:divider">#fff</item>
|
||||
<item name="android:dividerHeight">1dp</item>
|
||||
</style>
|
||||
|
||||
<!--设置文本颜色 和大小-->
|
||||
<style name="itemSpinnerStyle" parent="@android:style/Widget.TextView.SpinnerItem">
|
||||
<item name="android:textColor">@color/white</item>
|
||||
<item name="android:textSize">16sp</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -152,6 +152,8 @@
|
|||
<orderEntry type="library" scope="TEST" name="Gradle: com.android.support.test:monitor:1.0.2@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.github.bumptech.glide:disklrucache:4.6.1@jar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support:support-annotations:28.0.0@jar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: __local_aars__:D.\android\sdk\build-tools\28.0.3\renderscript\lib\renderscript-v8.jar:unspecified@jar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: io.alterac.blurkit:blurkit:1.1.1@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support:interpolator:28.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support:transition:28.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: android.arch.lifecycle:livedata:1.1.1@aar" level="project" />
|
||||
|
|
Loading…
Reference in New Issue