Commit 1b73eb63 by 严久程

Merge branch 'dev' of ssh://gitlab.yidianling.com:2224/app_android_lib/YDL-Component into dev

# Conflicts:
#	settings.gradle
#	ydl-platform/libs/flutter-muse.aar
parents 94f80724 6ea6a37d
......@@ -169,6 +169,7 @@ dependencies {
//开发模式
api project(':m-consultant')
api project(':m-user')
api project(':m-muse')
api (project(':ydl-platform')){
transitive = true
}
......@@ -179,6 +180,7 @@ dependencies {
api 'com.ydl:m-user-module-ydl:0.0.6'
api rootProject.ext.dependencies["ydl-webview"]
api rootProject.ext.dependencies["ydl-m-user-api"]
api rootProject.ext.dependencies["ydl-m-muse-api"]
api(rootProject.ext.dependencies["ydl-platform"]) {
transitive = true
}
......
/*___Generated_by_IDEA___*/
package com.ydl.component;
/* This stub is only used by the IDE. It is NOT the BuildConfig class actually packed into the APK */
public final class BuildConfig {
public final static boolean DEBUG = Boolean.parseBoolean(null);
}
\ No newline at end of file
/*___Generated_by_IDEA___*/
package com.ydl.component;
/* This stub is only used by the IDE. It is NOT the Manifest class actually packed into the APK */
public final class Manifest {
}
\ No newline at end of file
/*___Generated_by_IDEA___*/
package com.ydl.component;
/* This stub is only used by the IDE. It is NOT the R class actually packed into the APK */
public final class R {
}
\ No newline at end of file
......@@ -17,8 +17,10 @@ import com.ydl.component.music.MusicPlayActivity
import com.ydl.component.mvp.DemoContract
import com.ydl.component.mvp.DemoPresenter
import com.ydl.media.audio.PlayService
import com.ydl.media.view.PlayerFloatHelper
import com.ydl.ydl_router.manager.YDLRouterManager
import com.ydl.ydl_router.manager.YDLRouterParams
import com.ydl.ydlcommon.mvp.lce.BaseLceActivity
import com.ydl.ydlcommon.router.IYDLRouterConstant
import com.yidianling.common.tools.ToastUtil
import com.yidianling.consultant.ExpertSearchActivity.Companion.HOT_SEARCH_DOCTOR_NAME
import kotlinx.android.synthetic.main.activity_main.*
......@@ -74,7 +76,30 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
bt_to_music.setOnClickListener {
startActivity(Intent(this, MusicPlayActivity::class.java))
}
bt_to_muse.setOnClickListener {
YDLRouterManager.router(IYDLRouterConstant.ROUTER_MUSE,
YDLRouterParams().putExtra(IYDLRouterConstant.MUSIC_URL, "http://video.yidianling.com/2019/05/30/e6d4a71e8c895f2156a2ff37d93ca3a9.mp3")
.putExtra(IYDLRouterConstant.DATA_JSON, "{\n" +
" \"muses\": [{\n" +
" \"id\": 6,\n" +
" \"name\": \"冥想基础介绍-1-什么是冥想?\",\n" +
" \"audioUrl\":\n" +
" \"http://video.yidianling.com/2019/05/30/e6d4a71e8c895f2156a2ff37d93ca3a9.mp3\",\n" +
" \"backgroundUrl\":\n" +
" \"https://img.yidianling.com/file/2019/06/10/i4qdax82ok2aizq3.png\",\n" +
" \"effectCode\": 1,\n" +
" \"category\": 2,\n" +
" \"playCount\": 929,\n" +
" \"sort\": 255,\n" +
" \"isDelete\": 1,\n" +
" \"createTime\": \"May 30, 2019 4:45:17 PM\",\n" +
" \"updateTime\": \"Jun 10, 2019 7:14:23 PM\"\n" +
" }]\n" +
" }"))
}
}
override fun loadData() {
mPresenter?.loadUsers()
......
......@@ -89,7 +89,8 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:orientation="horizontal">
<Button
android:id="@+id/bt_to_music"
android:layout_width="wrap_content"
......@@ -97,6 +98,14 @@
android:layout_marginLeft="30dp"
android:layout_marginTop="10dp"
android:text="Jump to Musci" />
<Button
android:id="@+id/bt_to_muse"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginTop="10dp"
android:text="Jump to 冥想" />
</LinearLayout>
......
......@@ -158,7 +158,7 @@ ext {
"ydl-pushagent" : 'com.ydl:ydl-pushagent:0.1.8',
"ydl-notracepoint" : 'com.ydl:notracepoint-lib:0.1.8@aar',
"ydl-js" : 'com.ydl:ydl-js:1.0.7-SNAPSHOT@aar',
"ydl-router" : 'com.ydl:ydl-router:1.3.0-SNAPSHOT@aar',
"ydl-router" : 'com.ydl:ydl-router:1.3.2-SNAPSHOT@aar',
"xrecyclerview" : 'com.ydl:xrecyclerview:1.0.0-SNAPSHOT@aar',
"arouter-api" : "com.alibaba:arouter-api:1.4.1",
"arouter-compiler" : "com.alibaba:arouter-compiler:1.2.2",
......@@ -174,6 +174,7 @@ ext {
"ydl-user-router" : 'com.ydl:router:1.0.0-SNAPSHOT@aar',
"ydl-platform" : 'com.ydl:ydl-platform:0.0.10@aar',
"ydl-m-user-api" : 'com.ydl:m-user-api:0.0.5',
"ydl-webview" : 'com.ydl:ydl-webview:0.0.14@aar'
"ydl-webview" : 'com.ydl:ydl-webview:0.0.14@aar',
"ydl-m-muse-api" : 'com.ydl:m-muse-api:0.0.1@aar'
]
}
/*___Generated_by_IDEA___*/
package com.yidianling.consultant;
/* This stub is only used by the IDE. It is NOT the BuildConfig class actually packed into the APK */
public final class BuildConfig {
public final static boolean DEBUG = Boolean.parseBoolean(null);
}
\ No newline at end of file
/*___Generated_by_IDEA___*/
package com.yidianling.consultant;
/* This stub is only used by the IDE. It is NOT the Manifest class actually packed into the APK */
public final class Manifest {
}
\ No newline at end of file
/*___Generated_by_IDEA___*/
package com.yidianling.consultant;
/* This stub is only used by the IDE. It is NOT the R class actually packed into the APK */
public final class R {
}
\ No newline at end of file
......@@ -119,7 +119,7 @@
android:layout_weight="1"
android:text="历史搜索"
android:textColor="#242424"
android:textSize="@dimen/dp_16"
android:textSize="@dimen/platform_dp_16"
android:textStyle="bold" />
<ImageView
......@@ -158,7 +158,7 @@
android:layout_height="wrap_content"
android:text="热门搜索"
android:textColor="#242424"
android:textSize="@dimen/dp_16"
android:textSize="@dimen/platform_dp_16"
android:textStyle="bold" />
<cn.lankton.flowlayout.FlowLayout
......@@ -187,7 +187,7 @@
android:layout_height="wrap_content"
android:text="本周热门专家"
android:textColor="#242424"
android:textSize="@dimen/dp_16"
android:textSize="@dimen/platform_dp_16"
android:textStyle="bold" />
<cn.lankton.flowlayout.FlowLayout
......
<?xml version="1.0" encoding="utf-8"?>
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/imgRate"
android:layout_width="@dimen/dp_11"
android:layout_height="@dimen/dp_11"
android:layout_width="@dimen/platform_dp_11"
android:layout_height="@dimen/platform_dp_11"
android:layout_marginRight="@dimen/platform_dp_2"
android:scaleType="fitXY"
android:background="@drawable/expert_search_full_star">
......
......@@ -60,11 +60,11 @@
android:layout_toRightOf="@+id/cvHead"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_12"
android:layout_marginLeft="@dimen/dp_12"
android:layout_marginTop="@dimen/platform_dp_12"
android:layout_marginLeft="@dimen/platform_dp_12"
android:textSize="@dimen/platform_dp_18"
android:textColor="@color/platform_color_242424"
android:layout_marginStart="@dimen/dp_12"
android:layout_marginStart="@dimen/platform_dp_12"
android:gravity="center_vertical"
android:textStyle="bold"
tools:ignore="SpUsage"
......@@ -86,7 +86,7 @@
<ImageView
android:id="@+id/imgServiceFree"
android:layout_width="26dp"
android:layout_height="@dimen/dp_12"
android:layout_height="@dimen/platform_dp_12"
android:layout_marginLeft="@dimen/platform_dp_4"
android:scaleType="centerCrop"
tools:background="@drawable/service_free"
......@@ -95,7 +95,7 @@
<ImageView
android:id="@+id/imgNewEnter"
android:layout_width="26dp"
android:layout_height="@dimen/dp_12"
android:layout_height="@dimen/platform_dp_12"
android:layout_marginLeft="@dimen/platform_dp_4"
android:scaleType="fitCenter"
tools:background="@drawable/new_enter"
......@@ -104,7 +104,7 @@
<ImageView
android:id="@+id/imgAbilityLevel"
android:layout_width="26dp"
android:layout_height="@dimen/dp_12"
android:layout_height="@dimen/platform_dp_12"
android:layout_marginLeft="@dimen/platform_dp_4"
android:scaleType="fitCenter"
tools:background="@drawable/expert_search_shixi"
......@@ -119,11 +119,11 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tvName"
android:layout_marginLeft="@dimen/dp_12"
android:layout_marginLeft="@dimen/platform_dp_12"
android:layout_toRightOf="@+id/cvHead"
android:layout_toEndOf="@+id/cvHead"
android:layout_marginTop="@dimen/platform_dp_4"
android:textSize="@dimen/dp_12"
android:textSize="@dimen/platform_dp_12"
android:textColor="@color/platform_color_242424"
android:lines="1"
android:ellipsize="end"
......@@ -144,12 +144,12 @@
<LinearLayout
android:id="@+id/ll_zixunOrderNum"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_16"
android:layout_height="@dimen/platform_dp_16"
android:layout_toRightOf="@+id/cvHead"
android:layout_toEndOf="@+id/cvHead"
android:layout_below="@+id/tvTeamCertifications"
android:layout_marginLeft="@dimen/dp_12"
android:layout_marginStart="@dimen/dp_12"
android:layout_marginLeft="@dimen/platform_dp_12"
android:layout_marginStart="@dimen/platform_dp_12"
android:layout_marginTop="@dimen/platform_dp_5"
android:orientation="horizontal">
<!--好评率-->
......@@ -164,11 +164,11 @@
<!--61234人点评-->
<TextView
android:id="@+id/tv_zixunOrderNum"
android:layout_marginLeft="@dimen/dp_12"
android:layout_marginLeft="@dimen/platform_dp_12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:textSize="@dimen/dp_12"
android:textSize="@dimen/platform_dp_12"
android:textColor="@color/platform_color_242424"
tools:text="61234"
android:textStyle="bold"/>
......@@ -176,7 +176,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:textSize="@dimen/dp_12"
android:textSize="@dimen/platform_dp_12"
android:textColor="@color/platform_color_999999"
android:text="条评价" />
......@@ -187,11 +187,11 @@
android:id="@+id/tvOrderNumContent"
android:layout_toRightOf="@+id/cvHead"
android:layout_below="@+id/ll_zixunOrderNum"
android:layout_marginStart="@dimen/dp_12"
android:layout_marginLeft="@dimen/dp_12"
android:layout_marginStart="@dimen/platform_dp_12"
android:layout_marginLeft="@dimen/platform_dp_12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/dp_12"
android:textSize="@dimen/platform_dp_12"
android:layout_marginTop="5dp"
android:textColor="@color/platform_color_999999"
tools:ignore="SpUsage"
......@@ -202,7 +202,7 @@
android:layout_alignTop="@+id/tvOrderNumContent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/dp_12"
android:textSize="@dimen/platform_dp_12"
android:layout_marginLeft="1dp"
android:layout_marginRight="1dp"
android:textColor="@color/platform_color_242424"
......@@ -214,7 +214,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/tvOrderNumContent"
android:textSize="@dimen/dp_12"
android:textSize="@dimen/platform_dp_12"
android:textColor="@color/platform_color_999999"
tools:ignore="SpUsage"
android:text="人" />
......@@ -226,7 +226,7 @@
android:layout_marginLeft="@dimen/platform_dp_20"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/dp_12"
android:textSize="@dimen/platform_dp_12"
android:textColor="@color/platform_color_999999"
tools:ignore="SpUsage"
android:text="月售" />
......@@ -237,7 +237,7 @@
android:layout_alignTop="@+id/tvOrderNumContent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/dp_12"
android:textSize="@dimen/platform_dp_12"
android:layout_marginLeft="1dp"
android:layout_marginRight="1dp"
android:textColor="@color/platform_color_242424"
......@@ -250,7 +250,7 @@
android:layout_alignTop="@+id/tvOrderNumContent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/dp_12"
android:textSize="@dimen/platform_dp_12"
android:textColor="@color/platform_color_999999"
tools:ignore="SpUsage"
android:text="小时" />
......@@ -261,7 +261,7 @@
android:layout_alignParentRight="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/dp_12"
android:textSize="@dimen/platform_dp_12"
android:textColor="@color/platform_color_FF5040"
tools:ignore="SpUsage"
tools:text="多人在问询"
......@@ -274,7 +274,7 @@
android:layout_alignTop="@+id/tvPrice"
android:layout_toLeftOf="@+id/tvPrice"
android:textColor="#FF5040"
android:textSize="@dimen/dp_11"
android:textSize="@dimen/platform_dp_11"
tools:ignore="SpUsage"
android:layout_marginTop="3dp"
android:textStyle="bold"
......@@ -297,7 +297,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FF5040"
android:textSize="@dimen/dp_11"
android:textSize="@dimen/platform_dp_11"
android:layout_marginBottom="2.5dp"
android:text="起"
android:layout_marginLeft="1dp" />
......@@ -312,7 +312,7 @@
tools:text="浙江.杭州"
android:gravity="right"
android:textColor="@color/platform_color_999999"
android:textSize="@dimen/dp_12"/>
android:textSize="@dimen/platform_dp_12"/>
<!--<View-->
<!--android:id="@+id/vLine"-->
<!--android:layout_below="@+id/tvPrice"-->
......@@ -379,7 +379,7 @@
android:maxLines="2"
tools:text="的客人能够黄偶尔烦人呢日工俄日给你额鞥你让个汇入你哦个人会儿个黄胡蓉呢你个人给哦 而归黑人更换二给"
android:textColor="@color/platform_color_999999"
android:textSize="@dimen/dp_11"/>
android:textSize="@dimen/platform_dp_11"/>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
......@@ -14,8 +14,8 @@
android:layout_gravity="center_vertical"
android:paddingRight="@dimen/platform_dp_3"
android:paddingLeft="@dimen/platform_dp_3"
android:paddingTop="@dimen/dp_0.5"
android:paddingBottom="@dimen/dp_0.5"
android:paddingTop="@dimen/platform_dp_05"
android:paddingBottom="@dimen/platform_dp_05"
android:textSize="@dimen/platform_dp_9"
tools:text="单次"/>
<TextView
......@@ -27,7 +27,7 @@
android:lines="1"
android:ellipsize="end"
android:textColor="@color/platform_color_666666"
android:textSize="@dimen/dp_11"
android:textSize="@dimen/platform_dp_11"
tools:text="职业发展,个人成长主题倾诉"
android:layout_marginStart="@dimen/platform_dp_6"
tools:ignore="SpUsage" />
......
......@@ -10,9 +10,9 @@
android:ellipsize="end"
android:gravity="center"
android:maxEms="9"
android:paddingLeft="@dimen/dp_16"
android:paddingLeft="@dimen/platform_dp_16"
android:paddingTop="@dimen/platform_dp_7"
android:paddingRight="@dimen/dp_16"
android:paddingRight="@dimen/platform_dp_16"
android:paddingBottom="@dimen/platform_dp_7"
android:singleLine="true"
android:textColor="#242424"
......
......@@ -142,7 +142,7 @@
android:id="@+id/tv_reload"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_16"
android:layout_marginTop="@dimen/platform_dp_16"
android:background="@drawable/bg_blue_but"
android:paddingLeft="@dimen/platform_dp_32"
android:paddingTop="@dimen/platform_dp_8"
......
......@@ -28,7 +28,7 @@
android:layout_marginTop="@dimen/platform_dp_20"
android:text="显示方式"
android:textColor="@color/platform_color_242424"
android:textSize="@dimen/dp_16"
android:textSize="@dimen/platform_dp_16"
android:textStyle="bold"
android:visibility="gone" />
......@@ -46,7 +46,7 @@
android:layout_marginTop="@dimen/platform_dp_28"
android:text="咨询方式"
android:textColor="@color/platform_color_242424"
android:textSize="@dimen/dp_16"
android:textSize="@dimen/platform_dp_16"
android:textStyle="bold" />
<FrameLayout
......@@ -62,7 +62,7 @@
android:layout_marginTop="@dimen/platform_dp_28"
android:text="服务均价"
android:textColor="@color/platform_color_242424"
android:textSize="@dimen/dp_16"
android:textSize="@dimen/platform_dp_16"
android:textStyle="bold" />
<FrameLayout
......@@ -78,7 +78,7 @@
android:layout_marginTop="@dimen/platform_dp_28"
android:text="年龄选择"
android:textColor="@color/platform_color_242424"
android:textSize="@dimen/dp_16"
android:textSize="@dimen/platform_dp_16"
android:textStyle="bold" />
<FrameLayout
......@@ -94,7 +94,7 @@
android:layout_marginTop="@dimen/platform_dp_28"
android:text="资质选择"
android:textColor="@color/platform_color_242424"
android:textSize="@dimen/dp_16"
android:textSize="@dimen/platform_dp_16"
android:textStyle="bold" />
<cn.lankton.flowlayout.FlowLayout
......@@ -112,7 +112,7 @@
android:layout_marginTop="@dimen/platform_dp_28"
android:text="其他选择"
android:textColor="@color/platform_color_242424"
android:textSize="@dimen/dp_16"
android:textSize="@dimen/platform_dp_16"
android:textStyle="bold" />
<FrameLayout
......
......@@ -9,7 +9,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="服务类型"
android:textSize="@dimen/dp_16"
android:textSize="@dimen/platform_dp_16"
android:textColor="@color/platform_color_242424"
android:textStyle="bold"
android:layout_marginTop="@dimen/platform_dp_24"
......
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
kapt {
arguments {
arg("AROUTER_MODULE_NAME", project.getName())
}
}
android {
compileSdkVersion rootProject.ext.android["compileSdkVersion"]
buildToolsVersion rootProject.ext.android["buildToolsVersion"]
defaultConfig {
minSdkVersion rootProject.ext.android["minSdkVersion"]
targetSdkVersion rootProject.ext.android["targetSdkVersion"]
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
flavorDimensions "versionCode"
}
lintOptions {
abortOnError false
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
//Flavor 信息
publishNonDefault true
productFlavors {
ydl {}
xlzx {}
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}
dependencies {
api fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
implementation 'com.android.support:appcompat-v7:26.1.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'
implementation "com.alibaba:arouter-api:$arouter_api"
// 注意此处的依赖方式:kotlin中使用和java中使用方式有不同
kapt "com.alibaba:arouter-compiler:$arouter_compiler"
if (rootProject.ext.dev_mode){
//开发时使用
api project(":ydl-platform")
implementation project(':ydl-media')
} else {
//发布时使用
api(rootProject.ext.dependencies["ydl-platform"]) {
transitive = true
}
}
}
modular {
//模块包名
packageName "com.yidianling.muse"
// 模块发布需要的参数
publish {
modules {
xlzx {
groupId = "com.ydl"
artifactId = "m-muse-module-xlzx"
// 上报的 心理咨询 业务模块 aar 包的版本号
version = "0.0.1"
}
ydl{
groupId = "com.ydl"
artifactId = "m-muse-module-ydl"
// 上报的 壹点灵 业务模块 aar 包的版本号
version = "0.0.1"
}
}
api {
// 壹点灵/心理咨询 业务模块 API层 jar包的发布信息
groupId = "com.ydl"
artifactId = "m-muse-api"
//开发时注释掉版本号,发布api时打开
//version = "0.0.1"
// API 层打包时需要引入的依赖
apiDependencies {
implementation "com.google.code.gson:gson:2.8.2"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.alibaba:arouter-api:1.4.1'
}
}
}
}
\ No newline at end of file
# 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
package com.ydl.ydl_muse;
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() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.ydl.ydl_muse.test", appContext.getPackageName());
}
}
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.yidianling.muse">
<application>
<activity
android:name=".activity.MuseActivity"
android:screenOrientation="portrait"/>
</application>
</manifest>
package com.yidianling.muse.activity
import com.alibaba.android.arouter.facade.annotation.Route
import com.ydl.media.audio.AudioPlayer
import com.ydl.ydlcommon.base.flutter.base.BaseFlutterActivity
import com.ydl.ydlcommon.router.IYDLRouterConstant
import com.yidianling.muse.handler.MusePlugin
import org.json.JSONObject
/**
* Created by xj on 2019/9/6.
*/
@Route(path = "/module/muse")
class MuseActivity : BaseFlutterActivity() {
override fun initialRoute(): String {
return "native/muse/home"
}
override fun initChannelPlugin(jsonObject: JSONObject) {
MusePlugin.rigister(this, jsonObject.getString(IYDLRouterConstant.MUSIC_URL), jsonObject.getString(IYDLRouterConstant.DATA_JSON))
/**
* 如果正在播放音乐,则停止播放所有音乐
*/
if (AudioPlayer.get().isPlaying) {
AudioPlayer.get().stopPlayer()
}
}
override fun onDestroy() {
super.onDestroy()
/**
* 退出冥想模块的时候,关闭音乐播放
*/
AudioPlayer.get().stopPlayer()
}
}
package com.yidianling.muse.handler
import android.graphics.drawable.Drawable
import com.google.gson.Gson
import com.ydl.media.audio.AudioPlayer
import com.ydl.media.audio.model.Music
import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.view.dialog.YDLShareDialog
import com.yidianling.common.tools.ToastUtil
import com.yidianling.muse.R
import com.yidianling.muse.api.bean.MuseModuleBean
import io.flutter.app.FlutterActivity
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel
/**
* Created by xj on 2019/9/6.
*/
class MusePlugin : MethodChannel.MethodCallHandler {
companion object {
const val CHANNEL: String = "lib/fm_module/channel"
const val ACTION_GET_APPINFO_INITIAL_DATA = "action_get_initial_app_info_data" //获取主包信息的数据
const val ACTION_GET_MUSIC_INITIAL_DATA = "action_get_initial_music_data" //获取音乐原生的数据
const val ACTION_PLAY_MUSIC = "action_play_music" //播放音乐
const val ACTION_PAUSE_MUSIC = "action_pause_music" //暂停音乐
const val ACTION_STOP_MUSIC = "action_stop_music" //暂停(销毁)音乐
const val ACTION_SET_DEFAULT_TIME = "action_set_default_time" //时间控制页面设置时间
const val ACTION_POP_PAGE = "action_pop_page" //pop当前页面
const val ACTION_SHARE_WX = "action_share_wx" //分享至微信
const val ACTION_SET_BGIMG = "action_set_bgImg"; //设置背景图片
var currentMusicUrl: String = "" //当前正在播放的冥想url
var data: MuseModuleBean? = null //冥想数据
fun rigister(activity: FlutterActivity, currentUrl: String?, dataJson: String) {
currentUrl?.let {
currentMusicUrl = currentUrl
}
data = Gson().fromJson(dataJson, MuseModuleBean::class.java)
MethodChannel(activity.flutterView, CHANNEL).setMethodCallHandler(MusePlugin(activity))
}
}
private var mActivity: FlutterActivity? = null
private constructor(activity: FlutterActivity) {
mActivity = activity
}
override fun onMethodCall(methodCall: MethodCall, result: MethodChannel.Result) {
methodCall?.let {
when (methodCall.method) {
// flutter获取原生的音乐数据
ACTION_GET_MUSIC_INITIAL_DATA -> {
val mMap = mutableMapOf<String, Any>()
mMap["defaultTime"] = getDefaultTime()
mMap["currentMusicUrl"] = currentMusicUrl
mMap["dataJson"] = Gson().toJson(data)
result?.success(mMap)
}
// 播放音乐
ACTION_PLAY_MUSIC -> {
var musicUrl: String? = methodCall.argument<String>("url")
var mContinue: Boolean = methodCall.argument<Boolean>("mContinue")!!
if (mContinue) {
AudioPlayer.get().seekTo(-1, AudioPlayer.get().audioPosition)
AudioPlayer.get().startPlayer()
}else {
val music = Music()
music.path = musicUrl ?: currentMusicUrl
music.album = ""
music.artist = ""
music.coverPath = ""
music.title = ""
AudioPlayer.get().singleCirclePlay(music)
}
}
// 暂停音乐
ACTION_PAUSE_MUSIC -> {
AudioPlayer.get().pausePlayer()
}
// 暂停(销毁)音乐
ACTION_STOP_MUSIC -> {
AudioPlayer.get().stopPlayer()
}
// 设置默认时间
ACTION_SET_DEFAULT_TIME -> {
YDLCacheUtils.saveMuseDefaultTime(methodCall.argument<Int>("time").toString())
}
// 退出flutteractivity
ACTION_POP_PAGE -> {
mActivity?.finish()
}
// 分享
ACTION_SHARE_WX -> {
share(methodCall)
}
//设置背景图片
ACTION_SET_BGIMG -> {
var mDrawable: Drawable?
when (methodCall.arguments) {
"sleeps_icon_default" -> {
mDrawable = mActivity?.resources?.getDrawable(R.drawable.muse_sleeps_icon_default)
}
"sleeps_icon_playing" -> {
mDrawable = mActivity?.resources?.getDrawable(R.drawable.muse_sleeps_icon_playing)
}
"muse_icon_default" -> {
mDrawable = mActivity?.resources?.getDrawable(R.drawable.muse_muse_icon_default)
}
"muse_icon_playing" -> {
mDrawable = mActivity?.resources?.getDrawable(R.drawable.muse_muse_icon_playing)
}
else -> {
mDrawable = mActivity?.resources?.getDrawable(R.drawable.muse_sleeps_icon_default)
}
}
mDrawable?.let {
mActivity?.window?.setBackgroundDrawable(mDrawable)
}
}
else -> {
}
}
}
}
/**
* 分享,跟FM一致
*/
private fun share(methodCall: MethodCall?) {
var shareUrl = methodCall?.argument<String>("shareUrl")?:""
var title = methodCall?.argument<String>("title")?:""
var path = methodCall?.argument<String>("path")?:""
var appId = methodCall?.argument<String>("appId")?:""
if (shareUrl.isEmpty()) {
ToastUtil.toastShort("分享数据获取失败")
}else {
val dialog = YDLShareDialog.style7(mActivity!!, title, shareUrl, null, "https://img.yidianling.com/file/2019/06/10/fm0vovijx0p2br9s.png", path, appId)
dialog.setCallBack(object : YDLShareDialog.ICallBack {
override fun callBack(type: Int) {
}
})
dialog.show(mActivity!!.fragmentManager, "lose")
}
}
/**
* 获取默认时间
*/
private fun getDefaultTime(): Int {
var time = YDLCacheUtils.getMuseDefaultTime()
return try {
time.toInt()
} catch (e: Exception) {
600
}
}
}
\ No newline at end of file
package com.yidianling.muse.api.bean
/**
* Created by xj on 2019/10/31.
*/
open class HomeItemBaseBean(var isRealEmpty: Boolean)
\ No newline at end of file
package com.yidianling.muse.api.bean
/**
* 冥想模块所有数据
* Created by xj on 2019/9/16.
*/
class MuseModuleBean : HomeItemBaseBean {
constructor():super(false)
constructor(isRealEmpty:Boolean):super(isRealEmpty)
/**
* 冥想数据
*/
var muses: ArrayList<MuseDetailBean>? = null
/**
* 助眠数据
*/
var sleeps: ArrayList<SleepsDetailBean>? = null
data class MuseDetailBean(
val id: Int,
val audioUrl: String,
val backgroundUrl: String,
val category: Int,
val createTime: String,
val effectCode: String,
val isDelete: String,
val name: String,
val playCount: Int,
val sort: Int,
val updateTime: String,
val shareUrl: String,
val appId: String,
val path: String)
data class SleepsDetailBean(
val id: Int,
val audioUrl: String,
val backgroundUrl: String,
val category: Int,
val createTime: String,
val effectCode: String,
val isDelete: String,
val name: String,
val playCount: Int,
val sort: Int,
val updateTime: String,
val shareUrl: String,
val appId: String,
val path: String)
}
\ No newline at end of file
<resources>
<string name="app_name">ydl-muse</string>
</resources>
package com.ydl.ydl_muse;
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() throws Exception {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
......@@ -49,7 +49,8 @@ android {
}
//前缀的名字
resourcePrefix "tests_"
// resourcePrefix "tests_"
//Flavor 信息
publishNonDefault true
productFlavors {
......
......@@ -13,11 +13,11 @@ import com.ydl.ydl_image.module.GlideApp
import com.ydl.ydl_image.transform.GlideCircleTransform
import com.yidianling.router.im.IMRequestCallback
import com.yidianling.tests.router.TestsIn
import com.yidianling.ydlcommon.base.BaseActivity
import com.yidianling.ydlcommon.dialog.NormalDialog
import com.yidianling.ydlcommon.http.YdlRetrofitUtils
import com.yidianling.ydlcommon.http.api.Command
import com.yidianling.ydlcommon.router.YdlCommonOut
import com.ydl.ydlcommon.base.BaseActivity
import com.ydl.ydlcommon.dialog.NormalDialog
import com.ydl.ydlcommon.http.YdlRetrofitUtils
import com.ydl.ydlcommon.http.api.Command
import com.ydl.ydlcommon.router.YdlCommonOut
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
import kotlinx.android.synthetic.main.activity_select_conversation.*
......@@ -123,7 +123,7 @@ class SelectConversationActivity : BaseActivity() {
private fun getData() {
val cmd = Command.RecentCmd()
TestRetrofitApi.getTestRetrofitApi().getRecentExpertList(YdlRetrofitUtils.getMaps(cmd))
TestRetrofitApi.getTestRetrofitApi().getRecentExpertList(NetworkParamsUtils.getMaps(cmd))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.doOnSubscribe({showProgressDialog("")})
......@@ -140,7 +140,7 @@ class SelectConversationActivity : BaseActivity() {
Toast.makeText(this@SelectConversationActivity, it.msg, Toast.LENGTH_SHORT).show()
}
},{
YdlRetrofitUtils.handleError(mContext,it)
HttpErrorUtils.handleError(mContext,it)
})
}
......
......@@ -5,13 +5,10 @@ import com.ydl.ydlcommon.base.config.YDL_DOMAIN_JAVA
import com.ydl.ydlcommon.data.http.BaseAPIResponse
import com.ydl.ydlcommon.data.http.BaseResponse
import com.ydl.ydlnet.YDLHttpUtils
import com.yidianling.tests.answer.HandleResultData
import com.yidianling.tests.detail.model.bean.TestAddOrder
import com.yidianling.tests.detail.model.bean.TestDetail
import com.yidianling.tests.list.model.bean.RecommendSearchItemBean
import com.yidianling.tests.list.model.bean.TestCategory
import com.yidianling.tests.list.model.bean.TestListData
import com.yidianling.tests.result.model.TestResult
import com.yidianling.tests.list.model.bean.TestsRedPacketBean
import io.reactivex.Observable
import retrofit2.http.*
......@@ -77,33 +74,20 @@ interface TestRetrofitApi {
): Observable<BaseAPIResponse<TestListData>>
//获取测试详情
@FormUrlEncoded
@POST("ceshi/detail")
fun fetchTestDetail(@FieldMap params: Map<String, String>): Observable<BaseResponse<TestDetail>>
//测试详情页面跳转
@FormUrlEncoded
@POST("ceshi/is-answer-h5")
fun getTestDetailJumpType(@FieldMap params: Map<String, String>): Observable<BaseResponse<String>>
//测试详情页 下订单接口
@FormUrlEncoded
@POST("ceshi/add-order")
fun fetchTestAddOrder(@FieldMap params: Map<String, String>): Observable<BaseResponse<TestAddOrder>>
//上传测试答案
@FormUrlEncoded
@POST("ceshi/handle-result")
fun handleResult(@FieldMap params: Map<String, String>): Observable<BaseResponse<HandleResultData>>
//获取测试结果
@FormUrlEncoded
@POST("ceshi/result")
fun fetchResult(@FieldMap params: Map<String, String>): Observable<BaseResponse<TestResult>>
//用户最近聊天专家
@FormUrlEncoded
@POST("sms/recent")
fun getRecentExpertList(@FieldMap params: Map<String, String>): Observable<BaseResponse<List<Recent>>>
//获取用户所有测试红包列表,按优惠金额倒序排序
@FormUrlEncoded
@POST("ceshi/coupon")
fun getCoupon(@FieldMap params: Map<String, String>): Observable<BaseResponse<ArrayList<TestsRedPacketBean>>>
}
\ No newline at end of file
......@@ -6,6 +6,9 @@ package com.yidianling.tests
*/
class TestsBIConstants{
companion object {
/**
* =======================事件名常量===========================
*/
val EVENT_TEST_HOME_SEARCH_CLICK = "测评主页搜索"
val EVENT_TEST_HOME_MINE_CLICK = "测评主页个人中心图标点击"
val EVENT_TEST_HOME_BANNER_CLICK = "测评主页banner点击"
......@@ -25,8 +28,51 @@ class TestsBIConstants{
val EVENT_TEST_RESULT_BOTTOM_CLICK = "测评结果页底部点击"
val EVENT_TEST_RESULT_MORE_CLICK = "测评结果页更多点击"
val EVENT_TEST_RESULT_SHARE_CLICK = "测评结果页顶部分享点击"
/**
* =======================属性名常量===========================
*/
val PROPERTY_HOMEPAGER_BANNER_URL = "banner链接"
val PROPERTY_HOMEPAGER_CONFIDE_ID = "分类id"
val PROPERTY_HOMEPAGER_CONFIDE_NAME = "分类名称"
val PROPERTY_HOMEPAGER_LOOP_NAME = "轮播信息"
val PROPERTY_HOMEPAGER_CATEGORY_NAME = "名称"
val PROPERTY_HOMEPAGER_COURSE_NAME = "课程推荐名称"
val PROPERTY_HOMEPAGER_COURSE_URL = "课程推荐连接"
val PROPERTY_HOMEPAGER_HOT_TOPIC_NAME = "热门话题名称"
val PROPERTY_TEST_HOME_BANNER_URL = "banner链接"
val PROPERTY_TEST_HOME_BANNER_NAME = "banner标题"
val PROPERTY_TEST_HOME_CATEGORY_ID = "分类id"
val PROPERTY_TEST_HOME_CATEGORY_NAME = "分类名称"
val PROPERTY_TEST_HOME_LOOP_NAME = "轮播信息"
val PROPERTY_TEST_HOME_DAILY_NAME = "每日精选名称"
val PROPERTY_TEST_HOME_DAILY_URL = "每日精选链接"
val PROPERTY_TEST_HOME_HOT_URL = "热门推荐链接"
val PROPERTY_TEST_HOME_HOT_NAME = "热门推荐标题"
val PROPERTY_TEST_LIST_CATEGORY_NAME = "分类名称"
val PROPERTY_TEST_LIST_TEST_NAME = "测评标题"
val PROPERTY_TEST_DETAIL_SHARE_NAME = "分享标题"
val PROPERTY_PAY_WAYS_NAME = "支付方式名称"
val PROPERTY_PAY_NAME = "支付商品名称"
val PROPERTY_EST_RESULT_BOTTOM_NAME = "按钮名称"
val PROPERTY_EST_RESULT_SHARE_NAME = "测评名称"
val PROPERTY_EST_RESULT_TEST_NAME = "测评标题"
val PROPERTY_EXPERT_SEARCH_KEY_WORDS = "关键字"
val PROPERTY_EXPERT_TOP_GUIDE_NAME = "模块名称"
val PROPERTY_EXPERT_FILTER_THEME = "主题"
val PROPERTY_EXPERT_FILTER_AREA = "地区"
val PROPERTY_EXPERT_FILTER_SORT = "排序"
val PROPERTY_EXPERT_LIST_ID = "咨询师id"
val PROPERTY_EXPERT_LIST_NAME = "咨询师名称"
val PROPERTY_EXPERT_LIST_CHAT = "咨询师私聊"
val PROPERTY_DOWN_ORDER_NAME = "姓名点击"
val PROPERTY_DOWN_ORDER_AGE = "年龄点击"
val PROPERTY_DOWN_ORDER_PHONE = "手机点击"
val PROPERTY_DOWN_ORDER_DES = "描述点击"
val PROPERTY_DOWN_ORDER_COMMIT = "提交点击"
}
}
......@@ -9,9 +9,11 @@ import android.view.View
import com.alibaba.android.arouter.facade.annotation.Route
import com.google.gson.Gson
import com.google.gson.reflect.TypeToken
import com.yidianling.common.tools.RxImageTool
import com.yidianling.common.tools.ToastUtil
import com.ydl.ydlcommon.base.BaseMvpActivity
import com.ydl.ydlcommon.utils.*
import com.ydl.ydlcommon.utils.remind.ToastHelper
import com.yidianling.tests.R
import com.yidianling.tests.TestsBIConstants
import com.yidianling.tests.home.adapter.AdapterWrapper
import com.yidianling.tests.home.adapter.TestHomeAdapter
import com.yidianling.tests.home.bean.TestHomeDataBean
......@@ -23,15 +25,6 @@ import com.yidianling.tests.home.event.UpdateCouponMoneyEvent
import com.yidianling.tests.home.presenter.TestHomePresenterImpl
import com.yidianling.tests.home.utils.TestHomeUtils
import com.yidianling.tests.home.widget.SwipeToLoadHelper
import com.yidianling.ydlcommon.constant.UMConstants
import com.yidianling.ydlcommon.event.SelectTabCallPhoneEvent
import com.yidianling.ydlcommon.mvp.MVPActivity
import com.yidianling.ydlcommon.remind.ToastHelper
import com.yidianling.ydlcommon.tool.BuryPointUtils
import com.yidianling.ydlcommon.utils.SharedPreferencesEditor
import com.yidianling.ydlcommon.utils.UMEventUtils
import com.yidianling.ydlcommon.utils.YDLAsyncUtils
import com.yidianling.ydlcommon.utils.YDLCacheUtils
import de.greenrobot.event.EventBus
import kotlinx.android.synthetic.main.testhome_activity.*
import kotlinx.android.synthetic.main.testhome_bar.*
......@@ -45,7 +38,7 @@ import org.json.JSONObject
* @date 2018/7/26
*/
@Route(path = "/ceshi/home")
class TestHomeActivity : MVPActivity<ITestHomeContract.Presenter>(), ITestHomeContract.View, SwipeToLoadHelper.LoadMoreListener, SwipeRefreshLayout.OnRefreshListener {
class TestHomeActivity : BaseMvpActivity<ITestHomeContract.View,ITestHomeContract.Presenter>(), ITestHomeContract.View, SwipeToLoadHelper.LoadMoreListener, SwipeRefreshLayout.OnRefreshListener {
/**
* 适配器包装 处理上拉加载更多
......@@ -79,7 +72,7 @@ class TestHomeActivity : MVPActivity<ITestHomeContract.Presenter>(), ITestHomeCo
private var fromStr: String? = null
override fun createPresenter(): ITestHomeContract.Presenter {
return TestHomePresenterImpl(this)
return TestHomePresenterImpl()
}
override fun layoutResId(): Int {
......@@ -117,7 +110,7 @@ class TestHomeActivity : MVPActivity<ITestHomeContract.Presenter>(), ITestHomeCo
private fun initAdapter() {
swipe_refresh_layout.setOnRefreshListener(this)
swipe_refresh_layout.setColorSchemeColors(ContextCompat.getColor(this, R.color.main_theme_blue))
swipe_refresh_layout.setColorSchemeColors(ContextCompat.getColor(this, R.color.platform_main_theme_blue))
mLayoutManager = LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false)
recyclerview.layoutManager = mLayoutManager
if (null == mTestHomeAdapter) {
......@@ -183,7 +176,7 @@ class TestHomeActivity : MVPActivity<ITestHomeContract.Presenter>(), ITestHomeCo
override fun newHomeRequest() {
page = 1
presenter.newHomeRequest()
mPresenter.newHomeRequest()
}
override fun newHomeResponse(datalist: List<TestHomeDataBean>) {
......@@ -235,7 +228,7 @@ class TestHomeActivity : MVPActivity<ITestHomeContract.Presenter>(), ITestHomeCo
BuryPointUtils.getInstance().createMap()
.burryPoint("ceping_change")
showProgressDialog()
presenter.dailyChange()
mPresenter.dailyChange()
}
override fun dailyChangeResponse(dataBean: TestHomeDataBean) {
......@@ -273,7 +266,7 @@ class TestHomeActivity : MVPActivity<ITestHomeContract.Presenter>(), ITestHomeCo
return
}
swipe_refresh_layout.isEnabled = false
presenter.onLoadMore(page)
mPresenter.onLoadMore(page)
}
/**
......@@ -303,13 +296,4 @@ class TestHomeActivity : MVPActivity<ITestHomeContract.Presenter>(), ITestHomeCo
mTestHomeAdapter!!.onDestory()
}
}
override fun onBackPressed() {
if (!TextUtils.isEmpty(fromStr) && "h5" == fromStr){
//如果是从H5打开的测评首页,返回时选中首页Tab
EventBus.getDefault().post(SelectTabCallPhoneEvent(0))
}
super.onBackPressed()
}
}
\ No newline at end of file
......@@ -7,6 +7,7 @@ import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity
import com.ydl.ydl_router.manager.YDLRouterManager
import com.ydl.ydl_router.manager.YDLRouterParams
import com.ydl.ydlcommon.base.config.HttpConfig
import com.ydl.ydlcommon.router.IYDLRouterConstant
import com.ydl.ydlcommon.utils.BuryPointUtils
import com.ydl.ydlcommon.utils.UMEventUtils
......@@ -15,13 +16,6 @@ import com.yidianling.tests.TestsBIConstants
import com.yidianling.tests.list.view.TestCategoryListActivity
import com.yidianling.tests.router.TestsIn
import com.yidianling.tests.search.TestSearchActivity
import com.yidianling.ydlcommon.constant.UMConstants
import com.yidianling.ydlcommon.h5.H5Params
import com.yidianling.ydlcommon.h5.NewH5Activity
import com.yidianling.ydlcommon.http.YdlRetrofitUtils
import com.yidianling.ydlcommon.router.IYDLRouterConstant
import com.yidianling.ydlcommon.tool.BuryPointUtils
import com.yidianling.ydlcommon.utils.UMEventUtils
/**
* @author yuanwai
......@@ -50,7 +44,7 @@ class TestHomeEventImpl(mContext: Context) : ITestHomeEvent {
context!!.startActivity(TestsIn.loginWayIntent(context as Activity))
return
}
val testParam = H5Params(YdlRetrofitUtils.MH5_URL + "ceshi/my-test", "测试记录")
val testParam = H5Params(HttpConfig.MH5_URL + "ceshi/my-test", "测试记录")
NewH5Activity.start(context, testParam)
}
......
package com.yidianling.tests.home.http
import com.ydl.ydlcommon.data.http.BaseResponse
import com.yidianling.tests.home.bean.TestHomeDataBean
import com.yidianling.tests.home.param.TestHomeParam
import com.yidianling.ydlcommon.http.BaseResponse
import io.reactivex.Observable
/**
......
package com.yidianling.tests.home.http
import com.ydl.ydlcommon.data.http.BaseResponse
import com.yidianling.tests.home.bean.TestHomeDataBean
import com.yidianling.ydlcommon.http.BaseResponse
import io.reactivex.Observable
import retrofit2.http.FieldMap
import retrofit2.http.FormUrlEncoded
......
package com.yidianling.tests.home.http
import com.ydl.ydlcommon.data.http.BaseResponse
import com.ydl.ydlcommon.data.http.RxUtils
import com.ydl.ydlnet.YDLHttpUtils
import com.yidianling.tests.home.bean.TestHomeDataBean
import com.yidianling.tests.home.param.TestHomeParam
import com.yidianling.ydlcommon.http.BaseResponse
import com.yidianling.ydlcommon.http.RetrofitProvider
import com.yidianling.ydlcommon.http.RxUtils
import io.reactivex.Observable
/**
......@@ -34,16 +34,11 @@ class TestHomeHttpImpl private constructor() : ITestHomeHttp {
private fun getTestHomeApi(): TestHomeApi {
if (testHomeApi == null){
testHomeApi=RetrofitProvider.getRetrofit().create(TestHomeApi::class.java)
testHomeApi=YDLHttpUtils.obtainApi(TestHomeApi::class.java)
}
return testHomeApi!!
}
// private val testHomeApi: TestHomeApi by lazy {
// RetrofitProvider.getRetrofit().create(TestHomeApi::class.java)
// }
override fun newHomeRequest(testHomeParam: TestHomeParam): Observable<BaseResponse<List<TestHomeDataBean>>> {
return RxUtils.mapObservable(testHomeParam)
.flatMap {
......
......@@ -9,7 +9,9 @@ import android.text.style.TextAppearanceSpan
import android.view.View
import android.widget.TextView
import com.ydl.ydlcommon.data.http.RxUtils
import com.ydl.ydlcommon.data.http.ThrowableConsumer
import com.ydl.ydlcommon.router.YdlCommonRouterManager
import com.ydl.ydlcommon.utils.MainUtils
import com.ydl.ydlcommon.utils.SharedPreferencesEditor
import com.yidianling.common.tools.LogUtil
import com.yidianling.tests.R
......@@ -19,11 +21,6 @@ import com.yidianling.tests.home.bean.TestHomeBodyBean
import com.yidianling.tests.home.bean.TestHomeDataBean
import com.yidianling.tests.home.config.ITestHomeConfig
import com.yidianling.tests.home.event.UpdateCouponMoneyEvent
import com.yidianling.ydlcommon.http.RxUtils
import com.yidianling.ydlcommon.http.ThrowableConsumer
import com.yidianling.ydlcommon.router.YdlCommonRouterManager
import com.yidianling.ydlcommon.utils.MainUtils
import com.yidianling.ydlcommon.utils.SharedPreferencesEditor
import de.greenrobot.event.EventBus
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.functions.Consumer
......
......@@ -4,12 +4,12 @@ import android.content.Context
import android.view.View
import android.view.ViewGroup
import android.widget.FrameLayout
import com.ydl.ydlcommon.view.banner.GlideImageLoader
import com.yidianling.common.tools.RxImageTool
import com.yidianling.tests.R
import com.yidianling.tests.home.bean.TestHomeBodyBean
import com.yidianling.tests.home.bean.TestHomeDataBean
import com.yidianling.tests.home.event.ITestHomeEvent
import com.yidianling.ydlcommon.view.banner.GlideImageLoader
import kotlinx.android.synthetic.main.testhome_banner_view.view.*
/**
......
......@@ -16,7 +16,7 @@ import com.yidianling.tests.home.bean.TestHomeBodyBean
import com.yidianling.tests.home.bean.TestHomeCategoryBean
import com.yidianling.tests.home.bean.TestHomeDataBean
import com.yidianling.tests.home.event.ITestHomeEvent
import com.yidianling.ydlcommon.utils.ScreenUtil
import com.ydl.ydlcommon.utils.ScreenUtil
import kotlinx.android.synthetic.main.testhome_category_view.view.*
import java.util.*
......
......@@ -17,7 +17,7 @@ import com.yidianling.tests.home.bean.TestHomeBodyBean
import com.yidianling.tests.home.bean.TestHomeDataBean
import com.yidianling.tests.home.event.ITestHomeEvent
import com.yidianling.tests.home.utils.TestHomeUtils
import com.yidianling.ydlcommon.utils.ScreenUtil
import com.ydl.ydlcommon.utils.ScreenUtil
import kotlinx.android.synthetic.main.testhome_recommend_first_view.view.*
/**
......
package com.yidianling.tests.list.model
import com.yidianling.ydlcommon.http.BaseCommand
import com.ydl.ydlcommon.data.http.BaseCommand
/**
......
package com.yidianling.tests.list.model.bean
import com.google.gson.annotations.SerializedName
import com.yidianling.ydlcommon.data.ShareData
import com.ydl.ydlcommon.bean.ShareData
/**
* 测试列表数据
......
package com.yidianling.tests.list.model.bean
import android.os.Parcel
import android.os.Parcelable
/**
* @author yuanwai
* @描述:红包数据bean
* @Copyright Copyright (c) 2018
* @Company 壹点灵
* @date 2018/10/23
*/
data class TestsRedPacketBean(
/**
* 红包 ID
*/
val id : String? = "",
/**
* 红包金额
*/
val coupon_money : Float? = 0F,
/**
* 用户 ID
*/
val uid : String? = "",
/**
* 红包标题
*/
val title : String? = "",
/**
* 红包说明
*/
val explain : String? = "",
/**
* 使用类型 1永久使用 2 有效期内使用
*/
val use_type : Int? = 2,
/**
* 是否选中
*/
val selected : Boolean? = false,
/**
* 截止日期
*/
val use_time_end : String? = ""): Parcelable {
constructor(parcel: Parcel) : this(
parcel.readString(),
parcel.readFloat(),
parcel.readString(),
parcel.readString(),
parcel.readString(),
parcel.readInt(),
parcel.readByte() != 0.toByte(),
parcel.readString()) {
}
override fun writeToParcel(parcel: Parcel, flags: Int) {
parcel.writeString(id)
parcel.writeFloat(coupon_money!!)
parcel.writeString(uid)
parcel.writeString(title)
parcel.writeString(explain)
parcel.writeInt(use_type!!)
parcel.writeByte(if (selected!!) 1 else 0)
parcel.writeString(use_time_end)
}
override fun describeContents(): Int {
return 0
}
companion object CREATOR : Parcelable.Creator<TestsRedPacketBean> {
override fun createFromParcel(parcel: Parcel): TestsRedPacketBean {
return TestsRedPacketBean(parcel)
}
override fun newArray(size: Int): Array<TestsRedPacketBean?> {
return arrayOfNulls(size)
}
}
}
\ No newline at end of file
package com.yidianling.tests.list.model.bean
/**
* @author yuanWai
* @描述:
* @Copyright Copyright (c) 2018
* @Company 壹点灵
* @date 2018/10/25
*/
data class TestsRedPacketParam(val p : String)
\ No newline at end of file
package com.yidianling.tests.list.presenter
import com.hannesdorfmann.mosby3.mvp.MvpNullObjectBasePresenter
import android.annotation.SuppressLint
import com.ydl.ydlcommon.data.http.RxUtils
import com.ydl.ydlcommon.data.http.ThrowableConsumer
import com.ydl.ydlcommon.mvp.base.SimplePresenter
import com.yidianling.tests.TestRetrofitApi
import com.yidianling.tests.list.model.bean.TestsRedPacketParam
import com.yidianling.tests.list.view.TestListActivityView
import com.yidianling.ydlcommon.data.YdlDataManager
import com.yidianling.ydlcommon.http.RxUtils
import com.yidianling.ydlcommon.http.ThrowableConsumer
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.functions.Consumer
import io.reactivex.schedulers.Schedulers
......@@ -16,33 +15,37 @@ import io.reactivex.schedulers.Schedulers
* TestListActivityPresenter
* Created by zqk on 17-11-22.
*/
class TestListActivityPresenter : MvpNullObjectBasePresenter<TestListActivityView>() {
class TestListActivityPresenter : SimplePresenter<TestListActivityView>() {
@SuppressLint("CheckResult")
fun fetchTestTypeList() {
TestRetrofitApi.getTestRetrofitApi().fetchTestCategory()
.compose(RxUtils.applySchedulers(mView))
.compose(RxUtils.resultJavaData())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe({ resp ->
view.onTestCategoryListFetched(resp)
mView.onTestCategoryListFetched(resp)
}, { t ->
view.onFailed(t.message)
mView.onFailed(t.message)
})
}
/**
* 请求红包列表
*/
@SuppressLint("CheckResult")
fun requestCoupon() {
YdlDataManager.getHttp().getCoupon()
RxUtils.mapObservable(TestsRedPacketParam(""))
.flatMap { TestRetrofitApi.getTestRetrofitApi().getCoupon(it) }
.subscribeOn(Schedulers.io())
.compose(RxUtils.resultData())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(Consumer {
view.couponResponse(it)
mView.couponResponse(it)
}, object : ThrowableConsumer() {
override fun accept(msg: String) {
view.onFailed(msg)
mView.onFailed(msg)
}
})
}
}
\ No newline at end of file
package com.yidianling.tests.list.presenter
import com.yidianling.tests.list.model.TestListCommand
import android.annotation.SuppressLint
import com.ydl.ydlcommon.mvp.base.SimplePresenter
import com.ydl.ydlcommon.utils.NetworkParamsUtils
import com.yidianling.tests.TestRetrofitApi
import com.yidianling.tests.list.model.TestListCommand
import com.yidianling.tests.list.view.TestListFragmentView
import com.hannesdorfmann.mosby3.mvp.MvpNullObjectBasePresenter
import com.yidianling.ydlcommon.http.YdlRetrofitUtils
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
......@@ -12,24 +13,25 @@ import io.reactivex.schedulers.Schedulers
* TestListFragmentPresenter
* Created by zqk on 17-11-22.
*/
class TestListFragmentPresenter : MvpNullObjectBasePresenter<TestListFragmentView>() {
class TestListFragmentPresenter : SimplePresenter<TestListFragmentView>() {
@SuppressLint("CheckResult")
fun fetchTestList(type: String?, currentPage: Int) {
val cmd = TestListCommand()
cmd.tab = type
cmd.page = currentPage
TestRetrofitApi.getTestRetrofitApi()
.fetchTestList(YdlRetrofitUtils.getMaps(cmd))
.fetchTestList(NetworkParamsUtils.getMaps(cmd))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe({ resp ->
view.dismissLoading()
mView.dismissLoading()
if (resp.code == 0) {
view.onTestListFetched(resp.data, currentPage)
mView.onTestListFetched(resp.data, currentPage)
} else {
view.onFailed(resp.msg)
mView.onFailed(resp.msg)
}
}, { t ->
view.onError(t)
mView.onError(t)
})
}
......
......@@ -9,27 +9,28 @@ import android.view.View
import android.widget.PopupWindow
import android.widget.TextView
import com.alibaba.android.arouter.facade.annotation.Route
import com.ydl.ydlcommon.base.BaseMvpActivity
import com.ydl.ydlcommon.bean.StatusBarOptions
import com.ydl.ydlcommon.utils.BuryPointUtils
import com.ydl.ydlcommon.utils.DisplayUtils
import com.ydl.ydlcommon.utils.StatusBarUtils
import com.ydl.ydlcommon.utils.UMEventUtils
import com.ydl.ydlcommon.utils.log.LogHelper
import com.ydl.ydlcommon.utils.remind.HttpErrorUtils
import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.ToastUtil
import com.yidianling.tests.R
import com.yidianling.tests.base.BaseMvpActivity
import com.yidianling.tests.TestsBIConstants
import com.yidianling.tests.home.utils.TestHomeUtils
import com.yidianling.tests.list.model.bean.CategotyPopItem
import com.yidianling.tests.list.model.bean.TestCategory
import com.yidianling.tests.list.model.bean.TestsRedPacketBean
import com.yidianling.tests.list.presenter.TestListActivityPresenter
import com.yidianling.tests.list.view.adapter.CategoryConditionRecyclerViewAdapter
import com.yidianling.tests.list.view.adapter.TestListPagerAdapter
import com.yidianling.tests.list.view.widget.CategoryPopupWindow
import com.yidianling.tests.router.TestsIn
import com.yidianling.tests.search.TestSearchActivity
import com.yidianling.ydlcommon.constant.UMConstants
import com.yidianling.ydlcommon.http.YdlRetrofitUtils
import com.yidianling.ydlcommon.log.LogHelper
import com.yidianling.ydlcommon.pay.redpacket.RedPacketBean
import com.yidianling.ydlcommon.tool.BuryPointUtils
import com.yidianling.ydlcommon.tool.StatusBarUtils
import com.yidianling.ydlcommon.utils.DisplayUtils
import com.yidianling.ydlcommon.utils.UMEventUtils
import kotlinx.android.synthetic.main.activity_test_category_list.*
@Route(path = "/ceshi/category_list")
......@@ -89,9 +90,8 @@ class TestCategoryListActivity : BaseMvpActivity<TestListActivityView, TestListA
}
}
override fun isAddStatusView(): Boolean {
return true
override fun getStatusViewOptions(): StatusBarOptions {
return StatusBarOptions(isAddStatusView = true)
}
override fun layoutResId(): Int {
......@@ -123,7 +123,7 @@ class TestCategoryListActivity : BaseMvpActivity<TestListActivityView, TestListA
showFilterPopupWindow()
}
presenter.fetchTestTypeList()
mPresenter.fetchTestTypeList()
vvp_test.addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
override fun onPageScrollStateChanged(state: Int) {}
......@@ -246,15 +246,15 @@ class TestCategoryListActivity : BaseMvpActivity<TestListActivityView, TestListA
override fun onError(t: Throwable) {
YdlRetrofitUtils.handleError(mContext, t)
HttpErrorUtils.handleError(mContext, t)
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if (requestCode == payRequestCode && resultCode == Activity.RESULT_OK) {
//如果 是待付款列表 则需要刷新界面
if (null != presenter) {
presenter.fetchTestTypeList()
if (null != mPresenter) {
mPresenter.fetchTestTypeList()
}
}
}
......@@ -307,11 +307,11 @@ class TestCategoryListActivity : BaseMvpActivity<TestListActivityView, TestListA
private fun updateFilterTextViewStatus(tv: TextView, text: String, isNormal: Boolean) {
tv.text = text
if (isNormal) {
tv.setTextColor(ContextCompat.getColor(this, R.color.colorTextDefault))
tv.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_arrow_drop_down_grey_500_18dp, 0)
tv.setTextColor(ContextCompat.getColor(this, R.color.platform_colorTextDefault))
tv.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.platform_ic_arrow_drop_down_grey_500_18dp, 0)
} else {
tv.setTextColor(ContextCompat.getColor(this, R.color.google_green))
tv.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_arrow_drop_down_green_18dp, 0)
tv.setTextColor(ContextCompat.getColor(this, R.color.platform_google_green))
tv.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.platform_ic_arrow_drop_down_green_18dp, 0)
}
}
......@@ -320,7 +320,7 @@ class TestCategoryListActivity : BaseMvpActivity<TestListActivityView, TestListA
}
override fun createPresenter(): TestListActivityPresenter = TestListActivityPresenter()
override fun couponResponse(list: ArrayList<RedPacketBean>) {}
override fun couponResponse(list: ArrayList<TestsRedPacketBean>) {}
override fun onResume() {
super.onResume()
......
......@@ -7,22 +7,22 @@ import android.support.v4.view.ViewPager
import android.view.View
import android.widget.PopupWindow
import com.alibaba.android.arouter.facade.annotation.Route
import com.ydl.ydlcommon.base.BaseMvpActivity
import com.ydl.ydlcommon.utils.BuryPointUtils
import com.ydl.ydlcommon.utils.PopUtils
import com.ydl.ydlcommon.utils.UMEventUtils
import com.ydl.ydlcommon.utils.log.LogHelper
import com.ydl.ydlcommon.utils.remind.HttpErrorUtils
import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.ToastUtil
import com.yidianling.tests.R
import com.yidianling.tests.base.BaseMvpActivity
import com.yidianling.tests.TestsBIConstants
import com.yidianling.tests.list.model.bean.TestCategory
import com.yidianling.tests.list.model.bean.TestsRedPacketBean
import com.yidianling.tests.list.presenter.TestListActivityPresenter
import com.yidianling.tests.list.view.adapter.TestListPagerAdapter
import com.yidianling.tests.router.TestsIn
import com.yidianling.tests.search.TestSearchActivity
import com.yidianling.ydlcommon.constant.UMConstants
import com.yidianling.ydlcommon.http.YdlRetrofitUtils
import com.yidianling.ydlcommon.log.LogHelper
import com.yidianling.ydlcommon.pay.redpacket.RedPacketBean
import com.yidianling.ydlcommon.tool.BuryPointUtils
import com.yidianling.ydlcommon.tool.PopUtils
import com.yidianling.ydlcommon.utils.UMEventUtils
import kotlinx.android.synthetic.main.activity_test_list.*
@Route(path = "/ceshi/list")
......@@ -50,7 +50,7 @@ class TestListActivity : BaseMvpActivity<TestListActivityView, TestListActivityP
0,
0)
}
presenter.fetchTestTypeList()
mPresenter.fetchTestTypeList()
viewPager.addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
override fun onPageScrollStateChanged(state: Int) {}
......@@ -80,7 +80,7 @@ class TestListActivity : BaseMvpActivity<TestListActivityView, TestListActivityP
super.onResume()
//获取红包列表
if (TestsIn.isLogin()){
presenter.requestCoupon()
mPresenter.requestCoupon()
}
}
......@@ -115,7 +115,7 @@ class TestListActivity : BaseMvpActivity<TestListActivityView, TestListActivityP
}
override fun onError(t: Throwable) {
YdlRetrofitUtils.handleError(mContext, t)
HttpErrorUtils.handleError(mContext, t)
}
private var isMine: Boolean = false
......@@ -123,7 +123,7 @@ class TestListActivity : BaseMvpActivity<TestListActivityView, TestListActivityP
private var testCategorys: MutableList<TestCategory>? = null
override fun couponResponse(list: ArrayList<RedPacketBean>) {
override fun couponResponse(list: ArrayList<TestsRedPacketBean>) {
if (null == list || list.isEmpty()){
llTestRedPacketTips.visibility = View.GONE
}else{
......@@ -141,9 +141,7 @@ class TestListActivity : BaseMvpActivity<TestListActivityView, TestListActivityP
super.onActivityResult(requestCode, resultCode, data)
if (requestCode == payRequestCode && resultCode == Activity.RESULT_OK) {
//如果 是待付款列表 则需要刷新界面
if (null != presenter){
presenter.fetchTestTypeList()
}
mPresenter.fetchTestTypeList()
}
}
......
package com.yidianling.tests.list.view
import com.hannesdorfmann.mosby3.mvp.MvpView
import com.ydl.ydlcommon.mvp.base.IView
import com.yidianling.tests.list.model.bean.TestCategory
import com.yidianling.ydlcommon.pay.redpacket.RedPacketBean
import com.yidianling.tests.list.model.bean.TestsRedPacketBean
/**
* TestListActivityView
* Created by zqk on 17-11-22.
*/
interface TestListActivityView : MvpView {
interface TestListActivityView : IView {
fun onTestCategoryListFetched(testCategoryList: MutableList<TestCategory>)
fun couponResponse(list : ArrayList<RedPacketBean>)
fun couponResponse(list : ArrayList<TestsRedPacketBean>)
fun onFailed(msg: String?)
fun onError(t: Throwable)
}
\ No newline at end of file
......@@ -9,34 +9,30 @@ import android.text.TextUtils
import android.view.View
import com.ydl.ydl_router.manager.YDLRouterManager
import com.ydl.ydl_router.manager.YDLRouterParams
import com.ydl.ydlcommon.adapter.MyBaseAdapter
import com.ydl.ydlcommon.base.BaseFragment
import com.ydl.ydlcommon.base.config.HttpConfig
import com.ydl.ydlcommon.bean.ShareData
import com.ydl.ydlcommon.data.http.RxUtils
import com.ydl.ydlcommon.data.http.ThrowableConsumer
import com.ydl.ydlcommon.router.IYDLRouterConstant
import com.ydl.ydlcommon.router.YdlCommonOut
import com.ydl.ydlcommon.router.YdlCommonRouterManager
import com.ydl.ydlcommon.utils.BuryPointUtils
import com.ydl.ydlcommon.utils.SharedPreferencesEditor
import com.ydl.ydlcommon.utils.UMEventUtils
import com.ydl.ydlcommon.view.listener.EndlessRecyclerViewScrollListener
import com.yidianling.common.tools.ToastUtil
import com.yidianling.router.RouterManager
import com.yidianling.tests.R
import com.yidianling.tests.TestRetrofitApi
import com.yidianling.tests.base.MyBaseAdapter
import com.yidianling.tests.TestsBIConstants
import com.yidianling.tests.home.event.UpdateCouponMoneyEvent
import com.yidianling.tests.home.utils.TestHomeUtils
import com.yidianling.tests.list.model.bean.Test
import com.yidianling.tests.list.model.bean.TestListData
import com.yidianling.tests.list.view.adapter.TestListRecyclerAdapter
import com.yidianling.tests.router.TestsIn
import com.yidianling.ydlcommon.BuildConfig
import com.yidianling.ydlcommon.base.BaseFragment
import com.yidianling.ydlcommon.constant.UMConstants
import com.yidianling.ydlcommon.data.ShareData
import com.yidianling.ydlcommon.http.RxUtils
import com.yidianling.ydlcommon.http.ThrowableConsumer
import com.yidianling.ydlcommon.listener.EndlessRecyclerViewScrollListener
import com.yidianling.ydlcommon.router.IYDLRouterConstant
import com.yidianling.ydlcommon.router.YdlCommonOut
import com.yidianling.ydlcommon.router.YdlCommonRouterManager
import com.yidianling.ydlcommon.tool.BuryPointUtils
import com.yidianling.ydlcommon.utils.SharedPreferencesEditor
import com.yidianling.ydlcommon.utils.UMEventUtils
import de.greenrobot.event.EventBus
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.Disposable
......@@ -45,12 +41,6 @@ import io.reactivex.schedulers.Schedulers
import kotlinx.android.synthetic.main.fragment_test_list.*
import java.util.*
class TestListFragment : BaseFragment(), MyBaseAdapter.OnItemClickListener<Test> {
override fun initDataAndEvent() {
initUiAndListener()
......@@ -167,7 +157,7 @@ class TestListFragment : BaseFragment(), MyBaseAdapter.OnItemClickListener<Test>
}
//如果列表是待支付 的话 则跳转 支付界面
if ("unpay" == category){
val url = StringBuffer(BuildConfig.MH5_URL)
val url = StringBuffer(HttpConfig.MH5_URL)
url.append("ceshi/")
url.append(data.id)
url.append("?payId=")
......@@ -177,7 +167,8 @@ class TestListFragment : BaseFragment(), MyBaseAdapter.OnItemClickListener<Test>
url.append("&orderId=")
url.append(data.id)
//跳转测试详情页
YDLRouterManager.router(IYDLRouterConstant.ROUTER_H5_H5,
YDLRouterManager.router(
IYDLRouterConstant.ROUTER_H5_H5,
YDLRouterParams().putExtra(IYDLRouterConstant.EXTRA_URL, Uri.encode(url.toString())),"")
}else{
......
package com.yidianling.tests.list.view
import com.ydl.ydlcommon.mvp.base.IView
import com.yidianling.tests.list.model.bean.TestListData
import com.hannesdorfmann.mosby3.mvp.MvpView
/**
* TestListFragmentView
* Created by zqk on 17-11-22.
*/
interface TestListFragmentView : MvpView {
interface TestListFragmentView : IView {
fun onTestListFetched(testListData: TestListData, page: Int)
fun onFailed(msg: String?)
fun dismissLoading()
......
......@@ -32,9 +32,9 @@ class CategoryConditionRecyclerViewAdapter(private val context: Context,
val item = sortItems[position]
if (holder != null) {
holder.tvSort.text = item.value
holder.tvSort.setTextColor(ContextCompat.getColor(context, R.color.color_242424))
holder.tvSort.setTextColor(ContextCompat.getColor(context, R.color.platform_color_242424))
if (!TextUtils.isEmpty(lastSelectText) && item.value.equals(lastSelectText) && position!=0){
holder.tvSort.setTextColor(ContextCompat.getColor(context, R.color.google_green))
holder.tvSort.setTextColor(ContextCompat.getColor(context, R.color.platform_google_green))
lastSelectView = holder.tvSort
}
}
......@@ -47,9 +47,9 @@ class CategoryConditionRecyclerViewAdapter(private val context: Context,
init {
itemView.setOnClickListener {
lastSelectView?.setTextColor(ContextCompat.getColor(context, R.color.color_242424))
lastSelectView?.setTextColor(ContextCompat.getColor(context, R.color.platform_color_242424))
if (adapterPosition != 0){
tvSort.setTextColor(ContextCompat.getColor(context, R.color.google_green))
tvSort.setTextColor(ContextCompat.getColor(context, R.color.platform_google_green))
}
if (adapterPosition != RecyclerView.NO_POSITION){
......
......@@ -5,10 +5,10 @@ import android.graphics.Color
import android.graphics.Typeface
import android.support.v4.app.FragmentManager
import android.support.v4.app.FragmentPagerAdapter
import com.ydl.ydlcommon.view.verticaltablayout.TabAdapter
import com.ydl.ydlcommon.view.verticaltablayout.TabView
import com.yidianling.tests.list.model.bean.TestCategory
import com.yidianling.tests.list.view.TestListFragment
import com.yidianling.ydlcommon.view.verticaltablayout.TabAdapter
import com.yidianling.ydlcommon.view.verticaltablayout.TabView
/**
* 测试列表ViewPager适配器
......
......@@ -9,9 +9,10 @@ import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import com.ydl.ydl_image.module.GlideApp
import com.ydl.ydlcommon.adapter.MyBaseAdapter
import com.yidianling.common.tools.RxImageTool
import com.yidianling.tests.R
import com.yidianling.tests.base.MyBaseAdapter
import com.yidianling.tests.home.utils.TestHomeUtils
import com.yidianling.tests.list.model.bean.Test
import kotlinx.android.synthetic.main.testlist_item_view.view.*
......
package com.yidianling.tests.modular
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.ydl.ydl_router.manager.YDLRouterManager
import com.ydl.ydl_router.manager.YDLRouterParams
import com.ydl.ydlcommon.base.config.HttpConfig
import com.ydl.ydlcommon.router.IYDLRouterConstant
import com.yidianling.tests.api.service.ITestsApiSerivice
/**
* Created by haorui on 2019-10-31 .
* Des:
*/
@Route(path = "/tests/TestsApiService")
public class TestsApiServiceImp : ITestsApiSerivice {
override fun init(context: Context?) {
}
override fun testH5Result(testResultId: String) {
YDLRouterManager.router(
IYDLRouterConstant.ROUTER_H5_H5,
YDLRouterParams().putExtra(IYDLRouterConstant.EXTRA_URL, HttpConfig.MH5_URL+"ceshi/result/"+testResultId),"")
}
override fun testDetailH5(testId: String) {
YDLRouterManager.router(
IYDLRouterConstant.ROUTER_H5_H5,
YDLRouterParams().putExtra(IYDLRouterConstant.EXTRA_URL, HttpConfig.MH5_URL+"ceshi/"+testId),"")
}
}
\ No newline at end of file
......@@ -4,35 +4,32 @@ import android.app.Activity
import android.content.Intent
import com.ydl.ydl_router.manager.YDLRouterManager
import com.ydl.ydl_router.manager.YDLRouterParams
import com.ydl.ydlcommon.base.config.HttpConfig
import com.ydl.ydlcommon.router.IYDLRouterConstant
import com.yidianling.router.tests.ITestsRouter
import com.yidianling.tests.answer.TestAnswerActivity
import com.yidianling.tests.detail.TestDetailActivity
import com.yidianling.tests.result.jump.JumpTestResultActivity
import com.yidianling.ydlcommon.BuildConfig
import com.yidianling.ydlcommon.router.IYDLRouterConstant
class TestsRouterImp : ITestsRouter {
override fun testH5Result(testResultId: String) {
YDLRouterManager.router(IYDLRouterConstant.ROUTER_H5_H5,
YDLRouterParams().putExtra(IYDLRouterConstant.EXTRA_URL, BuildConfig.MH5_URL+"ceshi/result/"+testResultId),"")
YDLRouterParams().putExtra(IYDLRouterConstant.EXTRA_URL, HttpConfig.MH5_URL+"ceshi/result/"+testResultId),"")
}
override fun testDetailH5(testId: String) {
YDLRouterManager.router(IYDLRouterConstant.ROUTER_H5_H5,
YDLRouterParams().putExtra(IYDLRouterConstant.EXTRA_URL, BuildConfig.MH5_URL+"ceshi/"+testId),"")
YDLRouterParams().putExtra(IYDLRouterConstant.EXTRA_URL, HttpConfig.MH5_URL+"ceshi/"+testId),"")
}
override fun testDetailIntent(activity: Activity, testId: Int): Intent {
return TestDetailActivity.newIntent(activity, testId.toString())
return Intent()
}
override fun testResultIntent(activity: Activity, testResultId: Int): Intent {
return JumpTestResultActivity.newIntent(activity, testResultId.toString())
return Intent()
}
override fun testAnswerIntent(activity: Activity): Intent {
return TestAnswerActivity.newIntent(activity)
return Intent()
}
}
\ No newline at end of file
......@@ -4,9 +4,9 @@ import android.support.v7.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.yidianling.tests.list.model.bean.Test
import com.ydl.ydlcommon.adapter.MyBaseAdapter
import com.yidianling.tests.R
import com.yidianling.tests.base.MyBaseAdapter
import com.yidianling.tests.list.model.bean.Test
import kotlinx.android.synthetic.main.item_hot_test.view.*
/**
......
......@@ -15,18 +15,19 @@ import android.view.inputmethod.InputMethodManager
import android.widget.LinearLayout
import android.widget.TextView
import cn.lankton.flowlayout.FlowLayout
import com.ydl.ydlcommon.adapter.MyBaseAdapter
import com.ydl.ydlcommon.base.BaseMvpActivity
import com.ydl.ydlcommon.bean.StatusBarOptions
import com.ydl.ydlcommon.utils.SharedPreferencesEditor
import com.ydl.ydlcommon.view.listener.EndlessRecyclerViewScrollListener
import com.yidianling.common.tools.ToastUtil
import com.yidianling.router.RouterManager
import com.yidianling.tests.R
import com.yidianling.tests.base.BaseMvpActivity
import com.yidianling.tests.base.MyBaseAdapter
import com.yidianling.tests.home.event.UpdateCouponMoneyEvent
import com.yidianling.tests.home.utils.TestHomeUtils
import com.yidianling.tests.list.model.bean.RecommendSearchItemBean
import com.yidianling.tests.list.model.bean.Test
import com.yidianling.tests.list.view.adapter.TestListRecyclerAdapter
import com.yidianling.ydlcommon.listener.EndlessRecyclerViewScrollListener
import com.yidianling.ydlcommon.utils.SharedPreferencesEditor
import de.greenrobot.event.EventBus
import kotlinx.android.synthetic.main.activity_test_search.*
import kotlinx.android.synthetic.main.item_hot_search.view.*
......@@ -34,12 +35,9 @@ import kotlinx.android.synthetic.main.item_hot_search.view.*
class TestSearchActivity : BaseMvpActivity<TestSearchView, TestSearchPresenter>(), TestSearchView, View.OnClickListener {
private var isFirstLoad = true
override fun isAddStatusView(): Boolean {
return true
}
override fun statusBarDarkMode(): Boolean {
return true
override fun getStatusViewOptions(): StatusBarOptions {
return StatusBarOptions(true, statusBarDarkMode = true)
}
override fun layoutResId(): Int {
......@@ -82,8 +80,8 @@ class TestSearchActivity : BaseMvpActivity<TestSearchView, TestSearchPresenter>(
searchAdapter?.couponMoney = lastCouponMoney
hotSearchAdapter?.couponMoney = lastCouponMoney
}
presenter.fetchHotTests()
presenter.hotRecommendRequest()
mPresenter.fetchHotTests()
mPresenter.hotRecommendRequest()
}
private lateinit var onScrollListener: EndlessRecyclerViewScrollListener
......@@ -128,7 +126,7 @@ class TestSearchActivity : BaseMvpActivity<TestSearchView, TestSearchPresenter>(
onScrollListener = object : EndlessRecyclerViewScrollListener(layoutManager) {
override fun onLoadMore(page: Int, totalItemsCount: Int, view: RecyclerView?) {
if (isSearch) {
presenter.searchTests(keyword, searchListCurrentPage)
mPresenter.searchTests(keyword, searchListCurrentPage)
}
}
}
......@@ -186,7 +184,7 @@ class TestSearchActivity : BaseMvpActivity<TestSearchView, TestSearchPresenter>(
isSearch = true
searchListCurrentPage = 1
onScrollListener.resetState()
presenter.searchTests(keyword, searchListCurrentPage)
mPresenter.searchTests(keyword, searchListCurrentPage)
}
fun hideSoftInput() {
......
package com.yidianling.tests.search
import android.annotation.SuppressLint
import com.google.gson.Gson
import com.google.gson.reflect.TypeToken
import com.hannesdorfmann.mosby3.mvp.MvpNullObjectBasePresenter
import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.data.http.RxUtils
import com.ydl.ydlcommon.data.http.ThrowableConsumer
import com.ydl.ydlcommon.mvp.base.SimplePresenter
import com.ydl.ydlcommon.utils.NetworkParamsUtils
import com.ydl.ydlcommon.utils.remind.HttpErrorUtils
import com.yidianling.common.tools.ToastUtil
import com.yidianling.tests.TestRetrofitApi
import com.yidianling.tests.home.http.TestHomeDataManager
import com.yidianling.tests.home.param.TestHomeParam
import com.yidianling.tests.list.model.TestListCommand
import com.yidianling.tests.list.model.bean.Test
import com.yidianling.ydlcommon.app.YdlCommonApp
import com.yidianling.ydlcommon.http.RxUtils
import com.yidianling.ydlcommon.http.ThrowableConsumer
import com.yidianling.ydlcommon.http.YdlRetrofitUtils
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.functions.Consumer
import io.reactivex.schedulers.Schedulers
......@@ -23,28 +23,28 @@ import io.reactivex.schedulers.Schedulers
* TestSearchPresenter
* Created by zqk on 17-12-5.
*/
class TestSearchPresenter : MvpNullObjectBasePresenter<TestSearchView>() {
class TestSearchPresenter : SimplePresenter<TestSearchView>() {
@SuppressLint("CheckResult")
fun fetchHotTests() {
view.showLoadingView()
mView.showLoadingView()
val cmd = TestListCommand()
cmd.tab = "hot_test"
cmd.page = 1
TestRetrofitApi.getTestRetrofitApi()
.fetchTopSearch()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.compose(RxUtils.applySchedulers(mView))
.subscribe({ resp ->
if (resp.code == "200") {
view.hideNoResultView()
view.onRecommendSearchListResponse(resp.data)
mView.hideNoResultView()
mView.onRecommendSearchListResponse(resp.data)
} else {
ToastUtil.toastShort(resp.msg)
view.hideLoadingView()
mView.hideLoadingView()
}
}, { throwble ->
YdlRetrofitUtils.handleError(YdlCommonApp.getApp(), throwble)
HttpErrorUtils.handleError(BaseApp.getApp(), throwble)
})
}
......@@ -52,60 +52,59 @@ class TestSearchPresenter : MvpNullObjectBasePresenter<TestSearchView>() {
/**
* 测评热门推荐
*/
@SuppressLint("CheckResult")
fun hotRecommendRequest() {
view.showLoadingView()
mView.showLoadingView()
TestHomeDataManager
.getHttp()
.newHomeRequest(TestHomeParam( 0))
.compose(RxUtils.applySchedulers(mView))
.compose(RxUtils.resultData())
.map { it }
.filter { it != null }
.observeOn(AndroidSchedulers.mainThread())
.subscribe(Consumer {
if (it[3].body!=null){
var jsonStr = Gson().toJson(it[3].body)
val list = Gson().fromJson<MutableList<Test>>(jsonStr, object : TypeToken<MutableList<Test>>() {
}.type)
view.hideNoResultView()
view.onHotRecommendResponse(list)
mView.hideNoResultView()
mView.onHotRecommendResponse(list)
}else{
view.hideLoadingView()
mView.hideLoadingView()
}
}, object : ThrowableConsumer() {
override fun accept(msg: String) {
view.showError(msg)
mView.showError(msg)
}
})
}
fun searchTests(keyword: String?, page: Int) {
if (page == 1) {
view.showLoadingView()
mView.showLoadingView()
}
val cmd = TestListCommand()
cmd.tab = "search"
cmd.page = page
cmd.keyword = keyword
TestRetrofitApi.getTestRetrofitApi()
.fetchTestList(YdlRetrofitUtils.getMaps(cmd))
.fetchTestList(NetworkParamsUtils.getMaps(cmd))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe({ resp ->
if (resp.code == 0) {
view.hideLoadingView()
mView.hideLoadingView()
if (page == 1 && (resp.data.testList == null || resp.data.testList?.size == 0)) {
view.showNoResultView()
view.showSearchResultView(resp.data.testList, page)
mView.showNoResultView()
mView.showSearchResultView(resp.data.testList, page)
} else {
view.hideNoResultView()
view.showSearchResultView(resp.data.testList, page)
mView.hideNoResultView()
mView.showSearchResultView(resp.data.testList, page)
}
} else {
view.hideLoadingView()
mView.hideLoadingView()
ToastUtil.toastShort(resp.msg)
}
}, { throwble ->
YdlRetrofitUtils.handleError(YdlCommonApp.getApp(), throwble)
HttpErrorUtils.handleError(BaseApp.getApp(), throwble)
})
}
}
\ No newline at end of file
package com.yidianling.tests.search
import com.hannesdorfmann.mosby3.mvp.MvpView
import com.ydl.ydlcommon.mvp.base.IView
import com.yidianling.tests.list.model.bean.RecommendSearchItemBean
import com.yidianling.tests.list.model.bean.Test
......@@ -8,7 +8,7 @@ import com.yidianling.tests.list.model.bean.Test
* TestSearchView
* Created by zqk on 17-12-5.
*/
interface TestSearchView : MvpView {
interface TestSearchView : IView {
fun showLoadingView()
fun hideLoadingView()
......
package com.yidianling.tests.api.service
import com.alibaba.android.arouter.facade.template.IProvider
interface ITestsApiSerivice : IProvider {
fun testDetailH5(testId: String)
fun testH5Result(testResultId: String)
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="true" android:state_pressed="true">
<shape android:shape="rectangle">
<stroke android:width="1dp" android:color="@color/google_green" />
<stroke android:width="1dp" android:color="@color/platform_google_green" />
<corners android:radius="100dp"/>
<solid android:color="#cacaca"/>
</shape>
......@@ -10,7 +10,7 @@
<item android:state_enabled="true" android:state_pressed="false">
<shape android:shape="rectangle">
<stroke android:width="1dp" android:color="@color/google_green" />
<stroke android:width="1dp" android:color="@color/platform_google_green" />
<corners android:radius="100dp"/>
<solid android:color="@color/white"/>
</shape>
......
......@@ -3,14 +3,14 @@
<item android:state_enabled="true" android:state_pressed="true">
<shape android:shape="rectangle">
<corners android:radius="100dp"/>
<solid android:color="@color/google_green_dark"/>
<solid android:color="@color/platform_google_green_dark"/>
</shape>
</item>
<item android:state_enabled="true" android:state_pressed="false">
<shape android:shape="rectangle">
<corners android:radius="100dp"/>
<solid android:color="@color/google_green"/>
<solid android:color="@color/platform_google_green"/>
</shape>
</item>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="true" android:state_pressed="true">
<color android:color="@color/google_green_dark" />
<color android:color="@color/platform_google_green_dark" />
</item>
<item android:state_enabled="true" android:state_pressed="false">
<color android:color="@color/google_green" />
<color android:color="@color/platform_google_green" />
</item>
</selector>
\ No newline at end of file
......@@ -3,8 +3,8 @@
xmlns:tools="http://schemas.android.com/tools"
tools:ignore="MissingDefaultResource">
<corners android:radius="@dimen/dp_20"/>
<corners android:radius="@dimen/platform_dp_20"/>
<solid android:color="@color/color_F7F7F7"/>
<solid android:color="@color/platform_color_F7F7F7"/>
</shape>
\ No newline at end of file
......@@ -8,14 +8,14 @@
<item android:id="@android:id/secondaryProgress">
<clip>
<shape>
<solid android:color="@color/google_green" />
<solid android:color="@color/platform_google_green" />
</shape>
</clip>
</item>
<item android:id="@android:id/progress">
<clip>
<shape>
<solid android:color="@color/google_green" />
<solid android:color="@color/platform_google_green" />
</shape>
</clip>
</item>
......
......@@ -5,11 +5,12 @@
android:layout_height="match_parent"
android:orientation="vertical">
<com.yidianling.ydlcommon.view.TitleBar
<com.ydl.ydlcommon.view.TitleBar
android:layout_width="match_parent"
android:layout_height="@dimen/title_bar_height"
app:left_start_icon="@drawable/toolbar_back"
app:title_text="最新联系人" />
android:layout_height="@dimen/platform_title_bar_height"
app:pa_left_start_icon="@drawable/platform_toolbar_back"
app:pa_title_text="最新联系人" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
......
<?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:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
tools:context=".answer.TestAnswerActivity">
<TextView
android:id="@+id/tvCurrent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/google_green"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="@+id/tvTotal"
app:layout_constraintEnd_toStartOf="@+id/tvTotal"
tools:text="2" />
<TextView
android:id="@+id/tvTotal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
android:layout_marginRight="24dp"
android:textColor="@color/color_grey_888888"
android:layout_marginTop="24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/titleBar"
tools:text="/27" />
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="0dp"
android:layout_height="2dp"
android:layout_marginEnd="24dp"
android:layout_marginStart="24dp"
android:layout_marginTop="8dp"
android:progressDrawable="@drawable/progressbar_test"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvTotal"
tools:progress="30" />
<com.ydl.ydlcommon.view.TitleBar
android:id="@+id/titleBar"
android:layout_width="match_parent"
android:layout_height="@dimen/title_bar_height"
app:pa_left_start_icon="@drawable/toolbar_back"
app:pa_right_iv="@drawable/more_green"
app:pa_right_end_icon="@drawable/share"
app:pa_title_text="心理测试" />
<FrameLayout
android:id="@+id/flContainer"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/progressBar">
</FrameLayout>
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
......@@ -9,7 +9,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/title_bar_height"
android:layout_height="@dimen/platform_title_bar_height"
android:background="@color/white"
android:gravity="center_vertical"
>
......@@ -46,7 +46,7 @@
android:gravity="center_vertical"
android:text="@string/search"
android:textColor="#BFBFBF"
android:textSize="@dimen/default_text_size_small"
android:textSize="@dimen/platform_default_text_size_small"
android:textStyle="normal"
android:typeface="sans"/>
......@@ -61,14 +61,14 @@
android:orientation="horizontal"
tools:context="q.rorbin.verticaltablayoutdemo.TabFragmentActivity">
<com.yidianling.ydlcommon.view.verticaltablayout.VerticalTabLayout
<com.ydl.ydlcommon.view.verticaltablayout.VerticalTabLayout
android:id="@+id/vt_test_search"
android:layout_width="72dp"
android:layout_height="match_parent"
android:background="#F7F7F7"
app:tab_height="44dp"
app:tab_indicator_margin="13dp"
app:tab_mode="scrollable"
app:pa_tab_height="44dp"
app:pa_tab_indicator_margin="13dp"
app:pa_tab_mode="scrollable"
/>
<LinearLayout
......@@ -86,28 +86,28 @@
android:orientation="horizontal"
>
<com.yidianling.ydlcommon.view.DrawableRightTextView
<com.ydl.ydlcommon.view.DrawableRightTextView
android:id="@+id/dr_sort"
style="@style/FilterTextViewStyle"
android:layout_width="wrap_content"
android:layout_height="44dp"
android:layout_marginLeft="@dimen/dp_16"
android:drawableEnd="@drawable/ic_arrow_drop_down_grey_500_18dp"
android:drawableRight="@drawable/ic_arrow_drop_down_grey_500_18dp"
android:layout_marginLeft="@dimen/platform_dp_16"
android:drawableEnd="@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:drawableRight="@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:text="综合排序"
android:textColor="@color/color_242424"
android:textColor="@color/platform_color_242424"
/>
<com.yidianling.ydlcommon.view.DrawableRightTextView
<com.ydl.ydlcommon.view.DrawableRightTextView
android:id="@+id/dr_filter"
style="@style/FilterTextViewStyle"
android:layout_width="wrap_content"
android:layout_height="44dp"
android:drawableEnd="@drawable/ic_arrow_drop_down_grey_500_18dp"
android:drawableRight="@drawable/ic_arrow_drop_down_grey_500_18dp"
android:drawableEnd="@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:drawableRight="@drawable/platform_ic_arrow_drop_down_grey_500_18dp"
android:paddingLeft="15dp"
android:text="全部"
android:textColor="@color/color_242424"
android:textColor="@color/platform_color_242424"
/>
</LinearLayout>
......@@ -115,7 +115,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.yidianling.ydlcommon.view.verticaltablayout.VerticalViewPager
<com.ydl.ydlcommon.view.verticaltablayout.VerticalViewPager
android:id="@+id/vvp_test"
android:layout_width="match_parent"
android:layout_height="match_parent"
......
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<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:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
tools:ignore="ResourceName">
<com.yidianling.ydlcommon.view.TitleBar
<com.ydl.ydlcommon.view.TitleBar
android:id="@+id/title_bar"
android:layout_width="match_parent"
android:layout_height="@dimen/title_bar_height"
android:layout_height="@dimen/platform_title_bar_height"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:left_start_icon="@drawable/toolbar_back"
app:pa_left_start_icon="@drawable/platform_toolbar_back"
app:right_iv="@drawable/more_green"
app:right_start_icon="@drawable/share"
app:title_text="测试介绍" />
app:pa_title_text="测试介绍" />
<ScrollView
android:id="@+id/scrollView"
......@@ -100,7 +102,7 @@
android:layout_marginStart="24dp"
android:layout_marginTop="16dp"
android:lineSpacingExtra="8sp"
android:textColor="@color/color_black_333333"
android:textColor="@color/platform_color_black_333333"
android:textSize="16sp"
tools:text="每个人都会遇到压力,您想知道自己的压力状态吗?赶紧点击测试一下吧!" />
......
......@@ -7,50 +7,52 @@
android:orientation="vertical"
tools:context=".list.view.TestListActivity">
<com.yidianling.ydlcommon.view.TitleBar
<com.ydl.ydlcommon.view.TitleBar
android:id="@+id/titleBar"
android:layout_width="match_parent"
android:layout_height="@dimen/title_bar_height"
android:layout_height="@dimen/platform_title_bar_height"
app:bm_line_color="@color/transparent"
app:left_start_icon="@drawable/toolbar_back"
app:pa_left_start_icon="@drawable/platform_toolbar_back"
app:right_iv="@drawable/more12x"
app:right_start_icon="@drawable/icon_navsearch_green"
app:title_text="心理测试" />
app:pa_title_text="心理测试" />
<LinearLayout
android:id="@+id/llTestRedPacketTips"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_36"
android:layout_height="@dimen/platform_dp_36"
android:orientation="horizontal"
android:visibility="gone"
android:background="@color/color_FFEBE0">
android:background="@color/platform_color_FFEBE0">
<ImageView
android:layout_width="@dimen/dp_14"
android:layout_height="@dimen/dp_17"
android:layout_width="@dimen/platform_dp_14"
android:layout_height="@dimen/platform_dp_17"
android:layout_gravity="center_vertical"
android:layout_marginStart="@dimen/dp_15"
android:layout_marginStart="@dimen/platform_dp_15"
android:background="@drawable/test_redpacket" />
<TextView
android:id="@+id/tvTestRedPacketTips"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_12"
android:textSize="@dimen/dp_12"
android:textColor="@color/color_FF5B05"
android:layout_marginStart="@dimen/platform_dp_12"
android:textSize="@dimen/platform_dp_12"
android:textColor="@color/platform_color_FF5B05"
android:layout_gravity="center_vertical"
tools:text="还有5个心理测试红包等你使用"/>
</LinearLayout>
<android.support.design.widget.TabLayout
android:id="@+id/tabLayout"
android:layout_width="match_parent"
android:layout_height="40dp"
app:tabIndicatorColor="@color/google_green"
app:tabIndicatorColor="@color/platform_platform_google_green"
app:tabMode="scrollable"
app:tabSelectedTextColor="@color/google_green" />
app:tabSelectedTextColor="@color/platform_platform_google_green" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/divide_color" />
android:background="@color/platform_divide_color" />
<android.support.v4.view.ViewPager
......
<?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:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
tools:context="com.yidianling.tests.result.TestResultActivity">
<com.yidianling.ydlcommon.view.TitleBar
android:id="@+id/titleBar"
android:layout_width="match_parent"
android:layout_height="@dimen/title_bar_height"
app:left_start_icon="@drawable/toolbar_back"
app:right_end_icon="@drawable/share"
app:right_iv="@drawable/more_green"
app:title_text="@string/test_result" />
<LinearLayout
android:id="@+id/llButtons"
android:layout_width="match_parent"
android:layout_height="60dp"
android:gravity="center"
android:orientation="horizontal"
android:background="@drawable/bg_bottom_panel"
android:paddingLeft="24dp"
android:paddingRight="24dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<Button
android:id="@+id/btnTestAgain"
style="?android:attr/borderlessButtonStyle"
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_weight="1"
android:background="@drawable/bg_btn_big_corner_border_green"
android:text="@string/test_again"
android:textColor="@color/google_green"
android:textSize="16sp" />
<Button
android:id="@+id/btnSendToExpert"
style="?android:attr/borderlessButtonStyle"
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_marginLeft="40dp"
android:layout_marginStart="40dp"
android:layout_weight="1"
android:background="@drawable/bg_btn_big_corner_green"
android:text="@string/send_to_expert"
android:textColor="@color/white"
android:textSize="16sp"
android:visibility="gone"
tools:visibility="visible" />
</LinearLayout>
<ScrollView
android:id="@+id/scrollView"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@id/llButtons"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/titleBar">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="16dp"
android:paddingLeft="24dp"
android:paddingRight="24dp"
android:paddingTop="16dp">
<TextView
android:id="@+id/tvTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:gravity="center_horizontal"
android:textSize="20sp"
android:textStyle="bold"
tools:text="你偏向顺从还是独立" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:drawableLeft="@drawable/ic_result"
android:drawablePadding="8dp"
android:drawableStart="@drawable/ic_result"
android:text="@string/test_result"
android:textColor="@color/google_green"
android:textSize="16sp" />
<TextView
android:id="@+id/tvDesc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:lineSpacingExtra="8dp"
android:textSize="16sp"
tools:text="内内向型性格内向型性格内向型性格内向型性格内向型性格内向型性格内向型性格内向型性格向型性格" />
<LinearLayout
android:id="@+id/llDesc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:orientation="vertical"
android:visibility="gone" />
<TextView
android:id="@+id/tvAnalyseLabel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="18dp"
android:drawableLeft="@drawable/ic_desc"
android:drawablePadding="8dp"
android:drawableStart="@drawable/ic_desc"
android:text="@string/introduction"
android:textColor="@color/google_green"
android:textSize="16sp"
android:visibility="gone"
tools:visibility="visible" />
<TextView
android:id="@+id/tvAnalyse"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:lineSpacingExtra="8sp"
android:textSize="16sp"
android:visibility="gone"
tools:text="内向型性格 " />
<TextView
android:id="@+id/tvTestAnswer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="18dp"
android:drawableLeft="@drawable/ic_answer"
android:drawablePadding="8dp"
android:drawableStart="@drawable/ic_answer"
android:text="@string/test_answer"
android:textColor="@color/google_green"
android:textSize="16sp"
android:visibility="gone"
tools:visibility="gone" />
<LinearLayout
android:id="@+id/llAnswers"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:orientation="vertical"
android:visibility="gone" />
</LinearLayout>
</ScrollView>
<FrameLayout
android:id="@+id/flLoading"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/white"
android:paddingBottom="60dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/titleBar"
tools:visibility="gone">
<ProgressBar
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center" />
</FrameLayout>
</android.support.constraint.ConstraintLayout>
......@@ -15,7 +15,7 @@
android:gravity="center_vertical"
app:layout_constraintTop_toTopOf="parent">
<com.yidianling.ydlcommon.view.DeleteEditTextView
<com.ydl.ydlcommon.view.DeleteEditTextView
android:id="@+id/etSearch"
android:layout_width="0dp"
android:layout_height="36dp"
......@@ -33,7 +33,7 @@
android:lines="1"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:textCursorDrawable="@color/color_42C1FF"
android:textCursorDrawable="@color/platform_color_42C1FF"
android:textSize="14sp" />
<TextView
......@@ -42,8 +42,8 @@
android:layout_height="wrap_content"
android:layout_marginRight="6dp"
android:padding="10dp"
android:text="@string/cancel"
android:textColor="@color/color_999999" />
android:text="@string/platform_cancel"
android:textColor="@color/platform_color_999999" />
</LinearLayout>
......@@ -82,7 +82,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="30dp"
android:src="@drawable/ico_img_zixun_empty"
android:src="@drawable/platform_ico_img_zixun_empty"
android:visibility="gone"
tools:visibility="visible" />
......
<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=".answer.TestAnswerFragment">
<android.support.v7.widget.RecyclerView
android:id="@+id/rvAnswerList"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="24dp"
android:paddingRight="24dp"
android:overScrollMode="never" />
</FrameLayout>
......@@ -18,8 +18,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="推荐搜索"
android:textColor="@color/color_999999"
android:textSize="@dimen/dp_12"
android:textColor="@color/platform_color_999999"
android:textSize="@dimen/platform_dp_12"
/>
<cn.lankton.flowlayout.FlowLayout
......@@ -35,7 +35,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="热门推荐"
android:textColor="@color/color_999999"
android:textSize="@dimen/dp_12"
android:textColor="@color/platform_color_999999"
android:textSize="@dimen/platform_dp_12"
/>
</LinearLayout>
\ No newline at end of file
......@@ -15,7 +15,7 @@
android:layout_marginRight="123dp"
android:ellipsize="end"
android:maxLines="1"
android:textColor="@color/color_333333"
android:textColor="@color/platform_color_333333"
android:textSize="@dimen/sp_16"
android:textStyle="bold"
tools:text="你的心理足够成熟么你的心理足够成熟么"
......
......@@ -7,11 +7,11 @@
android:layout_marginBottom="6dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:background="@drawable/bg_radius_line_green_5"
android:background="@drawable/platform_bg_radius_line_green_5"
android:gravity="center"
android:orientation="vertical"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:textColor="@color/google_green"
android:textColor="@color/platform_google_green"
tools:text="自闭症" />
......@@ -11,7 +11,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:textColor="@color/default_text_color"
android:textColor="@color/platform_default_text_color"
android:textSize="14sp"
tools:text="测一测你多容易感情用事" />
......@@ -20,5 +20,5 @@
android:layout_height="1dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:background="@color/divide_color" />
android:background="@color/platform_divide_color" />
</LinearLayout>
\ No newline at end of file
......@@ -5,5 +5,5 @@
android:layout_marginTop="8dp"
android:padding="16dp"
android:text="@string/recommend_test"
android:textColor="@color/color_black_333333" />
android:textColor="@color/platform_color_black_333333" />
......@@ -12,7 +12,7 @@
android:orientation="vertical"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:textColor="@color/color_333333"
android:textColor="@color/platform_color_333333"
tools:text="自闭症"
tools:ignore="MissingDefaultResource"/>
......@@ -14,7 +14,7 @@
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:textSize="14sp"
android:textColor="@color/color_242424"
android:textColor="@color/platform_color_242424"
tools:text="智能排序" />
</RelativeLayout>
<?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:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
>
<TextView
android:id="@+id/tvNo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:paddingBottom="6dp"
android:paddingTop="6dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="A" />
<TextView
android:id="@+id/tvAnswer"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
android:layout_marginEnd="12dp"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:gravity="center_vertical"
android:textSize="16sp"
android:paddingBottom="6dp"
android:lineSpacingExtra="6sp"
android:paddingTop="6dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/radioButton"
app:layout_constraintStart_toEndOf="@+id/tvNo"
app:layout_constraintTop_toTopOf="parent"
tools:text="测测试选项测试选项测试选项测试选项测试选项测试选项测试选项试选项" />
<RadioButton
android:id="@+id/radioButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
android:button="@drawable/bg_btn_radio"
android:clickable="false"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="20dp"
android:paddingTop="34dp">
<Button
android:id="@+id/btnGoBefore"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:background="@drawable/bg_btn_big_corner_border_green"
android:drawableLeft="@drawable/ic_back"
android:drawablePadding="8dp"
android:drawableStart="@drawable/ic_back"
android:paddingLeft="34dp"
android:paddingRight="34dp"
android:text="@string/last_question"
android:textColor="@color/google_green"
android:textSize="16sp" />
</FrameLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="16dp"
android:paddingTop="16dp">
<TextView
android:id="@+id/tvQuestion"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/color_black_333333"
android:textSize="18sp"
tools:text="觉得时间不够用,所以分秒必争" />
<ImageView
android:id="@+id/ivImage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:adjustViewBounds="true"
android:contentDescription="@null"
android:scaleType="fitCenter"
android:visibility="gone" />
</LinearLayout>
\ No newline at end of file
......@@ -17,7 +17,7 @@
android:maxLines="1"
android:textSize="@dimen/sp_16"
android:textStyle="bold"
android:textColor="@color/color_333333"
android:textColor="@color/platform_color_333333"
tools:text="你的心理足够成熟么你的心理足够成熟么"/>
<TextView
......@@ -42,7 +42,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/cv_recom"
android:layout_marginTop="@dimen/dp_12"
android:layout_marginTop="@dimen/platform_dp_12"
android:layout_marginLeft="15dp"
android:background="@drawable/testhome_recom_price_bg"
android:gravity="center"
......
......@@ -29,5 +29,5 @@
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="@id/sdv_head"
android:background="@color/divide_color" />
android:background="@color/platform_divide_color" />
</RelativeLayout>
\ No newline at end of file
......@@ -19,16 +19,16 @@
android:layout_width="match_parent"
android:layout_height="146dp">
<com.yidianling.ydlcommon.view.banner.Banner
<com.ydl.ydlcommon.view.banner.Banner
android:id="@+id/banner"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:indicator_different_width="14dp"
app:indicator_drawable_selected="@drawable/testhome_tip_select"
app:indicator_drawable_unselected="@drawable/testhome_tip_unselect"
app:indicator_height="5dp"
app:indicator_margin="1.25dp"
app:is_selected_same_unselected="false" />
app:pa_indicator_different_width="14dp"
app:pa_indicator_drawable_selected="@drawable/testhome_tip_select"
app:pa_indicator_drawable_unselected="@drawable/testhome_tip_unselect"
app:pa_indicator_height="5dp"
app:pa_indicator_margin="1.25dp"
app:pa_is_selected_same_unselected="false" />
</FrameLayout>
</android.support.v7.widget.CardView>
......
......@@ -33,7 +33,7 @@
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginTop="@dimen/platform_dp_10"
android:background="@drawable/testhome_recom_price_bg"
android:gravity="center"
android:paddingBottom="2dp"
......
......@@ -67,7 +67,7 @@
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginTop="@dimen/platform_dp_10"
android:background="@drawable/testhome_recom_price_bg"
android:gravity="center"
android:paddingBottom="2dp"
......
......@@ -7,7 +7,7 @@
android:id="@+id/tv_recomTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/sp_16"
android:textSize="@dimen/platform_sp_16"
android:textStyle="bold"
android:layout_marginTop="20dp"
android:layout_marginLeft="15dp"
......@@ -38,7 +38,7 @@
android:paddingBottom="2dp"
android:layout_alignBottom="@+id/tv_recomNum"
android:gravity="center"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginTop="@dimen/platform_dp_10"
android:layout_marginLeft="15dp"
android:textSize="11dp"
android:textColor="#34CD65"
......
......@@ -6,7 +6,7 @@ modular {
modules {
xlzx {
groupId = "com.ydl"
artifactId = "m-xxx-module-xlzx"
artifactId = "m-user-module-xlzx"
// 上报的 心理咨询 业务模块 aar 包的版本号
version = "0.0.19"
}
......@@ -24,7 +24,7 @@ modular {
groupId = "com.ydl"
artifactId = "m-user-api"
//开发时注释掉版本号,发布api时打开
version = "0.0.5"
// version = "0.0.5"
// API 层打包时需要引入的依赖
apiDependencies {
implementation "com.google.code.gson:gson:2.8.2"
......
/*___Generated_by_IDEA___*/
package com.yidianling.user;
/* This stub is only used by the IDE. It is NOT the BuildConfig class actually packed into the APK */
public final class BuildConfig {
public final static boolean DEBUG = Boolean.parseBoolean(null);
}
\ No newline at end of file
/*___Generated_by_IDEA___*/
package com.yidianling.user;
/* This stub is only used by the IDE. It is NOT the Manifest class actually packed into the APK */
public final class Manifest {
}
\ No newline at end of file
/*___Generated_by_IDEA___*/
package com.yidianling.user;
/* This stub is only used by the IDE. It is NOT the R class actually packed into the APK */
public final class R {
}
\ No newline at end of file
......@@ -8,6 +8,7 @@ import com.umeng.socialize.UMShareAPI
import com.ydl.ydlcommon.base.delegate.IAppLifecycles
import com.ydl.ydlcommon.modular.ModularServiceManager
import com.yidianling.user.api.event.UserSetEvent
import com.yidianling.user.api.service.IUserService
import com.yidianling.user.modular_service.UserServiceImp
import de.greenrobot.event.EventBus
......@@ -32,11 +33,11 @@ class UserAppLifecycles : IAppLifecycles {
open fun onEvent(event:UserSetEvent){
if (event.userResponse!=null){
ModularServiceManager.provide(UserServiceImp::class.java).setUserResponse(event.userResponse)
ModularServiceManager.provide(IUserService::class.java).setUserResponse(event.userResponse)
} else if (event.userInfo!=null){
ModularServiceManager.provide(UserServiceImp::class.java).updateUserInfoSp(event.userInfo)
ModularServiceManager.provide(IUserService::class.java).updateUserInfoSp(event.userInfo)
}else if (event.userSetting!=null){
ModularServiceManager.provide(UserServiceImp::class.java).updateUserSetingSp(event.userSetting)
ModularServiceManager.provide(IUserService::class.java).updateUserSetingSp(event.userSetting)
}
}
......
/*___Generated_by_IDEA___*/
package com.yidianling.router;
/* This stub is only used by the IDE. It is NOT the BuildConfig class actually packed into the APK */
public final class BuildConfig {
public final static boolean DEBUG = Boolean.parseBoolean(null);
}
\ No newline at end of file
/*___Generated_by_IDEA___*/
package com.yidianling.router;
/* This stub is only used by the IDE. It is NOT the Manifest class actually packed into the APK */
public final class Manifest {
}
\ No newline at end of file
/*___Generated_by_IDEA___*/
package com.yidianling.router;
/* This stub is only used by the IDE. It is NOT the R class actually packed into the APK */
public final class R {
}
\ No newline at end of file
include ':app', ':m-course',":router", ':ydl-net', ':ydl-utils', ':ydl-platform', ':ydl-webview', ':ydl-media',":m-user", ':m-consultant'
//, ':m-tests'
\ No newline at end of file
include ':app',':m-course',":router", ':ydl-net', ':ydl-utils', ':ydl-platform', ':ydl-webview', ':ydl-media',":m-user", ':m-consultant', ':m-muse'
\ No newline at end of file
......@@ -3,11 +3,7 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply from: "../maven_push.gradle"
kapt {
arguments {
arg("AROUTER_MODULE_NAME", "media")
}
}
android {
compileSdkVersion 28
......@@ -19,12 +15,6 @@ android {
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
javaCompileOptions {
annotationProcessorOptions {
arguments = [AROUTER_MODULE_NAME: "media"]
}
}
}
buildTypes {
......@@ -48,20 +38,16 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
kapt 'com.alibaba:arouter-compiler:1.2.2'
api(rootProject.ext.dependencies["ydl-ijkplayer-jjdxm"]) {
exclude group: 'com.android.support', module: 'appcompat-v7'
}
api rootProject.ext.dependencies["ydl-user-router"]
if (rootProject.ext.dev_mode){
//开发时使用
api project(':ydl-platform')
implementation modularPublication('com.ydl:m-user-api')
}else {
//发布时使用
compileOnly rootProject.ext.dependencies["ydl-m-user-api"]
api(rootProject.ext.dependencies["ydl-platform"]) {
transitive = true
}
......
/*___Generated_by_IDEA___*/
package com.ydl.media;
/* This stub is only used by the IDE. It is NOT the BuildConfig class actually packed into the APK */
public final class BuildConfig {
public final static boolean DEBUG = Boolean.parseBoolean(null);
}
\ No newline at end of file
/*___Generated_by_IDEA___*/
package com.ydl.media;
/* This stub is only used by the IDE. It is NOT the Manifest class actually packed into the APK */
public final class Manifest {
}
\ No newline at end of file
/*___Generated_by_IDEA___*/
package com.ydl.media;
/* This stub is only used by the IDE. It is NOT the R class actually packed into the APK */
public final class R {
}
\ No newline at end of file
......@@ -184,7 +184,7 @@ class AudioPlayer private constructor() {
musicList.clear()
musicList.addAll(music)
playMode = PlayModeEnum.LIST_LOOP
// autoSaveProgress = false
autoSaveProgress = false
}
/**
......@@ -199,6 +199,17 @@ class AudioPlayer private constructor() {
}
/**
* 单曲循环模式播放音乐
*/
fun singleCirclePlay(music: Music) {
musicList.clear()
musicList.add(music)
playMode = PlayModeEnum.SINGLE_LOOP
autoSaveProgress = false
play(0)
}
/**
* 添加后自动播放
*/
fun addAndPlay(music: Music) {
......@@ -346,6 +357,7 @@ class AudioPlayer private constructor() {
}
pausePlayer()
musicList.clear()
mediaPlayer!!.reset()
state = STATE_IDLE
}
......
......@@ -3,6 +3,6 @@
<corners android:radius="10dp" />
<solid android:color="@color/platform_color_99000000" />
<solid android:color="#99000000" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape>
<corners android:radius="0dip" />
<gradient
android:angle="0"
android:centerColor="@color/platform_white"
android:centerY="0.75"
android:endColor="@color/platform_white"
android:startColor="@color/platform_white" />
</shape>
</item>
<item android:id="@android:id/secondaryProgress">
<clip>
<shape>
<corners android:radius="0dip" />
<gradient
android:angle="0"
android:centerColor="@color/platform_default_button_bg"
android:centerY="0.75"
android:endColor="@color/platform_default_button_bg"
android:startColor="@color/platform_default_button_bg" />
</shape>
</clip>
</item>
<item android:id="@android:id/progress">
<clip>
<shape>
<corners android:radius="0dip" />
<gradient
android:angle="0"
android:endColor="@color/platform_default_button_bg"
android:startColor="@color/platform_default_button_bg" />
</shape>
</clip>
</item>
</layer-list>
\ No newline at end of file
......@@ -44,7 +44,7 @@
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:textColor="@color/white"
android:textColor="#FFFFFF"
android:textSize="14sp"
tools:text="丁sir说抑郁丁sir说抑郁:像心理学" />
......@@ -53,7 +53,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_title"
android:textColor="@color/platform_color_BFBFBF"
android:textColor="#BFBFBF"
android:textSize="10sp"
android:maxLength="10"
tools:text="丁建略丁建略丁建略丁建略" />
......@@ -66,7 +66,7 @@
android:layout_below="@+id/tv_title"
android:layout_toRightOf="@+id/tv_name"
android:text=" | "
android:textColor="@color/platform_color_BFBFBF"
android:textColor="#BFBFBF"
android:textSize="10sp" />
<TextView
......@@ -75,7 +75,7 @@
android:layout_height="wrap_content"
android:layout_below="@+id/tv_title"
android:layout_toRightOf="@+id/tv_line"
android:textColor="@color/platform_color_BFBFBF"
android:textColor="#BFBFBF"
android:textSize="10sp"
tools:text="00:06" />
......@@ -87,7 +87,7 @@
android:layout_below="@+id/tv_title"
android:layout_toRightOf="@+id/tv_now_playing_time"
android:text=" / "
android:textColor="@color/platform_color_BFBFBF"
android:textColor="#BFBFBF"
android:textSize="10sp" />
<TextView
......@@ -96,7 +96,7 @@
android:layout_height="wrap_content"
android:layout_below="@+id/tv_title"
android:layout_toRightOf="@+id/tv_line_two"
android:textColor="@color/platform_color_BFBFBF"
android:textColor="#BFBFBF"
android:textSize="10sp"
tools:text="30:28" />
......
<resources>
<string name="app_name">ydlnet</string>
<string name="app_name">ydlmedia</string>
</resources>
/*___Generated_by_IDEA___*/
package com.ydl.ydlnet;
/* This stub is only used by the IDE. It is NOT the BuildConfig class actually packed into the APK */
public final class BuildConfig {
public final static boolean DEBUG = Boolean.parseBoolean(null);
}
\ No newline at end of file
/*___Generated_by_IDEA___*/
package com.ydl.ydlnet;
/* This stub is only used by the IDE. It is NOT the Manifest class actually packed into the APK */
public final class Manifest {
}
\ No newline at end of file
/*___Generated_by_IDEA___*/
package com.ydl.ydlnet;
/* This stub is only used by the IDE. It is NOT the R class actually packed into the APK */
public final class R {
}
\ No newline at end of file
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
apply from: "../maven_push.gradle"
kapt {
arguments {
arg("AROUTER_MODULE_NAME", project.getName())
}
}
android {
compileSdkVersion rootProject.ext.android["compileSdkVersion"]
buildToolsVersion rootProject.ext.android["buildToolsVersion"]
defaultConfig {
minSdkVersion rootProject.ext.android["minSdkVersion"]
targetSdkVersion rootProject.ext.android["targetSdkVersion"]
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
lintOptions {
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main {
res.srcDirs = [
'src/main/res'
]
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7: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'
}
# 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
package com.yidianling.ydl_pay;
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.yidianling.ydl_pay.test", appContext.getPackageName());
}
}
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.yidianling.ydl_pay"/>
<resources>
<string name="app_name">ydl_pay</string>
</resources>
package com.yidianling.ydl_pay;
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);
}
}
\ No newline at end of file
/*___Generated_by_IDEA___*/
package com.ydl.ydlcommon;
/* This stub is only used by the IDE. It is NOT the BuildConfig class actually packed into the APK */
public final class BuildConfig {
public final static boolean DEBUG = Boolean.parseBoolean(null);
}
\ No newline at end of file
/*___Generated_by_IDEA___*/
package com.ydl.ydlcommon;
/* This stub is only used by the IDE. It is NOT the Manifest class actually packed into the APK */
public final class Manifest {
}
\ No newline at end of file
/*___Generated_by_IDEA___*/
package com.ydl.ydlcommon;
/* This stub is only used by the IDE. It is NOT the R class actually packed into the APK */
public final class R {
}
\ No newline at end of file
......@@ -8,6 +8,7 @@ import com.ydl.ydlcommon.base.config.IApp
import com.ydl.ydlcommon.base.delegate.AppDelegate
import com.ydl.ydlcommon.base.delegate.IAppLifecycles
import com.ydl.ydlcommon.utils.YDLPreconditions
import io.flutter.view.FlutterMain
/**
* Created by haorui on 2019-08-21 .
......@@ -45,6 +46,10 @@ open class BaseApp : Application(), IApp {
super.onCreate()
if (mAppDelegate != null)
this.mAppDelegate!!.onCreate(this)
//Flutter 初始化需要在主线程中执行
FlutterMain.startInitialization(this)
}
/**
......
package com.ydl.ydlcommon.base.flutter.base
import android.content.Context
import android.content.Intent
import android.graphics.PixelFormat
import android.os.Bundle
import android.util.AttributeSet
import android.view.WindowManager
import io.flutter.app.FlutterActivity
import io.flutter.plugins.GeneratedPluginRegistrant
import io.flutter.view.FlutterView
import org.json.JSONObject
/**
* flutter 页面基类
* Created by xj on 2019/9/30.
*/
abstract class BaseFlutterActivity : FlutterActivity() {
companion object {
const val ROUTE_PAGE = "route" //路由
/**
* 路由传递过来的参数
*/
const val ROUTER_PARAMS = "routerParam"
}
override fun createFlutterView(context: Context?): FlutterView {
val matchParent = WindowManager.LayoutParams(-1, -1)
val nativeView = this.createFlutterNativeView()
val flutterView = FlutterView(this, null as AttributeSet?, nativeView)
flutterView.layoutParams = matchParent
this.setContentView(flutterView)
//这个action必加,不然无法在flutter端获取route参数值
intent.action = Intent.ACTION_RUN
/**
* 在这边初始化route
*/
intent.putExtra(ROUTE_PAGE, initialRoute())
//渲染优化(优化一丢丢几乎看不出来)
flutterView.setZOrderOnTop(true)
flutterView.holder.setFormat(PixelFormat.TRANSLUCENT)
return flutterView
}
public override fun onCreate( savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
GeneratedPluginRegistrant.registerWith(this)
/**
* 获取统一路由传递过来的参数并初始化交互通道
*/
val json = intent.getStringExtra(ROUTER_PARAMS)
initChannelPlugin(JSONObject(json))
}
/**
* 路由,例 "/native/muse/home"
*/
abstract fun initialRoute(): String
/**
* 初始化flutter channel插件
*/
abstract fun initChannelPlugin(jsonObject: JSONObject)
}
\ No newline at end of file
package com.ydl.ydlcommon.base.flutter.base
import io.flutter.app.FlutterActivity
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel
/**
* 公共通道插件类
* Created by xj on 2019/9/30.
*/
class BaseFlutterChannelPlugin: MethodChannel.MethodCallHandler {
companion object {
const val CHANNEL: String = "lib/common/channel"
const val ACTION_GET_APPINFO_INITIAL_DATA = "action_get_initial_app_info_data" //获取主包信息的数据
fun rigister(activity: FlutterActivity) {
MethodChannel(activity.flutterView, CHANNEL).setMethodCallHandler(BaseFlutterChannelPlugin(activity))
}
}
private var mActivity: FlutterActivity? = null
private constructor(activity: FlutterActivity) {
mActivity = activity
}
override fun onMethodCall(methodCall: MethodCall, result: MethodChannel.Result) {
methodCall?.let {
when (methodCall.method) {
// 获取主包信息的数据
//todo xujian
// ACTION_GET_APPINFO_INITIAL_DATA -> {
// val mRequestMap = mutableMapOf(
// "isDevelopment" to (BuildConfig.FLUTTER_API != "prod"),
// "uid" to ,
// "accessToken" to LoginHelper.getInstance().user.accessToken,
// "version" to RxAppTool.getAppVersionName(mActivity?.applicationContext),
// "isFromApp" to "1",
// "osBuild" to RxDeviceTool.getBuildBrandModel() + "," + RxDeviceTool.getSDKVersionName() + "," + RxAppTool.getAppVersionName(mActivity?.applicationContext)
// )
// }
}
}
}
}
\ No newline at end of file
package com.ydl.ydlcommon.base.flutter.base
import android.os.Bundle
import android.view.LayoutInflater
import android.view.ViewGroup
import com.ydl.ydlcommon.base.flutter.io.flutter.facade.Flutter
import io.flutter.embedding.android.FlutterFragment
import io.flutter.view.FlutterView
/**
* flutter fragment 基类
* Created by xj on 2019/9/30.
*/
abstract class BaseFlutterFragment : FlutterFragment() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): FlutterView {
return Flutter.createView(
activity!!,
lifecycle,
initialRoute())
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
initChannelPlugin()
}
/**
* 路由,例 "quick_reply"
*/
abstract fun initialRoute(): String
/**
* 初始化flutter channel插件
*/
abstract fun initChannelPlugin()
}
package com.ydl.ydlcommon.base.flutter.io.flutter.facade;
import android.app.Activity;
import android.arch.lifecycle.Lifecycle;
import android.arch.lifecycle.LifecycleObserver;
import android.arch.lifecycle.OnLifecycleEvent;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import io.flutter.plugin.common.BasicMessageChannel;
import io.flutter.plugin.common.StringCodec;
import io.flutter.plugins.GeneratedPluginRegistrant;
import io.flutter.view.FlutterMain;
import io.flutter.view.FlutterNativeView;
import io.flutter.view.FlutterRunArguments;
import io.flutter.view.FlutterView;
/**
* Main entry point for using Flutter in Android applications.
*
* <p><strong>Warning:</strong> This file is auto-generated by Flutter tooling.
* DO NOT EDIT.</p>
*/
public final class Flutter {
private Flutter() {
// to prevent instantiation
}
/**
* Initiates the Dart VM. Calling this method at an early point may help decreasing time to first
* frame for a subsequently created {@link FlutterView}.
*
* @param applicationContext the application's {@link Context}
*/
public static void startInitialization(@NonNull Context applicationContext) {
FlutterMain.startInitialization(applicationContext);
}
/**
* Creates a {@link FlutterFragment} managing a {@link FlutterView}. The optional
* initial route string will be made available to the Dart code
* (via {@code window.defaultRouteName}) and may be used to determine which widget
* should be displayed in the view. The default initialRoute is "/".
*
* @param initialRoute an initial route {@link String}, or null
* @return a {@link FlutterFragment}
*/
@NonNull
public static FlutterFragment createFragment(String initialRoute) {
final FlutterFragment fragment = new FlutterFragment();
final Bundle args = new Bundle();
args.putString(FlutterFragment.ARG_ROUTE, initialRoute);
fragment.setArguments(args);
return fragment;
}
/**
* Creates a {@link FlutterView} linked to the specified {@link Activity} and {@link Lifecycle}.
* The optional initial route string will be made available to the Dart code (via
* {@code window.defaultRouteName}) and may be used to determine which widget should be displayed
* in the view. The default initialRoute is "/".
*
* @param activity an {@link Activity}
* @param lifecycle a {@link Lifecycle}
* @param initialRoute an initial route {@link String}, or null
* @return a {@link FlutterView}
*/
@NonNull
public static FlutterView createView(@NonNull final Activity activity, @NonNull final Lifecycle lifecycle, final String initialRoute) {
FlutterMain.startInitialization(activity.getApplicationContext());
FlutterMain.ensureInitializationComplete(activity.getApplicationContext(), null);
final FlutterNativeView nativeView = new FlutterNativeView(activity);
final FlutterView flutterView = new FlutterView(activity, null, nativeView) {
private final BasicMessageChannel<String> lifecycleMessages = new BasicMessageChannel<>(this, "flutter/lifecycle", StringCodec.INSTANCE);
@Override
public void onFirstFrame() {
super.onFirstFrame();
setAlpha(1.0f);
}
@Override
public void onPostResume() {
// Overriding default behavior to avoid dictating system UI via PlatformPlugin.
lifecycleMessages.send("AppLifecycleState.resumed");
}
};
if (initialRoute != null) {
flutterView.setInitialRoute(initialRoute);
}
lifecycle.addObserver(new LifecycleObserver() {
@OnLifecycleEvent(Lifecycle.Event.ON_CREATE)
public void onCreate() {
final FlutterRunArguments arguments = new FlutterRunArguments();
arguments.bundlePath = FlutterMain.findAppBundlePath(activity.getApplicationContext());
arguments.entrypoint = "main";
flutterView.runFromBundle(arguments);
GeneratedPluginRegistrant.registerWith(flutterView.getPluginRegistry());
}
@OnLifecycleEvent(Lifecycle.Event.ON_START)
public void onStart() {
flutterView.onStart();
}
@OnLifecycleEvent(Lifecycle.Event.ON_RESUME)
public void onResume() {
flutterView.onPostResume();
}
@OnLifecycleEvent(Lifecycle.Event.ON_PAUSE)
public void onPause() {
flutterView.onPause();
}
@OnLifecycleEvent(Lifecycle.Event.ON_STOP)
public void onStop() {
flutterView.onStop();
}
@OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
public void onDestroy() {
flutterView.destroy();
}
});
flutterView.setAlpha(0.0f);
return flutterView;
}
}
package com.ydl.ydlcommon.base.flutter.io.flutter.facade;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import io.flutter.view.FlutterView;
/**
* A {@link Fragment} managing a {@link FlutterView}.
*
* <p><strong>Warning:</strong> This file is auto-generated by Flutter tooling.
* DO NOT EDIT.</p>
*/
public class FlutterFragment extends Fragment {
public static final String ARG_ROUTE = "route";
private String mRoute = "/";
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
mRoute = getArguments().getString(ARG_ROUTE);
}
}
@Override
public void onInflate(Context context, AttributeSet attrs, Bundle savedInstanceState) {
super.onInflate(context, attrs, savedInstanceState);
}
@Override
public FlutterView onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
return Flutter.createView(getActivity(), getLifecycle(), mRoute);
}
}
......@@ -32,6 +32,8 @@ interface IYDLRouterConstant{
const val ROUTER_ANSWERS_HOME = ROUTER_BASE + "answers/home"
//话题详情页
const val ROUTER_TOPIC_DETAIL = ROUTER_BASE + "topic/detail"
//冥想页面
const val ROUTER_MUSE = ROUTER_BASE + "module/muse"
//fm列表页
const val ROUTER_FM_LIST = ROUTER_BASE + "fm/list"
//fm详情页
......@@ -70,5 +72,11 @@ interface IYDLRouterConstant{
const val EXTRA_CATETITLE = "cateTitle"
const val EXTRA_SHOWTYPE = "showType"
const val EXTRA_KEYWORD = "keyword"
/**
* 冥想模块额外参数
*/
const val MUSIC_URL = "musicUrl"
const val DATA_JSON = "dataJson"
}
}
\ No newline at end of file
......@@ -54,7 +54,22 @@ class YDLCacheUtils {
private var CACHE_HOT_SEARCH_DATA = "cache_hot_search_data"
//api
private var CACHE_API = "cache_api"
//冥想模块默认时间缓存
private var CACHE_MUSE_DEFAULT_TIME = "cache_muse_default_time"
/**
* 保存冥想模块默认时间缓存
*/
fun saveMuseDefaultTime(time: String) {
SharedPreferencesEditor.putString(CACHE_MUSE_DEFAULT_TIME, time)
}
/**
* 获取冥想模块默认时间缓存
*/
fun getMuseDefaultTime(): String {
return SharedPreferencesEditor.getString(CACHE_MUSE_DEFAULT_TIME)
}
/**
* 根据sessionId保存提醒专家的时间
......
......@@ -81,7 +81,7 @@ class YDLShareDialog : DialogFragment {
companion object {
var typeStyle: Int = 0
/**
* 1.为显示1排(5个) 2.为显示2排(隐藏动态和举报)3.为显示2排(隐藏动态和删除) 4.为显示1排(4个)隐藏动态按钮 5:生成海报按钮、隐藏动态 6:保存海报按钮、隐藏动态
* 1.为显示1排(5个) 2.为显示2排(隐藏动态和举报)3.为显示2排(隐藏动态和删除) 4.为显示1排(4个)隐藏动态按钮 5:生成海报按钮、隐藏动态 6:保存海报按钮、隐藏动态 7.为显示1排(4个)隐藏动态按钮
*/
const val TYPE1 = 1
const val TYPE2 = 2
......@@ -89,6 +89,7 @@ class YDLShareDialog : DialogFragment {
const val TYPE4 = 4
const val TYPE5 = 5
const val TYPE6 = 6
const val TYPE7 = 7
/**
* 点击事件类型 1.动态 2.删除 3.举报 4.返回首页 5:生成海报 6:保存本地 7:分享纯图片
*/
......@@ -135,6 +136,12 @@ class YDLShareDialog : DialogFragment {
typeStyle = TYPE6
return YDLShareDialog(activity, shareTitle, shareUrl, shareContent, shareHead)
}
//支持分享小程序
fun style7(activity: Activity, shareTitle: String?, shareUrl: String?, shareContent: String?, shareHead: String?, minProgramPath: String? = "", minProgramId: String? = ""): YDLShareDialog {
typeStyle = TYPE7
return YDLShareDialog(activity, shareTitle, shareUrl, shareContent, shareHead, minProgramPath, minProgramId)
}
}
override fun onCreateView(inflater: LayoutInflater?, container: ViewGroup?, savedInstanceState: Bundle?): View {
......@@ -217,6 +224,11 @@ class YDLShareDialog : DialogFragment {
ll_save.visibility = View.VISIBLE
ll_layout2.visibility = View.GONE
}
TYPE7 -> {
//样式7
ll_layout2.visibility = View.GONE
ll_dynamic.visibility = View.GONE
}
}
showPictureView()
......
......@@ -99,7 +99,7 @@
android:layout_marginTop="@dimen/platform_dp_8"
android:text="生成海报"
android:textColor="@color/platform_color_242424"
android:textSize="@dimen/dp_12" />
android:textSize="@dimen/platform_dp_12" />
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
......@@ -123,7 +123,7 @@
android:layout_marginTop="@dimen/platform_dp_8"
android:text="保存本地"
android:textColor="@color/platform_color_242424"
android:textSize="@dimen/dp_12" />
android:textSize="@dimen/platform_dp_12" />
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
......@@ -146,7 +146,7 @@
android:layout_marginTop="@dimen/platform_dp_8"
android:text="动态"
android:textColor="@color/platform_color_242424"
android:textSize="@dimen/dp_12" />
android:textSize="@dimen/platform_dp_12" />
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
......@@ -169,7 +169,7 @@
android:layout_marginTop="@dimen/platform_dp_8"
android:text="微信好友"
android:textColor="@color/platform_color_242424"
android:textSize="@dimen/dp_12" />
android:textSize="@dimen/platform_dp_12" />
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
......@@ -192,7 +192,7 @@
android:layout_marginTop="@dimen/platform_dp_8"
android:text="朋友圈"
android:textColor="@color/platform_color_242424"
android:textSize="@dimen/dp_12" />
android:textSize="@dimen/platform_dp_12" />
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
......@@ -215,7 +215,7 @@
android:layout_marginTop="@dimen/platform_dp_8"
android:text="QQ空间"
android:textColor="@color/platform_color_242424"
android:textSize="@dimen/dp_12" />
android:textSize="@dimen/platform_dp_12" />
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
......@@ -238,7 +238,7 @@
android:layout_marginTop="@dimen/platform_dp_8"
android:text="QQ好友"
android:textColor="@color/platform_color_242424"
android:textSize="@dimen/dp_12" />
android:textSize="@dimen/platform_dp_12" />
</LinearLayout>
</LinearLayout>
......@@ -271,7 +271,7 @@
android:layout_marginTop="@dimen/platform_dp_8"
android:text="删除"
android:textColor="@color/platform_color_242424"
android:textSize="@dimen/dp_12" />
android:textSize="@dimen/platform_dp_12" />
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
......@@ -295,7 +295,7 @@
android:layout_marginTop="@dimen/platform_dp_8"
android:text="举报"
android:textColor="@color/platform_color_242424"
android:textSize="@dimen/dp_12" />
android:textSize="@dimen/platform_dp_12" />
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
......@@ -319,13 +319,13 @@
android:layout_marginTop="@dimen/platform_dp_8"
android:text="返回首页"
android:textColor="@color/platform_color_242424"
android:textSize="@dimen/dp_12" />
android:textSize="@dimen/platform_dp_12" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/dp_0.5"
android:layout_height="@dimen/platform_dp_05"
android:layout_marginTop="@dimen/platform_dp_13"
android:background="@color/platform_color_E0E0E0" />
......@@ -339,7 +339,7 @@
android:paddingBottom="@dimen/platform_dp_17"
android:text="取消"
android:textColor="@color/platform_color_242424"
android:textSize="@dimen/dp_16" />
android:textSize="@dimen/platform_dp_16" />
</LinearLayout>
</RelativeLayout>
\ No newline at end of file
......@@ -26,7 +26,7 @@
<ImageView
android:layout_width="113.63dp"
android:layout_height="14dp"
android:layout_marginTop="@dimen/dp_12"
android:layout_marginTop="@dimen/platform_dp_12"
android:src="@drawable/platform_logo_bottom_text"/>
<TextView
......@@ -86,7 +86,7 @@
android:id="@+id/back_btn"
android:layout_width="96dp"
android:layout_height="28dp"
android:layout_marginTop="@dimen/dp_12"
android:layout_marginTop="@dimen/platform_dp_12"
android:background="@drawable/platform_net_loss_back_bg"
android:gravity="center"
android:text="返回"
......
......@@ -103,13 +103,17 @@
1% — 03
0% — 00-->
<!-- google color-->
<color name="platform_msg_system_press">#fff7f7f7</color>
<color name="platform_msg_bg_press">#eeeeeeee</color>
<color name="platform_colorDivider">#ebebeb</color>
<color name="platform_google_red">#ed412c</color>
<color name="platform_google_blue">#1da1f2</color>
<color name="platform_google_yellow">#fdbd00</color>
<color name="platform_google_green">#1da1f2</color>
<!--app主要颜色-->
<color name="platform_google_green_dark">#1da1f2</color>
<color name="platform_new_divide_color">#f0f0f0</color>
<color name="platform_white">#ffffff</color>
<color name="platform_theme_title_bar_color">#FFFFFF</color>
<color name="platform_theme_bg">#FAFAFA</color>
<color name="platform_main_theme_blue">#1da1f2</color>
<color name="platform_default_button_bg">#1da1f2</color>
......@@ -119,46 +123,136 @@
<color name="platform_place_holder_color">#DDDDDD</color>
<color name="platform_transparent">#00FFFFFF</color>
<color name="platform_price_color">#EC7100</color>
<color name="platform_thx_red_color">#EB5835</color>
<color name="platform_tag_text">#777777</color>
<color name="platform_f5f5f5">#f5f5f5</color>
<color name="platform_fffaec">#fffaec</color>
<color name="platform_bebebe">#bebebe</color>
<color name="platform_color_grey_999999">#999999</color>
<color name="platform_black_deep">#FF000000</color>
<color name="platform_colorTextDefault">#555555</color>
<color name="platform_gray7">#c5c4c4</color>
<color name="platform_color_message_default_bg">#e9ecf0</color>
<color name="platform_input_panel_text_color_757572">#757572</color>
<color name="platform_color_gray_cbd0d8">#cbd0d8</color>
<color name="platform_color_split_line_d9d9d9">#d9d9d9</color>
<color name="platform_color_split_line_cccccc">#cccccc</color>
<color name="platform_line">#e5e5e5</color>
<color name="platform_contact_list_hover">#d9d9d9</color>
<color name="platform_contact_letter_idx_bg">#33000000</color>
<color name="platform_color_grey_ababab">#ababab</color>
<color name="platform_color_yellow_796413">#796413</color>
<color name="platform_color_red_f04c62">#f04c62</color>
<color name="platform_color_black_ff333333">#ff333333</color>
<color name="platform_color_black_ff666666">#ff666666</color>
<color name="platform_color_black_ff999999">#999999</color>
<color name="platform_text_gray">#B6B6B6</color>
<color name="platform_title_bottom_line_bg">#DDDDDD</color>
<color name="platform_color_activity_blue_bg">#389fff</color>
<color name="platform_split_line_grey_color_d9d9d9">#D9D9D9</color>
<color name="platform_color_black_333333">#333333</color>
<color name="platform_main_bg_color">#FFFFFF</color>
<color name="platform_black">#000000</color>
<color name="platform_grey">#333333</color>
<color name="platform_color_blue_0888ff">#0888ff</color>
<color name="platform_color_gray_d9d9d9">#d9d9d9</color>
<color name="platform_grey_white_has_alpha">#66FAFAFA</color>
<color name="platform_color_grey_888888">#888888</color>
<color name="platform_GreyWhite">#F7F7F7</color>
<color name="platform_im_list_select_hover">#dbdbdb</color>
<color name="platform_color_b3b3b3">#b3b3b3</color>
<color name="platform_color_green_disable">#1da1f2</color>
<color name="platform_color_green_00d3a9">#1da1f2</color>
<color name="platform_color_black_b3000000">#b3000000</color>
<color name="platform_color_grey_eaeaea">#eaeaea</color>
<color name="platform_color_blue_3a9efb">#3a9efb</color>
<color name="platform_title_green">#1da1f2</color>
<color name="platform_defult_bg">#f3f3f3</color>
<color name="platform_text_trend_defult">#999999</color>
<color name="platform_text_trend_black">#444444</color>
<color name="platform_text_trend_title_black">#333333</color>
<color name="platform_text_user">#5195cb</color>
<color name="platform_trend_transparent">#00ffffff</color>
<color name="platform_trend_gray">#f3f3f3</color>
<color name="platform_color_grey_555555">#555555</color>
<color name="platform_color_background">#ECF1F5</color>
<color name="platform_bg_top_msg">#f3f3f3</color>
<color name="platform_color_grey_d0d0d0">#d0d0d0</color>
<color name="platform_color_F5F5F8">#F5F5F8</color>
<color name="platform_color_F5F5F5">#F5F5F5</color>
<color name="platform_color_666666">#666666</color>
<color name="platform_color_50ffffff">#B3ffffff</color>
<color name="platform_color_FFA061">#FFA061</color>
<color name="platform_color_F79554">#F79554</color>
<color name="platform_color_0CC1F7">#990CC1F7</color>
<color name="platform_color_3D3D3D">#3D3D3D</color>
<color name="platform_color_E0E0E0">#E0E0E0</color>
<color name="platform_color_F0F0F0">#F0F0F0</color>
<color name="platform_color_999999">#999999</color>
<color name="platform_color_333333">#333333</color>
<color name="platform_color_FF4650">#FF4650</color>
<color name="platform_color_FF6759">#FF6759</color>
<color name="platform_color_F6F6F6">#F6F6F6</color>
<color name="platform_color_FF5B05">#FF5B05</color>
<color name="platform_color_FFBA15">#FFBA15</color>
<color name="platform_color_FF9500">#FF9500</color>
<color name="platform_color_FF5040">#FF5040</color>
<color name="platform_color_FFEBE0">#FFEBE0</color>
<color name="platform_color_80353535">#CC353535</color>
<color name="platform_color_40353535">#66353535</color>
<color name="platform_color_30FFFFFF">#4DFFFFFF</color>
<color name="platform_color_20FFFFFF">#33FFFFFF</color>
<color name="platform_color_50FFFFFF">#80FFFFFF</color>
<color name="platform_color_70FFFFFF">#B3FFFFFF</color>
<color name="platform_color_D8D8D8">#D8D8D8</color>
<color name="platform_color_32D296">#32D296</color>
<color name="platform_color_444444">#444444</color>
<color name="platform_color_42C1FF">#42C1FF</color>
<color name="platform_color_1DA1F2">#1DA1F2</color>
<color name="platform_color_151DA1F2">#261DA1F2</color>
<color name="platform_color_242424" tools:ignore="MissingDefaultResource">#242424</color>
<color name="platform_color_FAFAFA">#FAFAFA</color>
<color name="platform_color_878787">#878787</color>
<color name="platform_color_F7F7F7">#F7F7F7</color>
<color name="platform_color_FC5F5E">#FC5F5E</color>
<color name="platform_color_FF8863">#FF8863</color>
<color name="platform_color_FD6C60">#FD6C60</color>
<color name="platform_color_FFD814">#FFD814</color>
<color name="platform_color_FFFFFF">#ffffff</color>
<color name="platform_color_ACACAC">#ACACAC</color>
<color name="platform_color_FF6633">#FF6633</color>
<color name="platform_color_BFBFBF">#BFBFBF</color>
<color name="platform_color_FFEEE6">#FFEEE6</color>
<color name="platform_color_f3f3f3">#f3f3f3</color>
<color name="platform_color_0D1A30">#0D1A30</color>
<color name="platform_color_FDD33D">#FDD33D</color>
<color name="platform_color_c6c3c3">#C6C3C3</color>
<color name="platform_color_33000000">#33000000</color>
<color name="platform_color_2EB0FF">#2EB0FF</color>
<color name="platform_color_075b66">#075b66</color>
<color name="platform_color_E6E6E6">#E6E6E6</color>
<color name="platform_color_34CD65">#34CD65</color>
<color name="platform_color_3DBEF5">#3DBEF5</color>
<color name="platform_color_F4F4F4">#F4F4F4</color>
<color name="platform_color_FFDB26">#FFDB26</color>
<color name="platform_color_8CF22318">#8CF22318</color>
<color name="platform_color_CCCCCC">#CCCCCC</color>
<color name="platform_color_FF5A4C">#FF5A4C</color>
<color name="platform_color_5FF5A4C">#0DFF5A4C</color>
<color name="platform_color_60FF5A4C">#99FF5A4C</color>
<color name="platform_color_222222">#222222</color>
<color name="platform_color_EBEBEB">#EBEBEB</color>
<color name="platform_color_FFDD33">#FFDD33</color>
<color name="platform_color_FFC000">#FFC000</color>
<color name="platform_color_5CC8F7">#5CC8F7</color>
<color name="platform_color_1EA6FA">#1EA6FA</color>
<color name="platform_color_FF8C00">#FF8C00</color>
<color name="platform_color_FF9100">#FF9100</color>
<color name="platform_color_F8FCFF">#F8FCFF</color>
<color name="platform_color_66000000">#66000000</color>
<color name="platform_color_99000000">#99000000</color>
<!--公用搜索框背景颜色-->
<color name="platform_color_F2F2F2">#F2F2F2</color>
<color name="platform_color_FF3A2F">#FF3A2F</color>
<color name="platform_color_EEEEEE">#EEEEEE</color>
</resources>
......@@ -12,10 +12,14 @@
<dimen name="platform_default_text_size">14sp</dimen>
<dimen name="platform_default_text_size_big">16sp</dimen>
<dimen name="platform_default_text_size_large">18sp</dimen>
<dimen name="title_bar_height">45dp</dimen>
<dimen name="platform_jump_text_view_min_height">55dp</dimen>
<dimen name="jump_text_view_icon_size">25dp</dimen>
<dimen name="dp_0.5">0.5dp</dimen>
<!--TitleBar高度-->
<dimen name="platform_title_bar_height">45dp</dimen>
<dimen name="platform_action_bar_height">48dip</dimen>
<dimen name="platform_dp_05">0.5dp</dimen>
<dimen name="platform_dp_1">1dp</dimen>
<dimen name="platform_dp_2">2dp</dimen>
<dimen name="platform_dp_3">3dp</dimen>
......@@ -26,19 +30,40 @@
<dimen name="platform_dp_8">8dp</dimen>
<dimen name="platform_dp_9">9dp</dimen>
<dimen name="platform_dp_10">10dp</dimen>
<dimen name="dp_11">11dp</dimen>
<dimen name="dp_12">12dp</dimen>
<dimen name="platform_dp_11">11dp</dimen>
<dimen name="platform_dp_12">12dp</dimen>
<dimen name="platform_dp_13">13dp</dimen>
<dimen name="platform_dp_14">14dp</dimen>
<dimen name="platform_dp_15">15dp</dimen>
<dimen name="dp_16">16dp</dimen>
<dimen name="platform_dp_16">16dp</dimen>
<dimen name="platform_dp_17">17dp</dimen>
<dimen name="platform_dp_18">18dp</dimen>
<dimen name="platform_dp_19">19dp</dimen>
<dimen name="platform_dp_20">20dp</dimen>
<dimen name="platform_dp_21">21dp</dimen>
<dimen name="platform_dp_22">22dp</dimen>
<dimen name="platform_dp_23">23dp</dimen>
<dimen name="platform_dp_24">24dp</dimen>
<dimen name="platform_dp_25">25dp</dimen>
<dimen name="platform_dp_26">26dp</dimen>
<dimen name="platform_dp_27">27dp</dimen>
<dimen name="platform_dp_28">28dp</dimen>
<dimen name="platform_dp_29">29dp</dimen>
<dimen name="platform_dp_30">30dp</dimen>
<dimen name="platform_dp_31">31dp</dimen>
<dimen name="platform_dp_32">32dp</dimen>
<dimen name="platform_dp_33">33dp</dimen>
<dimen name="platform_dp_34">34dp</dimen>
<dimen name="platform_dp_35">35dp</dimen>
<dimen name="platform_dp_36">36dp</dimen>
<dimen name="platform_dp_37">37dp</dimen>
<dimen name="platform_dp_38">38dp</dimen>
<dimen name="platform_dp_48">48dp</dimen>
<dimen name="platform_dp_60">60dp</dimen>
<dimen name="platform_dp_64">64dp</dimen>
<dimen name="platform_dp_88">88dp</dimen>
<dimen name="platform_dp_99">99dp</dimen>
<dimen name="platform_dp_115">115dp</dimen>
<dimen name="platform_dp_127">127dp</dimen>
</resources>
<resources>
<string name="app_name">ydlcommon</string>
<!-- image picker -->
<string name="platform_picker_image_preview">预览</string>
<string name="platform_picker_image_send">发送</string>
<string name="platform_picker_image_folder">相册</string>
<string name="platform_picker_image_album_loading">相册加载中…</string>
<string name="platform_picker_image_album_empty">相册中没有图片!</string>
<string name="platform_picker_image_folder_info">共%d张</string>
<string name="platform_picker_image_exceed_max_image_select">最多选择%d张图片!</string>
<string name="platform_picker_image_send_select">完成(%d)</string>
<string name="platform_picker_image_preview_original">发送原图</string>
<string name="platform_picker_image_preview_edit">编辑</string>
<string name="platform_picker_image_preview_original_select">发送原图(%s)</string>
<string name="platform_picker_image_error">获取图片出错</string>
<string name="platform_image_compressed_size">该原始图片大小为: %1$s,</string>
<string name="platform_unknow_size">未知大小</string>
<string name="platform_is_send_image">是否发送该原始图片?</string>
<string name="platform_multi_image_compressed_size">原始图片总大小为: %1$s,</string>
<string name="platform_is_send_multi_image">是否发送这些原始图片?</string>
<string name="platform_waitfor_image_local">正在打开相册,请稍候\u2026</string>
<string name="platform_recapture">重拍</string>
<string name="platform_image_show_error">图片显示异常</string>
<string name="platform_memory_out">内存不足</string>
<string name="platform_choose_from_photo_album">从手机相册选择</string>
<string name="platform_choose">选取</string>
<string name="platform_crop">裁剪</string>
<!--common--> platform_
<string name="platform_empty"></string>
<string name="platform_cancel">取消</string>
<!-- 拍照视频 --> platform_
<string name="platform_gallery_invalid">你的手机没有图库程序</string>
<string name="platform_sdcard_not_enough_head_error">SD卡被拔出或存储空间不足,无法保存头像</string>
<string name="platform_sdcard_not_enough_error">存储空间不足,无法保存此次多媒体消息</string>
<string name="platform_download_video">正在下载视频</string>
<string name="platform_download_video_fail">视频下载失败,请重试</string>
<string name="platform_look_video_fail">无法播放该视频</string>
<string name="platform_look_video_fail_try_again">暂时无法播放视频,请重试</string>
<string name="platform_video_record">视频录制</string>
<string name="platform_connect_vedio_device_fail">无法连接视频设备 ,请稍候再试</string>
<string name="platform_capture_video_size_in_kb">视频文件大小为: %1$dKB,</string>
<string name="platform_capture_video_size_in_mb">视频文件大小为: %1$.2fMB,</string>
<string name="platform_is_send_video">是否发送该视频?</string>
<string name="platform_start_camera_to_record_failed">启动摄像头录制视频失败</string>
<string name="platform_stop_fail_maybe_stopped">停止失败,可能已经停止</string>
<string name="platform_video_exception">视频文件异常</string>
<string name="platform_im_choose_video_file_size_too_large">视频文件过大,系统限制为20MB</string>
<string name="platform_im_choose_video">请选择3GP MP4格式的视频文件</string>
<string name="platform_video_record_short">录制视频太短</string>
<string name="platform_download_progress_description">%1$s(%2$s/%3$s)</string>
<string name="platform_send">发送</string>
<string name="platform_ok">确定</string>
<string name="platform_input_panel_take">拍 摄</string>
<string name="platform_version_update">版本更新</string>
<string name="platform_encourage_us">鼓励一下我们</string>
<string name="platform_update_hint">已经是最新版本咯</string>
<string name="platform_load_new_version">正在下载新版本</string>
<string name="platform_service">客服小壹</string>
<string name="platform_trends">动态</string>
<string name="platform_course_recommend">课程推荐</string>
<string name="platform_no_more_data_hint">到底了,陛下,就等你分享了呢</string>
<string name="platform_loading_hint">正在加载中…</string>
<string name="platform_popularity">人气:</string>
<string name="platform_course_detail">课程详情</string>
<string name="platform_attend_course_success">报名成功</string>
<string name="platform_theme">主题</string>
<string name="platform_area">地区</string>
<string name="platform_sort">排序</string>
<string name="platform_filter">筛选</string>
<string name="platform_search">搜索</string>
<string name="platform_show_type">显示方式</string>
<string name="platform_enquiry_type">咨询方式</string>
<string name="platform_age">年龄</string>
<string name="platform_reset">重置</string>
<string name="platform_confirm">确定</string>
<string name="platform_no_more">没有更多了</string>
......@@ -12,14 +82,37 @@
<string name="platform_search_by_category">按主题搜索看看</string>
<string name="platform_search_hint">搜索话题、咨询师姓名</string>
<string name="platform_need_storage_permission_hint">App正常工作需要内部存储使用权限,请开启</string>
<string name="platform_register_by_phone">手机号注册</string>
<string name="platform_login_by_phone">手机登录</string>
<string name="platform_login_by_qq">QQ登录</string>
<string name="platform_login_by_wechat">微信登录</string>
<string name="platform_user_protocol">用户协议</string>
<string name="platform_next_step">下一步</string>
<string name="platform_walk_around">随便逛逛</string>
<string name="platform_finish">完成</string>
<string name="platform_nickname_hint">设置一个昵称,方便大家认识你哦(最多10个字)</string>
<string name="platform_please_select_gender">请选择性别</string>
<string name="platform_more">更多</string>
<string name="platform_register_success">注册成功</string>
<string name="platform_private_safe_hint">设置手势密码,保障安全隐私</string>
<string name="platform_header">头像</string>
<string name="platform_pause_play">暂停/播放</string>
<string name="platform_start_test">立即测试</string>
<string name="platform_test_result">测试结果</string>
<string name="platform_test_again">重新测试</string>
<string name="platform_send_to_expert">专家解读</string>
<string name="platform_test_answer">测试回答</string>
<string name="platform_introduction">说明</string>
<string name="platform_last_question">上一题</string>
<string name="platform_no_test_record_hint">还没有测试记录哦</string>
<string name="platform_recommend_test">推荐测试</string>
<string name="platform_test_count">%d人测过</string>
<string name="platform_questions">%d个问题</string>
<string name="platform_wrong_args">参数异常</string>
<string name="platform_no_search_keyword_hint">请输入关键字</string>
<string name="platform_gson_parse_error">解析错误</string>
<string name="platform_test_either">我也要测试</string>
<!--网络提示模块-->
<string name="platform_network_error">网络不给力!</string>
<string name="platform_data_error">返回数据解析错误!</string>
......@@ -28,8 +121,21 @@
<string name="platform_loadfailed">加载失败</string>
<!--动态模块-->
<string name="platform_trend_foucused">已关注</string>
<string name="platform_trend_foucus">关注</string>
<string name="platform_trend_comments_load_error">评论加载失败</string>
<string name="platform_trend_waitting_for_comment">就等你的评论咯~</string>
<string name="platform_silence_content">因网友举报,你已经被系统禁言,如有疑问,请联系客服小壹处理。</string>
<string name="platform_appeal">我要申诉</string>
<string name="platform_approval">知道了</string>
<string name="platform_dialog_loading">加载中…</string>
<string name="platform_close">关闭</string>
<string name="platform_no_network">网络不给力哦,下拉刷新重试</string>
<string name="platform_chat_private_title">私聊须知</string>
<string name="platform_chat_pivate_content">如系统检测到涉黄、涉爆、涉政等信息,可能会封号处理并追究法律责任!</string>
<string name="platform_notification_error_ssl_cert_invalid">SSL 证书验证错误,是否继续加载?</string>
</resources>
/*___Generated_by_IDEA___*/
package com.ydl.webview;
/* This stub is only used by the IDE. It is NOT the BuildConfig class actually packed into the APK */
public final class BuildConfig {
public final static boolean DEBUG = Boolean.parseBoolean(null);
}
\ No newline at end of file
/*___Generated_by_IDEA___*/
package com.ydl.webview;
/* This stub is only used by the IDE. It is NOT the Manifest class actually packed into the APK */
public final class Manifest {
}
\ No newline at end of file
/*___Generated_by_IDEA___*/
package com.ydl.webview;
/* This stub is only used by the IDE. It is NOT the R class actually packed into the APK */
public final class R {
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment