update protype
|
@ -0,0 +1,46 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="WizardSettings">
|
||||
<option name="children">
|
||||
<map>
|
||||
<entry key="vectorWizard">
|
||||
<value>
|
||||
<PersistentState>
|
||||
<option name="children">
|
||||
<map>
|
||||
<entry key="vectorAssetStep">
|
||||
<value>
|
||||
<PersistentState>
|
||||
<option name="children">
|
||||
<map>
|
||||
<entry key="clipartAsset">
|
||||
<value>
|
||||
<PersistentState>
|
||||
<option name="values">
|
||||
<map>
|
||||
<entry key="url" value="jar:file:/D:/Program%20Files/Android/Android%20Studio/plugins/android/lib/android.jar!/images/material_design_icons/social/ic_sentiment_very_satisfied_black_24dp.xml" />
|
||||
</map>
|
||||
</option>
|
||||
</PersistentState>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
<option name="values">
|
||||
<map>
|
||||
<entry key="outputName" value="ic_sentiment_very_satisfied_black_24dp" />
|
||||
<entry key="sourceFile" value="C:\Users\wm" />
|
||||
</map>
|
||||
</option>
|
||||
</PersistentState>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</PersistentState>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,12 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Gradle: com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/FlycoTabLayout_Lib-2.1.2.aar/9f08428744401d36e7ef1139ec1cf3b2/jars/classes.jar!/" />
|
||||
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/FlycoTabLayout_Lib-2.1.2.aar/9f08428744401d36e7ef1139ec1cf3b2/res" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.flyco.tablayout/FlycoTabLayout_Lib/2.1.2/431eceecfe6b4044d8e075971d9f25018f12e876/FlycoTabLayout_Lib-2.1.2-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -0,0 +1,10 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Gradle: io.alterac.blurkit:blurkit:1.1.0@aar">
|
||||
<CLASSES>
|
||||
<root url="file://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/blurkit-1.1.0.aar/67aa01bcba6e0faca8be68b6e697d2c5/res" />
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/transforms-1/files-1.1/blurkit-1.1.0.aar/67aa01bcba6e0faca8be68b6e697d2c5/jars/classes.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
|
@ -8,7 +8,7 @@
|
|||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="true">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
|
||||
|
|
|
@ -28,12 +28,15 @@ allprojects {
|
|||
jcenter()
|
||||
google()
|
||||
maven {
|
||||
url "https://raw.githubusercontent.com/umeng/mvn-repo-umeng/master/repository" }
|
||||
url "https://raw.githubusercontent.com/umeng/mvn-repo-umeng/master/repository"
|
||||
}
|
||||
// maven { url 'https://jitpack.io' }
|
||||
|
||||
// maven {
|
||||
// name 'Sonatype SNAPSHOTs'
|
||||
// url 'https://oss.sonatype.org/content/repositories/snapshots/'
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
task clean(type: Delete) {
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
//include ':listviewlibrary', ':PushSDK', ':i7lvsvrs', ':zhuike', ':qy', ':app'
|
||||
include ':zhuike'
|
||||
include ':zhuike', ':testapp'
|
|
@ -0,0 +1 @@
|
|||
/build
|
|
@ -0,0 +1,42 @@
|
|||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
|
||||
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.example.testapp"
|
||||
minSdkVersion 15
|
||||
targetSdkVersion 28
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
|
||||
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
implementation 'com.android.support:appcompat-v7:28.0.0'
|
||||
implementation 'com.android.support:design:28.0.0'
|
||||
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
|
||||
implementation 'com.android.support:support-vector-drawable:28.0.0'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'com.android.support.test:runner:1.0.2'
|
||||
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
|
@ -0,0 +1,26 @@
|
|||
package com.example.testapp;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.test.InstrumentationRegistry;
|
||||
import android.support.test.runner.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ExampleInstrumentedTest {
|
||||
@Test
|
||||
public void useAppContext() {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getTargetContext();
|
||||
|
||||
assertEquals("com.example.testapp", appContext.getPackageName());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.testapp">
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity
|
||||
android:name=".Main2Activity"
|
||||
android:label="@string/title_activity_main2"></activity>
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/app_name">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
|
@ -0,0 +1,44 @@
|
|||
package com.example.testapp;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.design.widget.BottomNavigationView;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.MenuItem;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class Main2Activity 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;
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main2);
|
||||
|
||||
mTextMessage = (TextView) findViewById(R.id.message);
|
||||
BottomNavigationView navigation = (BottomNavigationView) findViewById(R.id.navigation);
|
||||
navigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package com.example.testapp;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.design.widget.BottomNavigationView;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.MenuItem;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class MainActivity 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;
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
|
||||
mTextMessage = (TextView) findViewById(R.id.message);
|
||||
BottomNavigationView navigation = (BottomNavigationView) findViewById(R.id.navigation);
|
||||
navigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="78.5885"
|
||||
android:endY="90.9159"
|
||||
android:startX="48.7653"
|
||||
android:startY="61.0927"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000" />
|
||||
</vector>
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M3,13h8L11,3L3,3v10zM3,21h8v-6L3,15v6zM13,21h8L21,11h-8v10zM13,3v6h8L21,3h-8z" />
|
||||
</vector>
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M10,20v-6h4v6h5v-8h3L12,3 2,12h3v8z" />
|
||||
</vector>
|
|
@ -0,0 +1,170 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillColor="#008577"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9,0L9,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,0L19,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,0L29,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,0L39,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,0L49,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,0L59,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,0L69,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,0L79,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M89,0L89,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M99,0L99,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,9L108,9"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,19L108,19"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,29L108,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,39L108,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,49L108,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,59L108,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,69L108,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,79L108,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,89L108,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,99L108,99"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,29L89,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,39L89,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,49L89,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,59L89,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,69L89,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,79L89,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,19L29,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,19L39,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,19L49,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,19L59,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,19L69,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,19L79,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
</vector>
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M12,22c1.1,0 2,-0.9 2,-2h-4c0,1.1 0.89,2 2,2zM18,16v-5c0,-3.07 -1.64,-5.64 -4.5,-6.32L13.5,4c0,-0.83 -0.67,-1.5 -1.5,-1.5s-1.5,0.67 -1.5,1.5v0.68C7.63,5.36 6,7.92 6,11v5l-2,2v1h16v-1l-2,-2z" />
|
||||
</vector>
|
|
@ -0,0 +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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<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" />
|
||||
|
||||
<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" />
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
|
@ -0,0 +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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".Main2Activity">
|
||||
|
||||
<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" />
|
||||
|
||||
<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" />
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item
|
||||
android:id="@+id/navigation_home"
|
||||
android:icon="@drawable/ic_home_black_24dp"
|
||||
android:title="@string/title_home" />
|
||||
|
||||
<item
|
||||
android:id="@+id/navigation_dashboard"
|
||||
android:icon="@drawable/ic_dashboard_black_24dp"
|
||||
android:title="@string/title_dashboard" />
|
||||
|
||||
<item
|
||||
android:id="@+id/navigation_notifications"
|
||||
android:icon="@drawable/ic_notifications_black_24dp"
|
||||
android:title="@string/title_notifications" />
|
||||
|
||||
</menu>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 4.8 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 6.7 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 8.9 KiB |
After Width: | Height: | Size: 15 KiB |
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#008577</color>
|
||||
<color name="colorPrimaryDark">#00574B</color>
|
||||
<color name="colorAccent">#D81B60</color>
|
||||
</resources>
|
|
@ -0,0 +1,5 @@
|
|||
<resources>
|
||||
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
</resources>
|
|
@ -0,0 +1,7 @@
|
|||
<resources>
|
||||
<string name="app_name">testApp</string>
|
||||
<string name="title_home">Home</string>
|
||||
<string name="title_dashboard">Dashboard</string>
|
||||
<string name="title_notifications">Notifications</string>
|
||||
<string name="title_activity_main2">Main2Activity</string>
|
||||
</resources>
|
|
@ -0,0 +1,11 @@
|
|||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
|
@ -0,0 +1,17 @@
|
|||
package com.example.testapp;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
public class ExampleUnitTest {
|
||||
@Test
|
||||
public void addition_isCorrect() {
|
||||
assertEquals(4, 2 + 2);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,176 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module external.linked.project.id=":testapp" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="android-gradle" name="Android-Gradle">
|
||||
<configuration>
|
||||
<option name="GRADLE_PROJECT_PATH" value=":testapp" />
|
||||
</configuration>
|
||||
</facet>
|
||||
<facet type="android" name="Android">
|
||||
<configuration>
|
||||
<option name="SELECTED_BUILD_VARIANT" value="debug" />
|
||||
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
|
||||
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
|
||||
<afterSyncTasks>
|
||||
<task>generateDebugSources</task>
|
||||
</afterSyncTasks>
|
||||
<option name="ALLOW_USER_CONFIGURATION" value="false" />
|
||||
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
|
||||
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
|
||||
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />
|
||||
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7">
|
||||
<output url="file://$MODULE_DIR$/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/build/intermediates/javac/debugUnitTest/compileDebugUnitTestJavaWithJavac/classes" />
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/aidl_source_output_dir/debug/compileDebugAidl/out" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/renderscript_source_output_dir/debug/compileDebugRenderscript/out" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/aidl_source_output_dir/debugAndroidTest/compileDebugAndroidTestAidl/out" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/renderscript_source_output_dir/debugAndroidTest/compileDebugAndroidTestRenderscript/out" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/test/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/res" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/resources" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/assets" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/aidl" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/rs" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/shaders" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/generated/not_namespaced_r_class_sources" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/generated/source/r" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotation_processor_list" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/apk_list" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/build-info" />
|
||||
<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/incremental" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-runtime-classes" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-verifier" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-apk" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant_app_manifest" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant_run_app_info_output_file" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant_run_main_apk_resources" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant_run_merged_manifests" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant_run_split_apk_resources" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javac" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint_jar" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifest-checker" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged_assets" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged_manifests" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/metadata_feature_manifest" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/prebuild" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/processed_res" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/reload-dex" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/resources" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shader_assets" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/signing_config" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/split-apk" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Android API 28 Platform" jdkType="Android SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support:design:28.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support:support-fragment:28.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support:localbroadcastmanager:28.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support:documentfile:28.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support:animated-vector-drawable: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: android.arch.lifecycle:viewmodel:1.1.1@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support:appcompat-v7:28.0.0@aar" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: com.android.support.test.espresso:espresso-idling-resource:3.0.2@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support:loader:28.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: android.arch.core:runtime:1.1.1@aar" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: com.android.support.test:runner:1.0.2@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: android.arch.lifecycle:livedata-core:1.1.1@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support:collections:28.0.0@jar" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: com.squareup:javawriter:2.1.1@jar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support:cursoradapter:28.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: android.arch.lifecycle:runtime:1.1.1@aar" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: com.android.support.test.espresso:espresso-core:3.0.2@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support:support-compat: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:cardview-v7: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.constraint:constraint-layout:1.1.3@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support:print:28.0.0@aar" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: com.google.code.findbugs:jsr305:2.0.1@jar" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: javax.inject:javax.inject:1@jar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: android.arch.core:common:1.1.1@jar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support:versionedparcelable:28.0.0@aar" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: junit:junit:4.12@jar" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: org.hamcrest:hamcrest-core:1.3@jar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support:viewpager:28.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support:support-core-utils:28.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support:recyclerview-v7:28.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support:support-vector-drawable:28.0.0@aar" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: com.android.support.test:monitor:1.0.2@aar" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: org.hamcrest:hamcrest-library:1.3@jar" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: org.hamcrest:hamcrest-integration:1.3@jar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support:support-annotations:28.0.0@jar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: android.arch.lifecycle:common:1.1.1@jar" 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" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support:drawerlayout:28.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support:coordinatorlayout:28.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support:customview:28.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support:swiperefreshlayout:28.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support.constraint:constraint-layout-solver:1.1.3@jar" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: net.sf.kxml:kxml2:2.3.0@jar" level="project" />
|
||||
</component>
|
||||
</module>
|
|
@ -18,6 +18,7 @@ android {
|
|||
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
|
||||
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
|
@ -57,5 +58,8 @@ dependencies {
|
|||
api 'com.github.bumptech.glide:glide:4.6.1'
|
||||
api 'org.xutils:xutils:3.5.0'
|
||||
implementation 'com.google.code.gson:gson:2.8.5'
|
||||
// implementation 'com.viewpagerindicator:library:2.4.1'
|
||||
// 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'
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.deiniu.zhuike">
|
||||
|
||||
<!-- To access Google+ APIs: -->
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
|
@ -16,15 +15,17 @@
|
|||
android:theme="@style/ToolBarTheme"
|
||||
android:usesCleartextTraffic="true">
|
||||
<activity
|
||||
android:name=".Main4Activity"
|
||||
android:label="@string/title_activity_main4"
|
||||
android:theme="@style/ToolBarTheme.NoActionBar" />
|
||||
android:name=".Main5Activity"
|
||||
android:label="@string/title_activity_main5"></activity>
|
||||
<activity
|
||||
android:name=".Main3Activity"
|
||||
android:label="@string/title_activity_main3" />
|
||||
android:name=".BookActivity"
|
||||
android:label="@string/title_activity_book"
|
||||
android:parentActivityName=".Main2Activity"
|
||||
android:theme="@style/ToolBarTheme.NoActionBar" />
|
||||
<activity
|
||||
android:name=".Main2Activity"
|
||||
android:label="@string/app_name"
|
||||
android:launchMode="singleTask"
|
||||
android:theme="@style/ToolBarTheme.NoActionBar">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
@ -32,9 +33,6 @@
|
|||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/app_name" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
|
@ -2,18 +2,23 @@ package com.deiniu.zhuike;
|
|||
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.TabLayout;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.util.Log;
|
||||
import android.util.TypedValue;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -92,6 +97,7 @@ public abstract class BasicFragment extends Fragment {
|
|||
{
|
||||
void onItemClick(View view, int position);
|
||||
void onItemLongClick(View view , int position);
|
||||
void onLinearOutClick(View view,int bookId);
|
||||
}
|
||||
|
||||
class BookListAdapter extends RecyclerView.Adapter<BookListAdapter.MyViewHolder> {
|
||||
|
@ -214,6 +220,16 @@ public abstract class BasicFragment extends Fragment {
|
|||
}
|
||||
}
|
||||
}
|
||||
protected List<String> initData(List<String> mDatas,char x)
|
||||
{
|
||||
mDatas = new ArrayList<String>();
|
||||
for (int i = 'A'; i < x; i++)
|
||||
{
|
||||
mDatas.add("射雕" + (char) i);
|
||||
}
|
||||
return mDatas;
|
||||
}
|
||||
//-------------------------------------------------------------------------------------book list adapter end--------------------------------------------------
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -4,10 +4,18 @@ import android.content.Context;
|
|||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
package com.deiniu.zhuike;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.View;
|
||||
|
||||
//import io.alterac.blurkit.BlurKit;
|
||||
|
||||
public class BookActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_book);
|
||||
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);
|
||||
}
|
||||
}
|
|
@ -99,6 +99,11 @@ public class Fragment_Shelf extends BasicFragment {
|
|||
initDialog(position);
|
||||
// mAdapter.removeData(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLinearOutClick(View view, int bookId) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -4,10 +4,21 @@ import android.content.Context;
|
|||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -28,6 +39,8 @@ public class Fragment_bangdan extends BasicFragment {
|
|||
private String mParam1;
|
||||
private String mParam2;
|
||||
|
||||
|
||||
|
||||
private OnFragmentInteractionListener mListener;
|
||||
|
||||
public Fragment_bangdan() {
|
||||
|
@ -60,14 +73,58 @@ public class Fragment_bangdan extends BasicFragment {
|
|||
mParam1 = getArguments().getString(ARG_PARAM1);
|
||||
mParam2 = getArguments().getString(ARG_PARAM2);
|
||||
}
|
||||
initData();
|
||||
mAdapter = new MyListAdapter(activity ,mData,R.layout.recycle_list_item_bangdan,new OnItemClickLitener()
|
||||
{
|
||||
|
||||
@Override
|
||||
public void onItemClick(View view, int position)
|
||||
{
|
||||
Toast.makeText(activity, position + " click",
|
||||
Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemLongClick(View view, int position)
|
||||
{
|
||||
// initDialog(position);
|
||||
// mAdapter.removeData(position);
|
||||
}
|
||||
@Override
|
||||
public void onLinearOutClick(View view, int bookId) {
|
||||
Toast.makeText(activity, "book "+ bookId + " clicked",
|
||||
Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//------------------------列表绑定------------
|
||||
|
||||
private MyListAdapter mAdapter;
|
||||
private List<String> mData;
|
||||
@BindView(R.id.rvBangdan)
|
||||
RecyclerView rvBandan;
|
||||
private void initData() {
|
||||
|
||||
mData = initData(mData,'F');
|
||||
|
||||
}
|
||||
void initialBookList() {
|
||||
rvBandan.setLayoutManager(new LinearLayoutManager(activity));
|
||||
rvBandan.setAdapter(mAdapter);
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
Log.d(TAG,"Fragment_bangdan onCreateView");
|
||||
return inflater.inflate(R.layout.fragment_fragment_bangdan, container, false);
|
||||
|
||||
View v = inflater.inflate(R.layout.fragment_fragment_bangdan, container, false);
|
||||
ButterKnife.bind(this, v);
|
||||
initialBookList() ;
|
||||
return v;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -76,4 +133,192 @@ public class Fragment_bangdan extends BasicFragment {
|
|||
}
|
||||
|
||||
|
||||
class MyListAdapter extends RecyclerView.Adapter<MyListAdapter.MyViewHolder> {
|
||||
private final int EMPTY_VIEW = 1;
|
||||
private final int PROGRESS_VIEW = 2;
|
||||
private final int IMAGE_VIEW = 3;
|
||||
|
||||
private Context context;
|
||||
private List<String> mDatas = new ArrayList<String>();
|
||||
private OnItemClickLitener mOnItemClickLitener;
|
||||
private int listItemID;
|
||||
public MyListAdapter(Context context,List<String> mDatas,int listItemID,OnItemClickLitener clickLitener) {
|
||||
this.context = context;
|
||||
this.mDatas = mDatas;
|
||||
this.mOnItemClickLitener = clickLitener;
|
||||
this.listItemID = listItemID;
|
||||
}
|
||||
public MyListAdapter(Context context, OnItemClickLitener clickLitener) {
|
||||
this.context = context;
|
||||
this.mOnItemClickLitener = clickLitener;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
if(mDatas.size() == 0){
|
||||
return EMPTY_VIEW;
|
||||
} else if(mDatas.get(position) == null){
|
||||
return PROGRESS_VIEW;
|
||||
} else {
|
||||
return super.getItemViewType(position);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType)
|
||||
{
|
||||
MyViewHolder holder = new MyViewHolder(LayoutInflater.from(
|
||||
context).inflate(listItemID, parent,
|
||||
false));
|
||||
return holder;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setParameters(List<String> mDatas,int listItemID ) {
|
||||
this.mDatas = mDatas;
|
||||
this.listItemID = listItemID;
|
||||
}
|
||||
|
||||
public void setOnItemClickLitener(OnItemClickLitener mOnItemClickLitener)
|
||||
{
|
||||
this.mOnItemClickLitener = mOnItemClickLitener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(MyViewHolder holder, int position)
|
||||
{
|
||||
holder.tvCateName .setText("分类名称" +position);
|
||||
holder.tvTitle.setText(mDatas.get(position));
|
||||
holder.tvAuthor.setText("金庸" +position);
|
||||
holder.tvCate.setText("cate"+position);
|
||||
holder.tvDesc.setText("this is desc " +position);
|
||||
|
||||
holder.tvTitle2.setText(mDatas.get(position));
|
||||
holder.tvAuthor2.setText("金庸2" +position);
|
||||
holder.tvCate2.setText("cate2"+position);
|
||||
holder.tvDesc2.setText("this is desc2 " +position);
|
||||
|
||||
holder.tvTitle3.setText(mDatas.get(position));
|
||||
holder.tvAuthor3.setText("金庸3-" +position);
|
||||
holder.tvCate3.setText("cate3-"+position);
|
||||
holder.tvDesc3.setText("this is desc3- " +position);
|
||||
|
||||
// 如果设置了回调,则设置点击事件
|
||||
if (mOnItemClickLitener != null)
|
||||
{
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
int pos = holder.getLayoutPosition();
|
||||
mOnItemClickLitener.onItemClick(holder.itemView, pos);
|
||||
}
|
||||
});
|
||||
|
||||
holder.itemView.setOnLongClickListener(new View.OnLongClickListener()
|
||||
{
|
||||
@Override
|
||||
public boolean onLongClick(View v)
|
||||
{
|
||||
int pos = holder.getLayoutPosition();
|
||||
mOnItemClickLitener.onItemLongClick(holder.itemView, pos);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
holder.ll1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
int pos = 1+position;
|
||||
mOnItemClickLitener.onLinearOutClick(holder.itemView, pos);
|
||||
}
|
||||
});
|
||||
|
||||
holder.ll2.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
int pos = 2+position;
|
||||
mOnItemClickLitener.onLinearOutClick(holder.itemView, pos);
|
||||
}
|
||||
});
|
||||
|
||||
holder.ll3.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
int pos = 3+position;
|
||||
mOnItemClickLitener.onLinearOutClick(holder.itemView, pos);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount()
|
||||
{
|
||||
return mDatas.size();
|
||||
}
|
||||
public void addData(int position) {
|
||||
mDatas.add(position, "Insert One");
|
||||
notifyItemInserted(position);
|
||||
}
|
||||
|
||||
public void removeData(int position) {
|
||||
mDatas.remove(position);
|
||||
notifyItemRemoved(position);
|
||||
}
|
||||
class MyViewHolder extends RecyclerView.ViewHolder
|
||||
{
|
||||
@BindView(R.id.title)
|
||||
TextView tvTitle;
|
||||
@BindView(R.id.author)
|
||||
TextView tvAuthor;
|
||||
@BindView(R.id.category)
|
||||
TextView tvCate;
|
||||
@BindView(R.id.desc)
|
||||
TextView tvDesc;
|
||||
@BindView(R.id.title2)
|
||||
TextView tvTitle2;
|
||||
@BindView(R.id.author2)
|
||||
TextView tvAuthor2;
|
||||
@BindView(R.id.category2)
|
||||
TextView tvCate2;
|
||||
@BindView(R.id.desc2)
|
||||
TextView tvDesc2;
|
||||
@BindView(R.id.title3)
|
||||
TextView tvTitle3;
|
||||
@BindView(R.id.author3)
|
||||
TextView tvAuthor3;
|
||||
@BindView(R.id.category3)
|
||||
TextView tvCate3;
|
||||
@BindView(R.id.desc3)
|
||||
TextView tvDesc3;
|
||||
@BindView(R.id.tvCateName)
|
||||
TextView tvCateName;
|
||||
@BindView(R.id.ll1)
|
||||
LinearLayout ll1;
|
||||
@BindView(R.id.ll2)
|
||||
LinearLayout ll2;
|
||||
@BindView(R.id.ll3)
|
||||
LinearLayout ll3;
|
||||
|
||||
public MyViewHolder(View view)
|
||||
{
|
||||
super(view);
|
||||
ButterKnife.bind(this, view);
|
||||
//tvTitle = (TextView) view.findViewById(R.id.title);
|
||||
// tvAuthor = (TextView) view.findViewById(R.id.author);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ import android.view.ViewGroup;
|
|||
import android.widget.ImageView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.flyco.tablayout.SlidingTabLayout;
|
||||
import com.youth.banner.Banner;
|
||||
import com.youth.banner.BannerConfig;
|
||||
import com.youth.banner.Transformer;
|
||||
|
@ -95,7 +96,10 @@ public class Fragment_bookStore extends BasicFragment {
|
|||
//---------tabs-------------
|
||||
@BindView(R.id.viewpager)
|
||||
ViewPager mViewpager;
|
||||
private List<Fragment> mFragments;
|
||||
@BindView(R.id.tab_layout)
|
||||
SlidingTabLayout tabLayout;
|
||||
|
||||
private ArrayList<Fragment> mFragments;
|
||||
ArrayList<View> mList;
|
||||
String[] mTitle;
|
||||
void initTabs() {
|
||||
|
@ -127,7 +131,10 @@ public class Fragment_bookStore extends BasicFragment {
|
|||
}
|
||||
};
|
||||
mViewpager.setAdapter(mAdapter);
|
||||
|
||||
tabLayout.setViewPager(mViewpager);
|
||||
// tabLayout.setViewPager(mViewpager, mTitle, activity, mFragments);
|
||||
mViewpager.setCurrentItem(0);
|
||||
}
|
||||
|
||||
/*
|
||||
View viewpagerA = getLayoutInflater().inflate(R.layout.fragment_jingxuan, null);
|
||||
|
@ -170,7 +177,7 @@ public class Fragment_bookStore extends BasicFragment {
|
|||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.deiniu.zhuike;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
|
@ -83,23 +84,7 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener
|
|||
mParam2 = getArguments().getString(ARG_PARAM2);
|
||||
}
|
||||
initData();
|
||||
mAdapter = new BookListAdapter(activity,new OnItemClickLitener()
|
||||
{
|
||||
|
||||
@Override
|
||||
public void onItemClick(View view, int position)
|
||||
{
|
||||
Toast.makeText(activity, position + " click",
|
||||
Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemLongClick(View view, int position)
|
||||
{
|
||||
// initDialog(position);
|
||||
// mAdapter.removeData(position);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
@ -188,7 +173,7 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener
|
|||
|
||||
//cycle viewpagers
|
||||
|
||||
//---------tabs-------------
|
||||
//---------重磅推荐-------------
|
||||
@BindView(R.id.viewpager_tuijian)
|
||||
MyViewPager mViewpagerTuijian;
|
||||
//@BindView(R.id.titleIndictator)
|
||||
|
@ -236,7 +221,7 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener
|
|||
|
||||
//---------------------------------------------------book cate list-------------------------------begin
|
||||
|
||||
private BookListAdapter mAdapter;
|
||||
// private BookListAdapter mAdapter;
|
||||
private List<String> mHotNewData_l,mHotNewData_g,mHotLianZaiData_l, mHotLianZaiData_g,mFinishedData_l, mFinishedData_g;
|
||||
|
||||
@BindView(R.id.rvHotNewL) RecyclerView rvHotNewL;
|
||||
|
@ -255,8 +240,7 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener
|
|||
@Override
|
||||
public void onItemClick(View view, int position)
|
||||
{
|
||||
Toast.makeText(activity, position + " click",
|
||||
Toast.LENGTH_SHORT).show();
|
||||
showBookDetail( mHotNewData_l.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -265,18 +249,23 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener
|
|||
// initDialog(position);
|
||||
// mAdapter.removeData(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLinearOutClick(View view, int bookId) {
|
||||
|
||||
}
|
||||
|
||||
}));
|
||||
|
||||
rvHotNewG.setLayoutManager(new GridLayoutManager(activity,3));
|
||||
mAdapter.setParameters(mHotNewData_g,R.layout.recycle_list_item );
|
||||
|
||||
rvHotNewG.setAdapter(new BookListAdapter(activity,mHotNewData_g,R.layout.recycle_list_item,new OnItemClickLitener()
|
||||
{
|
||||
|
||||
@Override
|
||||
public void onItemClick(View view, int position)
|
||||
{
|
||||
Toast.makeText(activity, position + " click",
|
||||
Toast.LENGTH_SHORT).show();
|
||||
showBookDetail( mHotNewData_g.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -285,6 +274,10 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener
|
|||
// initDialog(position);
|
||||
// mAdapter.removeData(position);
|
||||
}
|
||||
@Override
|
||||
public void onLinearOutClick(View view, int bookId) {
|
||||
|
||||
}
|
||||
}));
|
||||
|
||||
rvLianZaiL.setLayoutManager(new LinearLayoutManager(this.activity));
|
||||
|
@ -295,8 +288,8 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener
|
|||
@Override
|
||||
public void onItemClick(View view, int position)
|
||||
{
|
||||
Toast.makeText(activity, position + " click",
|
||||
Toast.LENGTH_SHORT).show();
|
||||
// Toast.makeText(activity, position + "grid click", Toast.LENGTH_SHORT).show();
|
||||
showBookDetail( mHotLianZaiData_l.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -305,6 +298,11 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener
|
|||
// initDialog(position);
|
||||
// mAdapter.removeData(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLinearOutClick(View view, int bookId) {
|
||||
|
||||
}
|
||||
}));
|
||||
|
||||
rvLianZaiG.setLayoutManager(new GridLayoutManager(activity,3));
|
||||
|
@ -315,8 +313,8 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener
|
|||
@Override
|
||||
public void onItemClick(View view, int position)
|
||||
{
|
||||
Toast.makeText(activity, position + " click",
|
||||
Toast.LENGTH_SHORT).show();
|
||||
// Toast.makeText(activity, position + "grid click", Toast.LENGTH_SHORT).show();
|
||||
showBookDetail( mHotLianZaiData_g.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -325,6 +323,10 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener
|
|||
// initDialog(position);
|
||||
// mAdapter.removeData(position);
|
||||
}
|
||||
@Override
|
||||
public void onLinearOutClick(View view, int bookId) {
|
||||
|
||||
}
|
||||
}));
|
||||
|
||||
rvFinishL.setLayoutManager(new LinearLayoutManager(this.activity));
|
||||
|
@ -334,8 +336,8 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener
|
|||
@Override
|
||||
public void onItemClick(View view, int position)
|
||||
{
|
||||
Toast.makeText(activity, position + " click",
|
||||
Toast.LENGTH_SHORT).show();
|
||||
// Toast.makeText(activity, position + "grid click", Toast.LENGTH_SHORT).show();
|
||||
showBookDetail( mFinishedData_l.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -344,6 +346,10 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener
|
|||
// initDialog(position);
|
||||
// mAdapter.removeData(position);
|
||||
}
|
||||
@Override
|
||||
public void onLinearOutClick(View view, int bookId) {
|
||||
|
||||
}
|
||||
}));
|
||||
|
||||
rvFinishG.setLayoutManager(new GridLayoutManager(activity,3));
|
||||
|
@ -354,8 +360,8 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener
|
|||
@Override
|
||||
public void onItemClick(View view, int position)
|
||||
{
|
||||
Toast.makeText(activity, position + " click",
|
||||
Toast.LENGTH_SHORT).show();
|
||||
// Toast.makeText(activity, position + "grid click", Toast.LENGTH_SHORT).show();
|
||||
showBookDetail( mFinishedData_g.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -364,6 +370,10 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener
|
|||
// initDialog(position);
|
||||
// mAdapter.removeData(position);
|
||||
}
|
||||
@Override
|
||||
public void onLinearOutClick(View view, int bookId) {
|
||||
|
||||
}
|
||||
}));
|
||||
|
||||
}
|
||||
|
@ -375,14 +385,15 @@ public class Fragment_jingxuan extends BasicFragment implements OnBannerListener
|
|||
mFinishedData_l=initData(mFinishedData_l,'A');
|
||||
mFinishedData_g=initData(mFinishedData_g,'G');
|
||||
}
|
||||
protected List<String> initData(List<String> mDatas,char x)
|
||||
{
|
||||
mDatas = new ArrayList<String>();
|
||||
for (int i = 'A'; i < x; i++)
|
||||
{
|
||||
mDatas.add("射雕" + (char) i);
|
||||
}
|
||||
return mDatas;
|
||||
|
||||
void showBookDetail(String bookId) {
|
||||
|
||||
Toast.makeText(activity, bookId + " 即将加载", Toast.LENGTH_SHORT).show();
|
||||
|
||||
|
||||
Intent intent = new Intent(activity, BookActivity.class);
|
||||
intent.putExtra("BOOKNAME",bookId);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -4,11 +4,18 @@ import android.content.Context;
|
|||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentPagerAdapter;
|
||||
import android.support.v4.view.ViewPager;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.flyco.tablayout.SlidingTabLayout;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
|
||||
|
@ -73,6 +80,7 @@ public class Fragment_other extends BasicFragment {
|
|||
Log.d(TAG,"Fragment_other fragment onCreateView ");
|
||||
View view = inflater.inflate(R.layout.fragment_other, container, false);
|
||||
ButterKnife.bind(this, view);
|
||||
initTabs();
|
||||
return view;
|
||||
}
|
||||
|
||||
|
@ -89,5 +97,50 @@ public class Fragment_other extends BasicFragment {
|
|||
public void setFTag() {
|
||||
TAG="com.deiniu.zhuike.Fragment_other";
|
||||
}
|
||||
@BindView(R.id.viewpager)
|
||||
ViewPager mViewpager;
|
||||
@BindView(R.id.tab_layout)
|
||||
SlidingTabLayout tabLayout;
|
||||
|
||||
private ArrayList<Fragment> mFragments;
|
||||
ArrayList<View> mList;
|
||||
String[] mTitle;
|
||||
void initTabs() {
|
||||
|
||||
if(mFragments ==null || mFragments.size() ==0){
|
||||
mTitle = new String[]{"最新发布", "本周最热", "最多收藏","小编推荐"};
|
||||
mFragments = new ArrayList<>();
|
||||
mFragments.add(new Fragment_shudan_list());
|
||||
mFragments.add(new Fragment_shudan_list());
|
||||
mFragments.add(new Fragment_shudan_list());
|
||||
mFragments.add(new Fragment_shudan_list());
|
||||
Log.d(TAG,"initial fragments in tabs ");
|
||||
}
|
||||
Log.d(TAG,"set viewPager adapter ");
|
||||
// FragmentPagerAdapter mAdapter = new FragmentPagerAdapter(activity.getSupportFragmentManager()) { 第一次进入没问题,再次进入ViewPager的fragment时里面内容就没了,数据丢失 https://blog.csdn.net/allan_bst/article/details/64920076
|
||||
FragmentPagerAdapter mAdapter = new FragmentPagerAdapter(getChildFragmentManager()) {
|
||||
@Override
|
||||
public Fragment getItem(int position) {
|
||||
return mFragments.get(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return mFragments.size();
|
||||
}
|
||||
//ViewPager与TabLayout绑定后,这里获取到PageTitle就是Tab的Text
|
||||
@Override
|
||||
public CharSequence getPageTitle(int position) {
|
||||
return mTitle[position];
|
||||
}
|
||||
};
|
||||
mViewpager.setAdapter(mAdapter);
|
||||
|
||||
|
||||
tabLayout.setViewPager(mViewpager);
|
||||
// tabLayout.setViewPager(mViewpager, mTitle, activity, mFragments);
|
||||
mViewpager.setCurrentItem(0);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,323 @@
|
|||
package com.deiniu.zhuike;
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.widget.NestedScrollView;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.flyco.tablayout.CommonTabLayout;
|
||||
import com.flyco.tablayout.SlidingTabLayout;
|
||||
import com.flyco.tablayout.listener.CustomTabEntity;
|
||||
import com.flyco.tablayout.listener.OnTabSelectListener;
|
||||
import com.google.android.gms.plus.PlusOneButton;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
/**
|
||||
* A fragment with a Google +1 button.
|
||||
* Activities that contain this fragment must implement the
|
||||
* {@link Fragment_paihang.OnFragmentInteractionListener} interface
|
||||
* to handle interaction events.
|
||||
* Use the {@link Fragment_paihang#newInstance} factory method to
|
||||
* create an instance of this fragment.
|
||||
*/
|
||||
public class Fragment_paihang extends BasicFragment {
|
||||
// TODO: Rename parameter arguments, choose names that match
|
||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||
private static final String ARG_PARAM1 = "param1";
|
||||
private static final String ARG_PARAM2 = "param2";
|
||||
// The request code must be 0 or greater.
|
||||
private static final int PLUS_ONE_REQUEST_CODE = 0;
|
||||
// The URL to +1. Must be a valid URL.
|
||||
public static String getFTag() {
|
||||
return "com.deiniu.zhuike.Fragment_paihang";
|
||||
}
|
||||
// TODO: Rename and change types of parameters
|
||||
private String mParam1;
|
||||
private String mParam2;
|
||||
|
||||
|
||||
|
||||
public Fragment_paihang() {
|
||||
// Required empty public constructor
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this factory method to create a new instance of
|
||||
* this fragment using the provided parameters.
|
||||
*
|
||||
* @param param1 Parameter 1.
|
||||
* @param param2 Parameter 2.
|
||||
* @return A new instance of fragment Fragment_paihang.
|
||||
*/
|
||||
// TODO: Rename and change types and number of parameters
|
||||
public static Fragment_paihang newInstance(String param1, String param2) {
|
||||
Fragment_paihang fragment = new Fragment_paihang();
|
||||
Bundle args = new Bundle();
|
||||
args.putString(ARG_PARAM1, param1);
|
||||
args.putString(ARG_PARAM2, param2);
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
if (getArguments() != null) {
|
||||
mParam1 = getArguments().getString(ARG_PARAM1);
|
||||
mParam2 = getArguments().getString(ARG_PARAM2);
|
||||
}
|
||||
initData();
|
||||
mAdapter = new BookListAdapter(activity, mData, R.layout.recycle_list_item_shudan, new OnItemClickLitener() {
|
||||
|
||||
@Override
|
||||
public void onItemClick(View view, int position) {
|
||||
Toast.makeText(activity, position + " click",
|
||||
Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemLongClick(View view, int position) {
|
||||
// initDialog(position);
|
||||
// mAdapter.removeData(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLinearOutClick(View view, int bookId) {
|
||||
Toast.makeText(activity, "book " + bookId + " clicked",
|
||||
Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
View view = inflater.inflate(R.layout.fragment_fragment_paihang, container, false);
|
||||
|
||||
ButterKnife.bind(this, view);
|
||||
initTabs();
|
||||
initialBookList();
|
||||
setScrollListner();
|
||||
return view;
|
||||
}
|
||||
|
||||
|
||||
private ArrayList<CustomTabEntity> mData1,mData2,mData3 ;
|
||||
private int tab1Pos,tab2Pos,tab3Pos;
|
||||
void initData(){
|
||||
mData =initData(mData,'Z');
|
||||
mData1= new ArrayList<>();
|
||||
mData2 = new ArrayList<>();
|
||||
mData3 = new ArrayList<>();
|
||||
mData1.add(new TabEntry("男生",0,0) );
|
||||
mData1.add(new TabEntry("女生",0,0));
|
||||
for (int i = 'A'; i < 'I'; i++)
|
||||
{
|
||||
mData2.add(new TabEntry("类" + (char) i,0,0) );
|
||||
if(i<'D')
|
||||
mData3.add(new TabEntry("榜" + (char) i,0,0) );
|
||||
}
|
||||
|
||||
}
|
||||
class TabEntry implements CustomTabEntity{
|
||||
|
||||
public String title;
|
||||
public int selectedIcon;
|
||||
public int unSelectedIcon;
|
||||
|
||||
public TabEntry(String title, int selectedIcon, int unSelectedIcon) {
|
||||
this.title = title;
|
||||
this.selectedIcon = selectedIcon;
|
||||
this.unSelectedIcon = unSelectedIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTabTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTabSelectedIcon() {
|
||||
return selectedIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTabUnselectedIcon() {
|
||||
return unSelectedIcon;
|
||||
}
|
||||
}
|
||||
|
||||
@BindView(R.id.tab_layout1)
|
||||
CommonTabLayout tabLayout1;
|
||||
@BindView(R.id.tab_layout2)
|
||||
CommonTabLayout tabLayout2;
|
||||
@BindView(R.id.tab_layout3)
|
||||
CommonTabLayout tabLayout3;
|
||||
private void initTabs() {
|
||||
|
||||
tabLayout1.setTabData(mData1);
|
||||
tabLayout1.setOnTabSelectListener(new OnTabSelectListener() {
|
||||
@Override
|
||||
public void onTabSelect(int position) {
|
||||
tab1Pos = position;
|
||||
tabChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTabReselect(int position) {
|
||||
//TODO 重选
|
||||
}
|
||||
});
|
||||
|
||||
tabLayout2.setTabData(mData2);
|
||||
tabLayout2.setOnTabSelectListener(new OnTabSelectListener() {
|
||||
@Override
|
||||
public void onTabSelect(int position) {
|
||||
tab2Pos = position;
|
||||
tabChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTabReselect(int position) {
|
||||
//TODO 重选
|
||||
}
|
||||
});
|
||||
|
||||
tabLayout3.setTabData(mData3);
|
||||
tabLayout3.setOnTabSelectListener(new OnTabSelectListener() {
|
||||
@Override
|
||||
public void onTabSelect(int position) {
|
||||
tab3Pos = position;
|
||||
tabChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTabReselect(int position) {
|
||||
//TODO 重选
|
||||
}
|
||||
});
|
||||
tabChanged();
|
||||
}
|
||||
|
||||
void tabChanged() {
|
||||
/* Toast.makeText(activity, String.format( "TAB1 :{0}, TAB2 :{1}, TAB3 :{3}",
|
||||
mData1.get(tab1Pos).getTabTitle(),
|
||||
mData2.get(tab2Pos).getTabTitle(),
|
||||
mData3.get(tab3Pos).getTabTitle()),
|
||||
Toast.LENGTH_SHORT).show();
|
||||
|
||||
*/
|
||||
String selectedKey = mData1.get(tab1Pos).getTabTitle() +" " +
|
||||
mData2.get(tab2Pos).getTabTitle() +" " +
|
||||
mData3.get(tab3Pos).getTabTitle() ;
|
||||
initialBookList();
|
||||
Toast.makeText(activity, selectedKey,
|
||||
Toast.LENGTH_SHORT).show();
|
||||
tvHint.setText(selectedKey);
|
||||
|
||||
}
|
||||
|
||||
|
||||
//----------------绑定列表
|
||||
BasicFragment.BookListAdapter mAdapter;
|
||||
// private BookListAdapter mAdapter;
|
||||
private List<String> mData;;
|
||||
|
||||
@BindView(R.id.rvPaihang)
|
||||
RecyclerView rvPaihang;
|
||||
|
||||
void initialBookList() {
|
||||
|
||||
rvPaihang.setLayoutManager(new LinearLayoutManager(activity));
|
||||
rvPaihang.setAdapter(mAdapter);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//------------滑动监听
|
||||
@BindView(R.id.n_scroll_view)
|
||||
NestedScrollView mNestedScrollView;
|
||||
@BindView(R.id.llTabs)
|
||||
LinearLayout llTabs;
|
||||
@BindView(R.id.tvHint)
|
||||
TextView tvHint;
|
||||
void setScrollListner(){
|
||||
|
||||
llTabs.measure(0,0);
|
||||
final int height = llTabs.getMeasuredHeight(); //获得当前组件的宽度和高度
|
||||
// final int height = llTabs.getLayoutParams().height;
|
||||
mNestedScrollView.setOnScrollChangeListener(new NestedScrollView.OnScrollChangeListener() {
|
||||
// 将透明度声明成局部变量用于判断
|
||||
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);
|
||||
tvHint.setVisibility(View.GONE);
|
||||
// 随着滑动距离改变透明度
|
||||
// Log.e("al=","="+alpha);
|
||||
// re.setBackgroundColor(Color.argb(alpha, 255, 0, 0));
|
||||
} else {
|
||||
tvHint.setVisibility(View.VISIBLE);
|
||||
if (alpha < 255) {
|
||||
// Log.e("执行次数", "=" + (++count));
|
||||
// 防止频繁重复设置相同的值影响性能
|
||||
alpha = 255;
|
||||
// re.setBackgroundColor(Color.argb(alpha, 255, 0, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void setFTag() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDetach() {
|
||||
super.onDetach();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -3,12 +3,23 @@ package com.deiniu.zhuike;
|
|||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.TabLayout;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentPagerAdapter;
|
||||
import android.support.v4.view.ViewPager;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.flyco.tablayout.SlidingTabLayout;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
|
@ -67,7 +78,12 @@ public class Fragment_shudan extends BasicFragment {
|
|||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
Log.d(TAG,"Fragment_shudan onCreateView");
|
||||
return inflater.inflate(R.layout.fragment_shudan, container, false);
|
||||
|
||||
View v= inflater.inflate(R.layout.fragment_shudan, container, false);
|
||||
ButterKnife.bind(this, v);
|
||||
initTabs();
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -75,7 +91,54 @@ public class Fragment_shudan extends BasicFragment {
|
|||
TAG ="com.deiniu.zhuike.Fragment_shudan";
|
||||
}
|
||||
|
||||
//---------tabs-------------
|
||||
|
||||
@BindView(R.id.viewpager)
|
||||
ViewPager mViewpager;
|
||||
@BindView(R.id.tab_layout2)
|
||||
SlidingTabLayout tabLayout;
|
||||
|
||||
private ArrayList<Fragment> mFragments;
|
||||
ArrayList<View> mList;
|
||||
String[] mTitle;
|
||||
void initTabs() {
|
||||
|
||||
if(mFragments ==null || mFragments.size() ==0){
|
||||
mTitle = new String[]{"最新发布", "本周最热", "最多收藏","小编推荐"};
|
||||
mFragments = new ArrayList<>();
|
||||
mFragments.add(new Fragment_shudan_list());
|
||||
mFragments.add(new Fragment_shudan_list());
|
||||
mFragments.add(new Fragment_shudan_list());
|
||||
mFragments.add(new Fragment_shudan_list());
|
||||
Log.d(TAG,"initial fragments in tabs ");
|
||||
}
|
||||
Log.d(TAG,"set viewPager adapter ");
|
||||
// FragmentPagerAdapter mAdapter = new FragmentPagerAdapter(activity.getSupportFragmentManager()) { 第一次进入没问题,再次进入ViewPager的fragment时里面内容就没了,数据丢失 https://blog.csdn.net/allan_bst/article/details/64920076
|
||||
FragmentPagerAdapter mAdapter = new FragmentPagerAdapter(getChildFragmentManager()) {
|
||||
@Override
|
||||
public Fragment getItem(int position) {
|
||||
return mFragments.get(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return mFragments.size();
|
||||
}
|
||||
//ViewPager与TabLayout绑定后,这里获取到PageTitle就是Tab的Text
|
||||
@Override
|
||||
public CharSequence getPageTitle(int position) {
|
||||
return mTitle[position];
|
||||
}
|
||||
};
|
||||
mViewpager.setAdapter(mAdapter);
|
||||
|
||||
|
||||
tabLayout.setViewPager(mViewpager);
|
||||
// tabLayout.setViewPager(mViewpager, mTitle, activity, mFragments);
|
||||
mViewpager.setCurrentItem(0);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,139 @@
|
|||
package com.deiniu.zhuike;
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v7.widget.GridLayoutManager;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.google.android.gms.plus.PlusOneButton;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
public class Fragment_shudan_list extends BasicFragment {
|
||||
// TODO: Rename parameter arguments, choose names that match
|
||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||
private static final String ARG_PARAM1 = "param1";
|
||||
private static final String ARG_PARAM2 = "param2";
|
||||
// The request code must be 0 or greater.
|
||||
private static final int PLUS_ONE_REQUEST_CODE = 0;
|
||||
// The URL to +1. Must be a valid URL.
|
||||
private final String PLUS_ONE_URL = "http://developer.android.com";
|
||||
// TODO: Rename and change types of parameters
|
||||
private String mParam1;
|
||||
private String mParam2;
|
||||
|
||||
private char cnt;
|
||||
|
||||
public Fragment_shudan_list() {
|
||||
// Required empty public constructor
|
||||
|
||||
}
|
||||
|
||||
// TODO: Rename and change types and number of parameters
|
||||
public static Fragment_shudan_list newInstance(char cnt) {
|
||||
Fragment_shudan_list fragment = new Fragment_shudan_list();
|
||||
|
||||
Bundle args = new Bundle();
|
||||
args.putString(ARG_PARAM1, "" );
|
||||
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
if (getArguments() != null) {
|
||||
mParam1 = getArguments().getString(ARG_PARAM1);
|
||||
mParam2 = getArguments().getString(ARG_PARAM2);
|
||||
}
|
||||
initData();
|
||||
mAdapter = new BookListAdapter(activity, mData, R.layout.recycle_list_item_shudan, new OnItemClickLitener() {
|
||||
|
||||
@Override
|
||||
public void onItemClick(View view, int position) {
|
||||
Toast.makeText(activity, position + " click",
|
||||
Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemLongClick(View view, int position) {
|
||||
// initDialog(position);
|
||||
// mAdapter.removeData(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLinearOutClick(View view, int bookId) {
|
||||
Toast.makeText(activity, "book " + bookId + " clicked",
|
||||
Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
View view = inflater.inflate(R.layout.fragment_fragment_shudan_list, container, false);
|
||||
ButterKnife.bind(this, view);
|
||||
initialBookList();
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(Context context) {
|
||||
super.onAttach(context);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFTag() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDetach() {
|
||||
super.onDetach();
|
||||
mListener = null;
|
||||
}
|
||||
|
||||
//---------------------------------------------------book cate list-------------------------------begin
|
||||
BasicFragment.BookListAdapter mAdapter;
|
||||
// private BookListAdapter mAdapter;
|
||||
private List<String> mData;;
|
||||
|
||||
@BindView(R.id.rvShudan)
|
||||
RecyclerView rvShudan;
|
||||
private void initData() {
|
||||
|
||||
mData =initData(mData,'G');
|
||||
}
|
||||
void initialBookList() {
|
||||
|
||||
rvShudan.setLayoutManager(new LinearLayoutManager(activity));
|
||||
rvShudan.setAdapter(mAdapter);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -255,7 +255,7 @@ public class Main2Activity extends AppCompatActivity
|
|||
return true;
|
||||
case R.id.navigation_notifications:
|
||||
mTextMessage.setText(R.string.title_notifications);
|
||||
showOther();
|
||||
showPaihang();
|
||||
return true;
|
||||
|
||||
}
|
||||
|
@ -284,6 +284,14 @@ public class Main2Activity extends AppCompatActivity
|
|||
showFragment(fragment ,Fragment_other.getFTag());
|
||||
}
|
||||
|
||||
private void showPaihang(){
|
||||
|
||||
Fragment_paihang fragment = (Fragment_paihang) getSupportFragmentManager()
|
||||
.findFragmentByTag(Fragment_paihang.getFTag());
|
||||
if(fragment ==null) fragment =new Fragment_paihang();
|
||||
showFragment(fragment ,Fragment_other.getFTag());
|
||||
|
||||
}
|
||||
|
||||
private void getDataFromServer() {
|
||||
//url
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
package com.deiniu.zhuike;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.design.widget.BottomNavigationView;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.MenuItem;
|
||||
import android.widget.TextView;
|
||||
|
||||
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;
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main5);
|
||||
|
||||
mTextMessage = (TextView) findViewById(R.id.message);
|
||||
BottomNavigationView navigation = (BottomNavigationView) findViewById(R.id.navigation);
|
||||
navigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8zM15.5,11c0.83,0 1.5,-0.67 1.5,-1.5S16.33,8 15.5,8 14,8.67 14,9.5s0.67,1.5 1.5,1.5zM8.5,11c0.83,0 1.5,-0.67 1.5,-1.5S9.33,8 8.5,8 7,8.67 7,9.5 7.67,11 8.5,11zM12,17.5c2.33,0 4.31,-1.46 5.11,-3.5L6.89,14c0.8,2.04 2.78,3.5 5.11,3.5z"/>
|
||||
</vector>
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M19,3L4.99,3c-1.11,0 -1.98,0.9 -1.98,2L3,19c0,1.1 0.88,2 1.99,2L19,21c1.1,0 2,-0.9 2,-2L21,5c0,-1.1 -0.9,-2 -2,-2zM19,15h-4c0,1.66 -1.35,3 -3,3s-3,-1.34 -3,-3L4.99,15L4.99,5L19,5v10zM16,10h-2L14,7h-4v3L8,10l4,4 4,-4z"/>
|
||||
</vector>
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M11.99,2C6.47,2 2,6.47 2,12s4.47,10 9.99,10S22,17.53 22,12 17.52,2 11.99,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8zM13,9.94L14.06,11l1.06,-1.06L16.18,11l1.06,-1.06 -2.12,-2.12zM8.88,9.94L9.94,11 11,9.94 8.88,7.82 6.76,9.94 7.82,11zM12,17.5c2.33,0 4.31,-1.46 5.11,-3.5L6.89,14c0.8,2.04 2.78,3.5 5.11,3.5z"/>
|
||||
</vector>
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M12,12c0,-3 2.5,-5.5 5.5,-5.5S23,9 23,12L12,12zM12,12c0,3 -2.5,5.5 -5.5,5.5S1,15 1,12h11zM12,12c-3,0 -5.5,-2.5 -5.5,-5.5S9,1 12,1v11zM12,12c3,0 5.5,2.5 5.5,5.5S15,23 12,23L12,12z"/>
|
||||
</vector>
|
|
@ -0,0 +1,151 @@
|
|||
<?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"
|
||||
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.support.design.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context=".BookActivity">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:id="@+id/app_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/app_bar_height"
|
||||
android:fitsSystemWindows="true"
|
||||
android:theme="@style/ToolBarTheme.AppBarOverlay">
|
||||
|
||||
<android.support.design.widget.CollapsingToolbarLayout
|
||||
android:id="@+id/toolbar_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
app:contentScrim="?attr/colorPrimary"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
||||
app:toolbarId="@+id/toolbar">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/login_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="240dp"
|
||||
android:paddingBottom="10dp"
|
||||
app:layout_collapseMode="pin"
|
||||
app:layout_collapseParallaxMultiplier="0.7">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/head_img"
|
||||
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"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_weight="0"
|
||||
android:gravity="left"
|
||||
android:src="@drawable/googleg_standard_color_18" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="left"
|
||||
android:text="射雕英雄传"
|
||||
android:textColor="#212121" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/desc"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:gravity="center"
|
||||
android:maxLength="70"
|
||||
android:maxLines="2"
|
||||
android:text="吹牛逼的都是年轻人"
|
||||
android:textColor="@color/common_google_signin_btn_text_light"
|
||||
android:textSize="11sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/author"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="金庸"
|
||||
android:textColor="#212121" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/category"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="武侠小说"
|
||||
android:textColor="@color/colorAccent" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:layout_collapseMode="pin"
|
||||
app:popupTheme="@style/ToolBarTheme.PopupOverlay" />
|
||||
|
||||
</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"
|
||||
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.support.constraint.ConstraintLayout>
|
||||
|
||||
|
|
@ -0,0 +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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/container"
|
||||
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" />
|
||||
|
||||
<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" />
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
|
@ -12,8 +12,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
|
||||
app:behavior_hideable="true"
|
||||
app:behavior_peekHeight="160dp"
|
||||
|
||||
app:layout_behavior="@string/bottom_sheet_behavior">
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<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">
|
||||
|
||||
<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>
|
|
@ -1,22 +1,38 @@
|
|||
<?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"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".Fragment_bookStore">
|
||||
|
||||
<com.flyco.tablayout.SlidingTabLayout
|
||||
android:id="@+id/tab_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:background="@color/white"
|
||||
app:tl_indicator_color="@color/crimson"
|
||||
app:tl_indicator_corner_radius="1.5dp"
|
||||
app:tl_indicator_height="2dp"
|
||||
app:tl_indicator_width="45dp"
|
||||
app:tl_textSelectColor="@color/crimson"
|
||||
app:tl_textUnselectColor="@color/grey"
|
||||
app:tl_tab_space_equal ="true"
|
||||
/>
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
<!--
|
||||
<android.support.design.widget.TabLayout
|
||||
android:id="@+id/tab_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:tabMode="fixed"/>
|
||||
|
||||
-->
|
||||
</android.support.v4.view.ViewPager>
|
||||
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
|
@ -6,7 +6,11 @@
|
|||
android:orientation="vertical"
|
||||
>
|
||||
|
||||
|
||||
<android.support.v4.widget.SwipeRefreshLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/swipeLayout" >
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/id_recyclerview"
|
||||
android:divider="#ffff0000"
|
||||
|
@ -16,7 +20,7 @@
|
|||
android:paddingBottom="40dp"
|
||||
android:paddingTop="30dp"
|
||||
/>
|
||||
|
||||
</android.support.v4.widget.SwipeRefreshLayout>
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
android:layout_width="wrap_content"
|
||||
|
|
|
@ -1,14 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".Fragment_bangdan">
|
||||
|
||||
<!-- TODO: Update blank fragment layout -->
|
||||
<TextView
|
||||
<android.support.v4.widget.SwipeRefreshLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="榜单。。。。。。榜单" />
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/swipeLayout" >
|
||||
<!-- TODO: Update blank fragment layout -->
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rvBangdan"
|
||||
android:divider="#ffff0000"
|
||||
android:dividerHeight="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:nestedScrollingEnabled="false"
|
||||
android:paddingBottom="50dp"
|
||||
/>
|
||||
|
||||
</FrameLayout>
|
||||
</android.support.v4.widget.SwipeRefreshLayout>
|
|
@ -0,0 +1,128 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".Fragment_paihang">
|
||||
|
||||
<!-- TODO: Update blank fragment layout -->
|
||||
<android.support.v4.widget.SwipeRefreshLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/swipeLayout" >
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<android.support.v4.widget.NestedScrollView
|
||||
android:id="@+id/n_scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<LinearLayout
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llTabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
|
||||
>
|
||||
|
||||
<com.flyco.tablayout.CommonTabLayout
|
||||
android:id="@+id/tab_layout1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
app:tl_iconVisible="false"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
app:tl_indicator_margin_left="2dp"
|
||||
app:tl_indicator_margin_right="2dp"
|
||||
app:tl_indicator_style="BLOCK"
|
||||
app:tl_textSelectColor="@color/white"
|
||||
app:tl_textUnselectColor="@color/darkgray"
|
||||
app:tl_textsize="14sp"
|
||||
app:tl_indicator_color="@color/red"
|
||||
app:tl_tab_space_equal ="false"
|
||||
app:tl_indicator_width="@dimen/tabBlock_width"
|
||||
|
||||
/>
|
||||
<com.flyco.tablayout.CommonTabLayout
|
||||
android:id="@+id/tab_layout2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
app:tl_iconVisible="false"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
app:tl_indicator_margin_left="2dp"
|
||||
app:tl_indicator_margin_right="2dp"
|
||||
app:tl_indicator_style="BLOCK"
|
||||
app:tl_textSelectColor="@color/white"
|
||||
app:tl_textUnselectColor="@color/darkgray"
|
||||
app:tl_textsize="14sp"
|
||||
app:tl_indicator_color="@color/red"
|
||||
app:tl_tab_space_equal ="true"
|
||||
app:tl_indicator_width="@dimen/tabBlock_width"
|
||||
|
||||
/>
|
||||
<com.flyco.tablayout.CommonTabLayout
|
||||
android:id="@+id/tab_layout3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
app:tl_iconVisible="false"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
app:tl_indicator_margin_left="2dp"
|
||||
app:tl_indicator_margin_right="2dp"
|
||||
app:tl_indicator_style="BLOCK"
|
||||
app:tl_textSelectColor="@color/white"
|
||||
app:tl_textUnselectColor="@color/darkgray"
|
||||
app:tl_textsize="14sp"
|
||||
app:tl_indicator_color="@color/red"
|
||||
app:tl_tab_space_equal ="false"
|
||||
app:tl_indicator_width="@dimen/tabBlock_width"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
<!-- data begin -->
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rvPaihang"
|
||||
android:divider="#ffff0000"
|
||||
android:dividerHeight="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:nestedScrollingEnabled="false"
|
||||
android:paddingBottom="50dp"
|
||||
/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v4.widget.NestedScrollView>
|
||||
<TextView
|
||||
android:id="@+id/tvHint"
|
||||
android:gravity="center"
|
||||
android:text="selected texts"
|
||||
android:textColor="@color/red"
|
||||
android:layout_width="match_parent"
|
||||
android:textSize="15sp"
|
||||
android:visibility="gone"
|
||||
android:background="@color/white"
|
||||
android:layout_height="40dp" />
|
||||
</FrameLayout>
|
||||
</android.support.v4.widget.SwipeRefreshLayout>
|
||||
|
||||
</LinearLayout>
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v4.widget.SwipeRefreshLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/swipeLayout" >
|
||||
<!-- TODO: Update blank fragment layout -->
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rvShudan"
|
||||
android:divider="#ffff0000"
|
||||
android:dividerHeight="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:nestedScrollingEnabled="false"
|
||||
android:paddingBottom="50dp"
|
||||
/>
|
||||
|
||||
</android.support.v4.widget.SwipeRefreshLayout>
|
|
@ -6,7 +6,11 @@
|
|||
android:layout_height="match_parent" android:orientation="vertical"
|
||||
tools:context=".Fragment_jingxuan">
|
||||
|
||||
|
||||
<android.support.v4.widget.SwipeRefreshLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/swipeLayout" >
|
||||
<android.support.v4.widget.NestedScrollView
|
||||
android:id="@+id/n_scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -79,6 +83,13 @@
|
|||
|
||||
|
||||
<!--火热新书 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:background="@color/ghostwhite"
|
||||
|
||||
android:orientation="horizontal"/>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -113,7 +124,7 @@
|
|||
android:dividerHeight="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:nestedScrollingEnabled="false"
|
||||
/>
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rvHotNewG"
|
||||
|
@ -121,12 +132,18 @@
|
|||
android:dividerHeight="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:nestedScrollingEnabled="false"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
<!-- <include layout="@layout/fragment_jingxuan_book_list"></include> -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:background="@color/ghostwhite"
|
||||
|
||||
/>
|
||||
|
||||
|
||||
<!--热门连载 -->
|
||||
|
@ -164,7 +181,7 @@
|
|||
android:dividerHeight="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:nestedScrollingEnabled="false"
|
||||
|
||||
/>
|
||||
<android.support.v7.widget.RecyclerView
|
||||
|
@ -173,10 +190,16 @@
|
|||
android:dividerHeight="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:nestedScrollingEnabled="false"
|
||||
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:background="@color/ghostwhite"
|
||||
|
||||
android:orientation="horizontal"/>
|
||||
|
||||
<!-- <include layout="@layout/fragment_jingxuan_book_list"></include> -->
|
||||
|
||||
|
@ -215,7 +238,7 @@
|
|||
android:dividerHeight="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:nestedScrollingEnabled="false"
|
||||
|
||||
/>
|
||||
<android.support.v7.widget.RecyclerView
|
||||
|
@ -225,7 +248,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="40dp"
|
||||
|
||||
android:nestedScrollingEnabled="false"
|
||||
/>
|
||||
|
||||
|
||||
|
@ -239,5 +262,5 @@
|
|||
android:layout_height="100dp" />
|
||||
</LinearLayout>
|
||||
</android.support.v4.widget.NestedScrollView>
|
||||
|
||||
</android.support.v4.widget.SwipeRefreshLayout>
|
||||
</LinearLayout>
|
||||
|
|
|
@ -1,39 +1,70 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<android.support.design.widget.CoordinatorLayout 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"
|
||||
android:fitsSystemWindows="true"
|
||||
>
|
||||
<android.support.v4.widget.NestedScrollView
|
||||
android:id="@+id/n_scroll_view"
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:id="@+id/app_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="300dp"
|
||||
android:fitsSystemWindows="true"
|
||||
android:theme="@style/ToolBarTheme.AppBarOverlay">
|
||||
|
||||
<android.support.design.widget.CollapsingToolbarLayout
|
||||
android:id="@+id/toolbar_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
app:contentScrim="?attr/colorPrimary"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap">
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/side_bg"
|
||||
app:layout_collapseMode="parallax" />
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
app:layout_collapseMode="pin"
|
||||
android:fitsSystemWindows="true"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:popupTheme="@style/ToolBarTheme.PopupOverlay" />
|
||||
|
||||
<com.flyco.tablayout.SlidingTabLayout
|
||||
android:id="@+id/tab_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:background="@color/white"
|
||||
app:tl_indicator_color="@color/white"
|
||||
app:tl_indicator_corner_radius="1.5dp"
|
||||
app:tl_indicator_height="0dp"
|
||||
app:tl_indicator_width="0dp"
|
||||
app:tl_textSelectColor="@color/crimson"
|
||||
app:tl_textUnselectColor="@color/grey"
|
||||
app:tl_tab_space_equal ="true"
|
||||
app:tl_textsize="13sp"
|
||||
android:layout_gravity="bottom"
|
||||
/>
|
||||
|
||||
</android.support.design.widget.CollapsingToolbarLayout>
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<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>
|
||||
</android.support.v4.widget.NestedScrollView>
|
||||
</android.support.v4.view.ViewPager>
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
|
@ -1,14 +1,43 @@
|
|||
<?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"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".Fragment_shudan">
|
||||
|
||||
<!-- TODO: Update blank fragment layout -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="书单。。。。" />
|
||||
|
||||
</FrameLayout>
|
||||
<com.flyco.tablayout.SlidingTabLayout
|
||||
android:id="@+id/tab_layout2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:background="@color/white"
|
||||
app:tl_indicator_color="@color/white"
|
||||
app:tl_indicator_corner_radius="1.5dp"
|
||||
app:tl_indicator_height="0dp"
|
||||
app:tl_indicator_width="0dp"
|
||||
app:tl_textSelectColor="@color/crimson"
|
||||
app:tl_textUnselectColor="@color/grey"
|
||||
app:tl_tab_space_equal ="true"
|
||||
app:tl_textsize="13sp"
|
||||
/>
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<!-- <android.support.design.widget.TabLayout
|
||||
android:id="@+id/tab_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:tabMode="fixed"/>
|
||||
-->
|
||||
</android.support.v4.view.ViewPager>
|
||||
<!--
|
||||
|
||||
-->
|
||||
</LinearLayout>
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".Fragment_shudan_list">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="Hello" />
|
||||
|
||||
</FrameLayout>
|
|
@ -0,0 +1,250 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_margin="2dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCateName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="left"
|
||||
android:layout_weight="1"
|
||||
android:text="完本精选"
|
||||
android:textColor="#212121" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/ll1"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="100dp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/item_selector"
|
||||
android:clickable="true"
|
||||
android:layout_weight="1">
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
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:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="left"
|
||||
android:text="射雕英雄传"
|
||||
android:textColor="#212121" />
|
||||
<LinearLayout
|
||||
android:layout_marginTop="2dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
<TextView
|
||||
android:id="@+id/author"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="金庸"
|
||||
android:textColor="#212121" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/category"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="武侠小说"
|
||||
android:textColor="@color/colorAccent" />
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/desc"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textSize="11sp"
|
||||
android:text="武侠小说,武侠小说,著名的金庸作品 "
|
||||
android:textColor="@color/common_google_signin_btn_text_light" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll2"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="100dp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/item_selector"
|
||||
android:clickable="true"
|
||||
android:layout_weight="1">
|
||||
<ImageView
|
||||
android:id="@+id/imageView2"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
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:id="@+id/title2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="left"
|
||||
android:text="射雕英雄传"
|
||||
android:textColor="#212121" />
|
||||
<LinearLayout
|
||||
android:layout_marginTop="2dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
<TextView
|
||||
android:id="@+id/author2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="金庸"
|
||||
android:textColor="#212121" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/category2"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="武侠小说"
|
||||
android:textColor="@color/colorAccent" />
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/desc2"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textSize="11sp"
|
||||
android:text="武侠小说,武侠小说,著名的金庸作品 "
|
||||
android:textColor="@color/common_google_signin_btn_text_light" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll3"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="100dp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/item_selector"
|
||||
android:clickable="true"
|
||||
android:layout_weight="1">
|
||||
<ImageView
|
||||
android:id="@+id/imageView3"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
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:id="@+id/title3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="left"
|
||||
android:text="射雕英雄传"
|
||||
android:textColor="#212121" />
|
||||
<LinearLayout
|
||||
android:layout_marginTop="2dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
<TextView
|
||||
android:id="@+id/author3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="金庸"
|
||||
android:textColor="#212121" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/category3"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="武侠小说"
|
||||
android:textColor="@color/colorAccent" />
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/desc3"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textSize="11sp"
|
||||
android:text="武侠小说,武侠小说,著名的金庸作品 "
|
||||
android:textColor="@color/common_google_signin_btn_text_light" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/item_selector"
|
||||
android:layout_gravity="center_horizontal"
|
||||
>
|
||||
<TextView
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="更多"
|
||||
android:textColor="#212121" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:background="@color/ghostwhite"
|
||||
|
||||
android:orientation="horizontal"/>
|
||||
</LinearLayout>
|
|
@ -2,7 +2,7 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="120dp"
|
||||
android:layout_height="100dp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/item_selector"
|
||||
android:clickable="true"
|
||||
|
@ -10,8 +10,8 @@
|
|||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_weight="0"
|
||||
android:gravity="left"
|
||||
android:src="@drawable/googleg_standard_color_18" />
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="100dp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/item_selector"
|
||||
android:clickable="true"
|
||||
android:layout_weight="1">
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
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:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="left"
|
||||
android:text="射雕英雄传"
|
||||
android:textColor="#212121" />
|
||||
<TextView
|
||||
android:id="@+id/desc"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="left"
|
||||
android:textSize="11sp"
|
||||
android:maxLength="70"
|
||||
android:maxLines="2"
|
||||
android:text="11111111111111111111111111"
|
||||
android:textColor="@color/common_google_signin_btn_text_light" />
|
||||
<TextView
|
||||
android:id="@+id/category"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="left"
|
||||
android:textSize="12sp"
|
||||
android:text="共19本书"
|
||||
android:textColor="@color/common_google_signin_btn_text_light" />
|
||||
<TextView
|
||||
android:id="@+id/author"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/navigation_home"
|
||||
android:icon="@drawable/ic_mood_black_24dp"
|
||||
android:title="@string/title_on_shelf" />
|
||||
|
||||
<item
|
||||
android:id="@+id/navigation_dashboard"
|
||||
android:icon="@drawable/ic_sentiment_very_satisfied_black_24dp"
|
||||
android:title="@string/title_read" />
|
||||
|
||||
<item
|
||||
android:id="@+id/navigation_notifications"
|
||||
android:icon="@drawable/ic_move_to_inbox_black_24dp"
|
||||
android:title="@string/title_download" />
|
||||
</menu>
|
|
@ -0,0 +1,10 @@
|
|||
<menu 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"
|
||||
tools:context="com.deiniu.zhuike.BookActivity">
|
||||
<item
|
||||
android:id="@+id/action_settings"
|
||||
android:orderInCategory="100"
|
||||
android:title="@string/action_settings"
|
||||
app:showAsAction="never" />
|
||||
</menu>
|
|
@ -3,12 +3,12 @@
|
|||
|
||||
<item
|
||||
android:id="@+id/navigation_home"
|
||||
android:icon="@drawable/ic_home_black_24dp"
|
||||
android:icon="@drawable/ic_mood_black_24dp"
|
||||
android:title="@string/title_home" />
|
||||
|
||||
<item
|
||||
android:id="@+id/navigation_dashboard"
|
||||
android:icon="@drawable/ic_dashboard_black_24dp"
|
||||
android:icon="@drawable/ic_toys_black_24dp"
|
||||
android:title="@string/title_dashboard" />
|
||||
|
||||
<item
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<resources>
|
||||
|
||||
<!-- Declare custom theme attributes that allow changing which styles are
|
||||
used for button bars depending on the API level.
|
||||
?android:attr/buttonBarStyle is new as of API 11 so this is
|
||||
necessary to support previous API levels. -->
|
||||
<declare-styleable name="ButtonBarContainerTheme">
|
||||
<attr name="metaButtonBarStyle" format="reference" />
|
||||
<attr name="metaButtonBarButtonStyle" format="reference" />
|
||||
</declare-styleable>
|
||||
|
||||
</resources>
|
|
@ -3,5 +3,175 @@
|
|||
<color name="colorPrimary">#008577</color>
|
||||
<color name="colorPrimaryDark">#00574B</color>
|
||||
<color name="colorAccent">#D81B60</color>
|
||||
<color name="black">#000000</color>
|
||||
<color name="gray">#000000</color>
|
||||
<color name="white">#ffffff</color>
|
||||
<color name="ivory">#FFFFF0</color> <!--象牙色 -->
|
||||
<color name="lightyellow">#FFFFE0</color><!--亮黄色-->
|
||||
<color name="yellow">#FFFF00</color><!--黄色 -->
|
||||
<color name="snow">#FFFAFA</color><!--雪白色 -->
|
||||
<color name="floralwhite">#FFFAF0</color><!--花白色 -->
|
||||
<color name="lemonchiffon">#FFFACD</color><!--柠檬绸色 -->
|
||||
<color name="cornsilk">#FFF8DC</color><!--米绸色 -->
|
||||
<color name="seashell">#FFF5EE</color><!--海贝色 -->
|
||||
<color name="lavenderblush">#FFF0F5</color><!--淡紫红 -->
|
||||
<color name="papayawhip">#FFEFD5</color><!--番木色 -->
|
||||
<color name="blanchedalmond">#FFEBCD</color><!--白杏色 -->
|
||||
<color name="mistyrose">#FFE4E1</color><!--浅玫瑰色 -->
|
||||
<color name="bisque">#FFE4C4</color><!--桔黄色 -->
|
||||
<color name="moccasin">#FFE4B5</color><!--鹿皮色 -->
|
||||
<color name="navajowhite">#FFDEAD</color><!--纳瓦白 -->
|
||||
<color name="peachpuff">#FFDAB9</color><!--桃色 -->
|
||||
<color name="gold">#FFD700</color><!--金色 -->
|
||||
<color name="pink">#FFC0CB</color><!--粉红色 -->
|
||||
<color name="lightpink">#FFB6C1</color><!--亮粉红色-->
|
||||
<color name="orange">#FFA500</color><!--橙色 -->
|
||||
<color name="lightsalmon">#FFA07A</color><!--亮肉色 -->
|
||||
<color name="darkorange">#FF8C00</color><!--暗桔黄色 -->
|
||||
<color name="coral">#FF7F50</color><!--珊瑚色 -->
|
||||
<color name="hotpink">#FF69B4</color><!--热粉红色 -->
|
||||
<color name="tomato">#FF6347</color><!--西红柿色 -->
|
||||
<color name="orangered">#FF4500</color><!--红橙色 -->
|
||||
<color name="deeppink">#FF1493</color><!--深粉红色 -->
|
||||
<color name="fuchsia">#FF00FF</color><!--紫红色 -->
|
||||
<color name="magenta">#FF00FF</color><!--红紫色 -->
|
||||
<color name="red">#FF0000</color><!--红色 -->
|
||||
<color name="oldlace">#FDF5E6</color><!--老花色 -->
|
||||
<color name="lightgoldenrodyellow">#FAFAD2</color><!--亮金黄色 -->
|
||||
<color name="linen">#FAF0E6</color><!--亚麻色 -->
|
||||
<color name="antiquewhite">#FAEBD7</color><!--古董白 -->
|
||||
<color name="salmon">#FA8072</color><!--鲜肉色 -->
|
||||
<color name="ghostwhite">#F8F8FF</color><!--幽灵白 -->
|
||||
<color name="mintcream">#F5FFFA</color><!--薄荷色 -->
|
||||
<color name="whitesmoke">#F5F5F5</color><!--烟白色 -->
|
||||
<color name="beige">#F5F5DC</color><!--米色 -->
|
||||
<color name="wheat">#F5DEB3</color><!--浅黄色 -->
|
||||
<color name="sandybrown">#F4A460</color><!--沙褐色-->
|
||||
<color name="azure">#F0FFFF</color><!--天蓝色 -->
|
||||
<color name="honeydew">#F0FFF0</color><!--蜜色 -->
|
||||
<color name="aliceblue">#F0F8FF</color><!--艾利斯兰 -->
|
||||
<color name="khaki">#F0E68C</color><!--黄褐色 -->
|
||||
<color name="lightcoral">#F08080</color><!--亮珊瑚色 -->
|
||||
<color name="palegoldenrod">#EEE8AA</color><!--苍麒麟色 -->
|
||||
<color name="violet">#EE82EE</color><!--紫罗兰色 -->
|
||||
<color name="darksalmon">#E9967A</color><!--暗肉色 -->
|
||||
<color name="lavender">#E6E6FA</color><!--淡紫色 -->
|
||||
<color name="lightcyan">#E0FFFF</color><!--亮青色 -->
|
||||
<color name="burlywood">#DEB887</color><!--实木色 -->
|
||||
<color name="plum">#DDA0DD</color><!--洋李色 -->
|
||||
<color name="gainsboro">#DCDCDC</color><!--淡灰色 -->
|
||||
<color name="crimson">#DC143C</color><!--暗深红色 -->
|
||||
<color name="palevioletred">#DB7093</color><!--苍紫罗兰色 -->
|
||||
<color name="goldenrod">#DAA520</color><!--金麒麟色 -->
|
||||
<color name="orchid">#DA70D6</color><!--淡紫色 -->
|
||||
<color name="thistle">#D8BFD8</color><!--蓟色 -->
|
||||
<color name="lightgray">#D3D3D3</color><!--亮灰色 -->
|
||||
<color name="tan">#D2B48C</color><!--茶色 -->
|
||||
<color name="chocolate">#D2691E</color><!--巧可力色 -->
|
||||
<color name="peru">#CD853F</color><!--秘鲁色 -->
|
||||
<color name="indianred">#CD5C5C</color><!--印第安红 -->
|
||||
<color name="mediumvioletred">#C71585</color><!--中紫罗兰色 -->
|
||||
<color name="silver">#C0C0C0</color><!--银色 -->
|
||||
<color name="darkkhaki">#BDB76B</color><!--暗黄褐色 -->
|
||||
<color name="rosybrown">#BC8F8F</color> <!--褐玫瑰红 -->
|
||||
<color name="mediumorchid">#BA55D3</color><!--中粉紫色 -->
|
||||
<color name="darkgoldenrod">#B8860B</color><!--暗金黄色 -->
|
||||
<color name="firebrick">#B22222</color><!--火砖色 -->
|
||||
<color name="powderblue">#B0E0E6</color><!--粉蓝色 -->
|
||||
<color name="lightsteelblue">#B0C4DE</color><!--亮钢兰色 -->
|
||||
<color name="paleturquoise">#AFEEEE</color><!--苍宝石绿 -->
|
||||
<color name="greenyellow">#ADFF2F</color><!--黄绿色 -->
|
||||
<color name="lightblue">#ADD8E6</color><!--亮蓝色 -->
|
||||
<color name="darkgray">#A9A9A9</color><!--暗灰色 -->
|
||||
<color name="darkgrey">#A9A9A9</color><!--暗灰色 -->
|
||||
<color name="brown">#A52A2A</color><!--褐色 -->
|
||||
<color name="sienna">#A0522D</color><!--赭色 -->
|
||||
<color name="darkorchid">#9932CC</color><!--暗紫色-->
|
||||
<color name="palegreen">#98FB98</color><!--苍绿色 -->
|
||||
<color name="darkviolet">#9400D3</color><!--暗紫罗兰色 -->
|
||||
<color name="mediumpurple">#9370DB</color><!--中紫色 -->
|
||||
<color name="lightgreen">#90EE90</color><!--亮绿色 -->
|
||||
<color name="darkseagreen">#8FBC8F</color><!--暗海兰色 -->
|
||||
<color name="saddlebrown">#8B4513</color><!--重褐色 -->
|
||||
<color name="darkmagenta">#8B008B</color><!--暗洋红 -->
|
||||
<color name="darkred">#8B0000</color><!--暗红色 -->
|
||||
<color name="blueviolet">#8A2BE2</color><!--紫罗兰蓝色 -->
|
||||
<color name="lightskyblue">#87CEFA</color><!--亮天蓝色 -->
|
||||
<color name="skyblue">#87CEEB</color><!--天蓝色 -->
|
||||
<color name="grey">#808080</color><!--灰色 -->
|
||||
<color name="olive">#808000</color><!--橄榄色 -->
|
||||
<color name="purple">#800080</color><!--紫色 -->
|
||||
<color name="maroon">#800000</color><!--粟色 -->
|
||||
<color name="aquamarine">#7FFFD4</color><!--碧绿色-->
|
||||
<color name="chartreuse">#7FFF00</color><!--黄绿色 -->
|
||||
<color name="lawngreen">#7CFC00</color><!--草绿色 -->
|
||||
<color name="mediumslateblue">#7B68EE</color><!--中暗蓝色 -->
|
||||
<color name="lightslategray">#778899</color><!--亮蓝灰 -->
|
||||
<color name="lightslategrey">#778899</color><!--亮蓝灰 -->
|
||||
<color name="slategray">#708090</color><!--灰石色 -->
|
||||
<color name="slategrey">#708090</color><!--灰石色 -->
|
||||
<color name="olivedrab">#6B8E23</color><!--深绿褐色 -->
|
||||
<color name="slateblue">#6A5ACD</color><!--石蓝色 -->
|
||||
<color name="dimgray">#696969</color><!--暗灰色 -->
|
||||
<color name="dimgrey">#696969</color><!--暗灰色 -->
|
||||
<color name="mediumaquamarine">#66CDAA</color><!--中绿色 -->
|
||||
<color name="cornflowerblue">#6495ED</color><!--菊兰色 -->
|
||||
<color name="cadetblue">#5F9EA0</color><!--军兰色 -->
|
||||
<color name="darkolivegreen">#556B2F</color><!--暗橄榄绿 -->
|
||||
<color name="indigo">#4B0082</color><!--靛青色 -->
|
||||
<color name="mediumturquoise">#48D1CC</color><!--中绿宝石 -->
|
||||
<color name="darkslateblue">#483D8B</color><!--暗灰蓝色 -->
|
||||
<color name="steelblue">#4682B4</color><!--钢兰色 -->
|
||||
<color name="royalblue">#4169E1</color><!--皇家蓝 -->
|
||||
<color name="turquoise">#40E0D0</color><!--青绿色 -->
|
||||
<color name="mediumseagreen">#3CB371</color><!--中海蓝 -->
|
||||
<color name="limegreen">#32CD32</color><!--橙绿色 -->
|
||||
<color name="darkslategray">#2F4F4F</color><!--暗瓦灰色 -->
|
||||
<color name="darkslategrey">#2F4F4F</color><!--暗瓦灰色 -->
|
||||
<color name="seagreen">#2E8B57</color><!--海绿色 -->
|
||||
<color name="forestgreen">#228B22</color><!--森林绿 -->
|
||||
<color name="lightseagreen">#20B2AA</color><!--亮海蓝色 -->
|
||||
<color name="dodgerblue">#1E90FF</color><!--闪兰色 -->
|
||||
<color name="midnightblue">#191970</color><!--中灰兰色 -->
|
||||
<color name="aqua">#00FFFF</color><!--浅绿色 -->
|
||||
<color name="cyan">#00FFFF</color><!--青色 -->
|
||||
<color name="springgreen">#00FF7F</color><!--春绿色-->
|
||||
<color name="lime">#00FF00</color><!--酸橙色 -->
|
||||
<color name="mediumspringgreen">#00FA9A</color><!--中春绿色 -->
|
||||
<color name="darkturquoise">#00CED1</color><!--暗宝石绿 -->
|
||||
<color name="deepskyblue">#00BFFF</color><!--深天蓝色 -->
|
||||
<color name="darkcyan">#008B8B</color><!--暗青色 -->
|
||||
<color name="teal">#008080</color><!--水鸭色 -->
|
||||
<color name="green">#008000</color><!--绿色 -->
|
||||
<color name="darkgreen">#006400</color><!--暗绿色 -->
|
||||
<color name="blue">#0000FF</color><!--蓝色 -->
|
||||
<color name="mediumblue">#0000CD</color><!--中兰色 -->
|
||||
<color name="darkblue">#00008B</color><!--暗蓝色 -->
|
||||
<color name="navy">#000080</color><!--海军色 -->
|
||||
|
||||
<!-- chart colors -->
|
||||
<color name="color1">#56ADDB</color><!--浅蓝色 -->
|
||||
<color name="color2">#F59331</color><!--暗绿色 -->
|
||||
<color name="color3">#73C83C</color><!--蓝色 -->
|
||||
<color name="color4">#948D8B</color><!--中兰色 -->
|
||||
<color name="color5">#E54273</color><!--暗蓝色 -->
|
||||
<color name="color6">#FFD34E</color><!--海军色 -->
|
||||
<color name="color7">#2A86D6</color><!--蓝色 -->
|
||||
<color name="color8">#00BFC0</color><!--中兰色 -->
|
||||
<color name="color9">#95AC5F</color><!--暗蓝色 -->
|
||||
<color name="color10">#FF8497</color><!--海军色 -->
|
||||
|
||||
|
||||
<!-- button text -->
|
||||
<drawable name="font_active">#2F4F4F</drawable>
|
||||
<drawable name="font_pressed">#ffffff</drawable>
|
||||
<drawable name="font_inactive">#808080</drawable>
|
||||
|
||||
<!-- progressbar -->
|
||||
<color name="default_screen_bg">#20324a</color>
|
||||
<color name="rounded_container_bg">#80000000</color>
|
||||
<color name="rounded_container_border">#3b3f44</color>
|
||||
<color name="light_gray_header_color">#646663</color>
|
||||
|
||||
<color name="black_overlay">#66000000</color>
|
||||
</resources>
|
||||
|
|
|
@ -30,5 +30,10 @@
|
|||
<!-- 设置行高 -->
|
||||
<dimen name="setting_height">60dp</dimen>
|
||||
|
||||
<!-- 设置tab 选择块宽 -->
|
||||
<dimen name="tabBlock_width">50dp</dimen>
|
||||
<!-- 设置 tab选择块高 -->
|
||||
<dimen name="tabBlock_height">25dp</dimen>
|
||||
<dimen name="text_margin">16dp</dimen>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -16,4 +16,101 @@
|
|||
<string name="action_settings">Settings</string>
|
||||
<string name="title_activity_main3">Main3Activity</string>
|
||||
<string name="title_activity_main4">Main4Activity</string>
|
||||
|
||||
<string name="title_activity_book">BookActivity</string>
|
||||
<string name="dummy_button">Dummy Button</string>
|
||||
<string name="dummy_content">DUMMY\nCONTENT</string>
|
||||
<string name="large_text">
|
||||
"Material is the metaphor.\n\n"
|
||||
|
||||
"A material metaphor is the unifying theory of a rationalized space and a system of motion."
|
||||
"The material is grounded in tactile reality, inspired by the study of paper and ink, yet "
|
||||
"technologically advanced and open to imagination and magic.\n"
|
||||
"Surfaces and edges of the material provide visual cues that are grounded in reality. The "
|
||||
"use of familiar tactile attributes helps users quickly understand affordances. Yet the "
|
||||
"flexibility of the material creates new affordances that supercede those in the physical "
|
||||
"world, without breaking the rules of physics.\n"
|
||||
"The fundamentals of light, surface, and movement are key to conveying how objects move, "
|
||||
"interact, and exist in space and in relation to each other. Realistic lighting shows "
|
||||
"seams, divides space, and indicates moving parts.\n\n"
|
||||
|
||||
"Bold, graphic, intentional.\n\n"
|
||||
|
||||
"The foundational elements of print based design typography, grids, space, scale, color, "
|
||||
"and use of imagery guide visual treatments. These elements do far more than please the "
|
||||
"eye. They create hierarchy, meaning, and focus. Deliberate color choices, edge to edge "
|
||||
"imagery, large scale typography, and intentional white space create a bold and graphic "
|
||||
"interface that immerse the user in the experience.\n"
|
||||
"An emphasis on user actions makes core functionality immediately apparent and provides "
|
||||
"waypoints for the user.\n\n"
|
||||
|
||||
"Motion provides meaning.\n\n"
|
||||
|
||||
"Motion respects and reinforces the user as the prime mover. Primary user actions are "
|
||||
"inflection points that initiate motion, transforming the whole design.\n"
|
||||
"All action takes place in a single environment. Objects are presented to the user without "
|
||||
"breaking the continuity of experience even as they transform and reorganize.\n"
|
||||
"Motion is meaningful and appropriate, serving to focus attention and maintain continuity. "
|
||||
"Feedback is subtle yet clear. Transitions are efficient yet coherent.\n\n"
|
||||
|
||||
"3D world.\n\n"
|
||||
|
||||
"The material environment is a 3D space, which means all objects have x, y, and z "
|
||||
"dimensions. The z-axis is perpendicularly aligned to the plane of the display, with the "
|
||||
"positive z-axis extending towards the viewer. Every sheet of material occupies a single "
|
||||
"position along the z-axis and has a standard 1dp thickness.\n"
|
||||
"On the web, the z-axis is used for layering and not for perspective. The 3D world is "
|
||||
"emulated by manipulating the y-axis.\n\n"
|
||||
|
||||
"Light and shadow.\n\n"
|
||||
|
||||
"Within the material environment, virtual lights illuminate the scene. Key lights create "
|
||||
"directional shadows, while ambient light creates soft shadows from all angles.\n"
|
||||
"Shadows in the material environment are cast by these two light sources. In Android "
|
||||
"development, shadows occur when light sources are blocked by sheets of material at "
|
||||
"various positions along the z-axis. On the web, shadows are depicted by manipulating the "
|
||||
"y-axis only. The following example shows the card with a height of 6dp.\n\n"
|
||||
|
||||
"Resting elevation.\n\n"
|
||||
|
||||
"All material objects, regardless of size, have a resting elevation, or default elevation "
|
||||
"that does not change. If an object changes elevation, it should return to its resting "
|
||||
"elevation as soon as possible.\n\n"
|
||||
|
||||
"Component elevations.\n\n"
|
||||
|
||||
"The resting elevation for a component type is consistent across apps (e.g., FAB elevation "
|
||||
"does not vary from 6dp in one app to 16dp in another app).\n"
|
||||
"Components may have different resting elevations across platforms, depending on the depth "
|
||||
"of the environment (e.g., TV has a greater depth than mobile or desktop).\n\n"
|
||||
|
||||
"Responsive elevation and dynamic elevation offsets.\n\n"
|
||||
|
||||
"Some component types have responsive elevation, meaning they change elevation in response "
|
||||
"to user input (e.g., normal, focused, and pressed) or system events. These elevation "
|
||||
"changes are consistently implemented using dynamic elevation offsets.\n"
|
||||
"Dynamic elevation offsets are the goal elevation that a component moves towards, relative "
|
||||
"to the component’s resting state. They ensure that elevation changes are consistent "
|
||||
"across actions and component types. For example, all components that lift on press have "
|
||||
"the same elevation change relative to their resting elevation.\n"
|
||||
"Once the input event is completed or cancelled, the component will return to its resting "
|
||||
"elevation.\n\n"
|
||||
|
||||
"Avoiding elevation interference.\n\n"
|
||||
|
||||
"Components with responsive elevations may encounter other components as they move between "
|
||||
"their resting elevations and dynamic elevation offsets. Because material cannot pass "
|
||||
"through other material, components avoid interfering with one another any number of ways, "
|
||||
"whether on a per component basis or using the entire app layout.\n"
|
||||
"On a component level, components can move or be removed before they cause interference. "
|
||||
"For example, a floating action button (FAB) can disappear or move off screen before a "
|
||||
"user picks up a card, or it can move if a snackbar appears.\n"
|
||||
"On the layout level, design your app layout to minimize opportunities for interference. "
|
||||
"For example, position the FAB to one side of stream of a cards so the FAB won’t interfere "
|
||||
"when a user tries to pick up one of cards.\n\n"
|
||||
</string>
|
||||
<string name="title_activity_main5">Main5Activity</string>
|
||||
<string name="title_on_shelf">加入书架</string>
|
||||
<string name="title_read">立即阅读</string>
|
||||
<string name="title_download">下载序列</string>
|
||||
</resources>
|
||||
|
|
|
@ -30,4 +30,16 @@
|
|||
|
||||
<style name="ToolBarTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
|
||||
|
||||
<style name="FullscreenTheme" parent="ToolBarTheme">
|
||||
<item name="android:actionBarStyle">@style/FullscreenActionBarStyle</item>
|
||||
<item name="android:windowActionBarOverlay">true</item>
|
||||
<item name="android:windowBackground">@null</item>
|
||||
<item name="metaButtonBarStyle">?android:attr/buttonBarStyle</item>
|
||||
<item name="metaButtonBarButtonStyle">?android:attr/buttonBarButtonStyle</item>
|
||||
</style>
|
||||
|
||||
<style name="FullscreenActionBarStyle" parent="Widget.AppCompat.ActionBar">
|
||||
<item name="android:background">@color/black_overlay</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -157,6 +157,7 @@
|
|||
<orderEntry type="library" name="Gradle: android.arch.lifecycle:livedata:1.1.1@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support:drawerlayout:28.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-plus:16.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support:support-v4:28.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.android.support.constraint:constraint-layout-solver:1.1.3@jar" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: net.sf.kxml:kxml2:2.3.0@jar" level="project" />
|
||||
|
|