Commit 1d28f16f by konghaorui

Merge branch 'feature/im_update' of…

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

# Conflicts:
#	app/src/main/java/com/ydl/component/music/FragmentContainerActivity.kt
parents 430841c1 0fbc538c
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
package="com.ydl.component"> package="com.ydl.component">
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
...@@ -12,24 +12,25 @@ ...@@ -12,24 +12,25 @@
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" />
<application <application
android:name="com.ydl.ydlcommon.base.BaseApp" android:name="com.ydl.ydlcommon.base.BaseApp"
android:allowBackup="false" android:allowBackup="false"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round" android:networkSecurityConfig="@xml/network_config"
android:supportsRtl="true" android:roundIcon="@mipmap/ic_launcher_round"
android:networkSecurityConfig="@xml/network_config" android:supportsRtl="true"
android:theme="@style/platform_CommonTheme" android:theme="@style/platform_CommonTheme"
tools:ignore="GoogleAppIndexingWarning" tools:ignore="GoogleAppIndexingWarning"
tools:replace="android:allowBackup, android:icon, android:label"> tools:replace="android:allowBackup, android:icon, android:label">
<activity android:name=".music.FragmentContainerActivity" <activity
android:theme="@style/platform_NoTitleTheme" /> android:name=".music.FragmentContainerActivity"
android:theme="@style/platform_NoTitleTheme" />
<!-- <activity android:name="com.yidianling.user.ui.login.RegisterAndLoginActivity" --> <!-- <activity android:name="com.yidianling.user.ui.login.RegisterAndLoginActivity" -->
<!-- <activity android:name=".MainActivity"/> --> <!-- <activity android:name=".MainActivity"/> -->
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:launchMode="singleTask" android:launchMode="singleTask"
android:theme="@style/platform_NoTitleTheme"> android:theme="@style/platform_NoTitleTheme">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
...@@ -37,18 +38,18 @@ ...@@ -37,18 +38,18 @@
<intent-filter> <intent-filter>
<action android:name="com.ydl.media.ACTION_MUSIC_CLICK" /> <action android:name="com.ydl.media.ACTION_MUSIC_CLICK" />
<category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.DEFAULT" />
</intent-filter> </intent-filter>
</activity> </activity>
<meta-data <meta-data
android:name="com.ydl.component.base.DemoGlobalConfig" android:name="com.ydl.component.base.DemoGlobalConfig"
android:value="ModuleConfig" /> android:value="ModuleConfig" />
<activity <activity
android:name="com.tencent.tauth.AuthActivity" android:name="com.tencent.tauth.AuthActivity"
android:launchMode="singleTask" android:launchMode="singleTask"
android:noHistory="true"> android:noHistory="true">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />
...@@ -59,11 +60,11 @@ ...@@ -59,11 +60,11 @@
</intent-filter> </intent-filter>
</activity> </activity>
<activity android:name=".TestAppActivity" />
<activity <activity
android:name=".home.HomeActivity" android:name=".home.HomeActivity"
android:launchMode="singleTask" android:launchMode="singleTask"
android:noHistory="true"> android:noHistory="true"></activity>
</activity>
</application> </application>
</manifest> </manifest>
\ No newline at end of file
...@@ -84,7 +84,7 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>( ...@@ -84,7 +84,7 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
.navigation() .navigation()
} }
bt_to_consultant.setOnClickListener { bt_to_consultant.setOnClickListener {
// ARouter.getInstance() // ARouter.getInstance()
// .build("/consult/hot_search") // .build("/consult/hot_search")
// .withString( // .withString(
// HOT_SEARCH_DOCTOR_NAME, // HOT_SEARCH_DOCTOR_NAME,
...@@ -96,10 +96,10 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>( ...@@ -96,10 +96,10 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
FragmentContainerActivity.start(this) FragmentContainerActivity.start(this)
} }
bt_to_im.setOnClickListener { bt_to_im.setOnClickListener {
FragmentContainerActivity.start(this,"NewMultiMessageFragment") FragmentContainerActivity.start(this, "NewMultiMessageFragment")
} }
bt_to_dynamic.setOnClickListener { bt_to_dynamic.setOnClickListener {
FragmentContainerActivity.start(this,"TrendsHomeFragment") FragmentContainerActivity.start(this, "TrendsHomeFragment")
} }
bt_to_tests.setOnClickListener { bt_to_tests.setOnClickListener {
startActivity(Intent(this, NewTestHomeActivity::class.java)) startActivity(Intent(this, NewTestHomeActivity::class.java))
...@@ -109,25 +109,32 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>( ...@@ -109,25 +109,32 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
// startActivity(Intent(this, ConfideHomeActivity::class.java)) // startActivity(Intent(this, ConfideHomeActivity::class.java))
// } // }
bt_to_muse.setOnClickListener { bt_to_muse.setOnClickListener {
YDLRouterManager.router(IYDLRouterConstant.ROUTER_MUSE, YDLRouterManager.router(
YDLRouterParams().putExtra(IYDLRouterConstant.MUSIC_URL, "http://video.yidianling.com/2019/05/30/e6d4a71e8c895f2156a2ff37d93ca3a9.mp3") IYDLRouterConstant.ROUTER_MUSE,
.putExtra(IYDLRouterConstant.DATA_JSON, "{\n" + YDLRouterParams().putExtra(
" \"muses\": [{\n" + IYDLRouterConstant.MUSIC_URL,
" \"id\": 6,\n" + "http://video.yidianling.com/2019/05/30/e6d4a71e8c895f2156a2ff37d93ca3a9.mp3"
" \"name\": \"冥想基础介绍-1-什么是冥想?\",\n" + )
" \"audioUrl\":\n" + .putExtra(
" \"http://video.yidianling.com/2019/05/30/e6d4a71e8c895f2156a2ff37d93ca3a9.mp3\",\n" + IYDLRouterConstant.DATA_JSON, "{\n" +
" \"backgroundUrl\":\n" + " \"muses\": [{\n" +
" \"https://img.yidianling.com/file/2019/06/10/i4qdax82ok2aizq3.png\",\n" + " \"id\": 6,\n" +
" \"effectCode\": 1,\n" + " \"name\": \"冥想基础介绍-1-什么是冥想?\",\n" +
" \"category\": 2,\n" + " \"audioUrl\":\n" +
" \"playCount\": 929,\n" + " \"http://video.yidianling.com/2019/05/30/e6d4a71e8c895f2156a2ff37d93ca3a9.mp3\",\n" +
" \"sort\": 255,\n" + " \"backgroundUrl\":\n" +
" \"isDelete\": 1,\n" + " \"https://img.yidianling.com/file/2019/06/10/i4qdax82ok2aizq3.png\",\n" +
" \"createTime\": \"May 30, 2019 4:45:17 PM\",\n" + " \"effectCode\": 1,\n" +
" \"updateTime\": \"Jun 10, 2019 7:14:23 PM\"\n" + " \"category\": 2,\n" +
" }]\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" +
" }"
)
)
} }
bt_to_fm.setOnClickListener { bt_to_fm.setOnClickListener {
...@@ -135,12 +142,13 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>( ...@@ -135,12 +142,13 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
// YDLRouterManager.router(IYDLRouterConstant.ROUTER_FM_LIST) // YDLRouterManager.router(IYDLRouterConstant.ROUTER_FM_LIST)
} }
bt_to_course.setOnClickListener{ bt_to_course.setOnClickListener {
ARouter.getInstance().build("/course/home") ARouter.getInstance().build("/course/home")
.navigation() .navigation()
} }
bt_to_home.setOnClickListener { bt_to_home.setOnClickListener {
FragmentContainerActivity.start(this,"YdlHomeFragment") // FragmentContainerActivity.start(this, "YdlHomeFragment")
startActivity(Intent(this, TestAppActivity::class.java))
} }
} }
...@@ -186,7 +194,8 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>( ...@@ -186,7 +194,8 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
super.onResume() super.onResume()
MobclickAgent.onResume(this) MobclickAgent.onResume(this)
ModularServiceManager.provide(IConsultantService::class.java).showConsultAssistantDialog(this) ModularServiceManager.provide(IConsultantService::class.java)
.showConsultAssistantDialog(this)
} }
override fun onPause() { override fun onPause() {
......
package com.ydl.component
import android.os.Bundle
import android.support.v4.app.Fragment
import android.support.v4.app.FragmentPagerAdapter
import android.support.v7.app.AppCompatActivity
import com.yidianling.dynamic.trendsHome.TrendsHomeFragment
import com.yidianling.home.ui.fragment.YdlHomeFragment
import kotlinx.android.synthetic.main.activity_test_app.*
import java.util.*
/**
* @author jiucheng
* @描述:
* @Copyright Copyright (c) 2018
* @Company 壹点灵
* @date 2020/1/14
*/
class TestAppActivity : AppCompatActivity() {
private var fragments: ArrayList<Fragment> =
ArrayList()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_test_app)
fragments.add(YdlHomeFragment())
fragments.add(TrendsHomeFragment().setTab("trend_tap"))
val adapter: FragmentPagerAdapter =
object : FragmentPagerAdapter(supportFragmentManager) {
override fun getItem(position: Int): Fragment {
return fragments.get(position)
}
override fun getCount(): Int {
return fragments.size
}
}
view_page.adapter = adapter
view_page.offscreenPageLimit = 2
}
}
\ No newline at end of file
...@@ -121,7 +121,6 @@ public class DemoAppLifecycles implements IAppLifecycles { ...@@ -121,7 +121,6 @@ public class DemoAppLifecycles implements IAppLifecycles {
PlatformConfig.setQQZone("1107931541", "8dCvxUpi525uPGTJ"); PlatformConfig.setQQZone("1107931541", "8dCvxUpi525uPGTJ");
} }
// MobclickAgent.setScenarioType(application, MobclickAgent.EScenarioType.E_DUM_NORMAL);
// 选用AUTO页面采集模式 // 选用AUTO页面采集模式
MobclickAgent.setPageCollectionMode(MobclickAgent.PageMode.AUTO); MobclickAgent.setPageCollectionMode(MobclickAgent.PageMode.AUTO);
MobclickAgent.setCatchUncaughtExceptions(!BuildConfig.DEBUG); MobclickAgent.setCatchUncaughtExceptions(!BuildConfig.DEBUG);
......
...@@ -20,8 +20,8 @@ import java.util.List; ...@@ -20,8 +20,8 @@ import java.util.List;
public final class DemoGlobalConfig implements IConfigModule { public final class DemoGlobalConfig implements IConfigModule {
String APP_DOMAIN = "https://api.github.com/"; String APP_DOMAIN = "https://api.github.com/";
// public static String appEnv = YDLConstants.ENV_AUTO_TEST; // public static String appEnv = YDLConstants.ENV_AUTO_TEST;
public static String appEnv = YDLConstants.ENV_TEST; // public static String appEnv = YDLConstants.ENV_TEST;
// public static String appEnv = YDLConstants.ENV_PROD; public static String appEnv = YDLConstants.ENV_PROD;
@Override @Override
public void injectAppLifecycle(@NotNull Context context, @NotNull List<IAppLifecycles> lifecycles) { public void injectAppLifecycle(@NotNull Context context, @NotNull List<IAppLifecycles> lifecycles) {
......
...@@ -8,7 +8,6 @@ import com.ydl.component.mvp.DemoPresenter ...@@ -8,7 +8,6 @@ import com.ydl.component.mvp.DemoPresenter
import com.ydl.ydlcommon.bean.StatusBarOptions import com.ydl.ydlcommon.bean.StatusBarOptions
import com.ydl.ydlcommon.mvp.lce.BaseLceActivity import com.ydl.ydlcommon.mvp.lce.BaseLceActivity
import com.yidianling.dynamic.trendsHome.TrendsHomeFragment import com.yidianling.dynamic.trendsHome.TrendsHomeFragment
import com.yidianling.home.ui.fragment.YdlHomeFragment
//import com.yidianling.dynamic.trendsHome.TrendsHomeFragment //import com.yidianling.dynamic.trendsHome.TrendsHomeFragment
//import com.yidianling.home.ui.fragment.YdlHomeFragment //import com.yidianling.home.ui.fragment.YdlHomeFragment
import com.yidianling.im.ui.page.NewMultiMessageFragment import com.yidianling.im.ui.page.NewMultiMessageFragment
...@@ -66,9 +65,9 @@ class FragmentContainerActivity : BaseLceActivity<DemoContract.View, DemoContra ...@@ -66,9 +65,9 @@ class FragmentContainerActivity : BaseLceActivity<DemoContract.View, DemoContra
if ("TrendsHomeFragment" == fragmentName) { if ("TrendsHomeFragment" == fragmentName) {
return TrendsHomeFragment() return TrendsHomeFragment()
} }
if ("YdlHomeFragment" == fragmentName) { // if ("YdlHomeFragment" == fragmentName) {
return YdlHomeFragment() // return YdlHomeFragment()
} // }
return PlayFragment() return PlayFragment()
} }
} }
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v4.view.ViewPager
android:id="@+id/view_page"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" />
</LinearLayout>
\ No newline at end of file
...@@ -42,17 +42,17 @@ ext { ...@@ -42,17 +42,17 @@ ext {
ydlPublishVersion = [ ydlPublishVersion = [
// -------------- 业务模块 -------------- // -------------- 业务模块 --------------
//第三步 若干 //第三步 若干
"m-confide" : "0.0.43", "m-confide" : "0.0.47",
"m-consultant" : "0.0.53", "m-consultant" : "0.0.56",
"m-fm" : "0.0.25", "m-fm" : "0.0.28",
"m-user" : "0.0.44.7", "m-user" : "0.0.47",
"m-home" : "0.0.16", "m-home" : "0.0.18",
"m-im" : "0.0.9", "m-im" : "0.0.11",
"m-dynamic" : "0.0.3", "m-dynamic" : "0.0.5.1",
"m-muse" : "0.0.24", "m-muse" : "0.0.26",
"m-tests" : "0.0.19", "m-tests" : "0.0.21",
"m-course" : "0.0.38", "m-course" : "0.0.40",
//-------------- 业务模块 API 层 -------------- //-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.5", "m-audioim-api" : "0.0.5",
...@@ -69,19 +69,19 @@ ext { ...@@ -69,19 +69,19 @@ ext {
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
//第一步 //第一步
"ydl-platform" : "0.0.33.4", "ydl-platform" : "0.0.37",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.33.2", "ydl-webview" : "0.0.37",
"ydl-media" : "0.0.16", "ydl-media" : "0.0.20",
"ydl-pay" : "0.0.13", "ydl-pay" : "0.0.17",
"m-audioim" : "0.0.42", "m-audioim" : "0.0.46",
"ydl-flutter-base": "0.0.10",
//以下 几乎不会动 //以下 几乎不会动
"router" : "0.0.1", "router" : "0.0.1",
"ydl-net" : "0.0.3.1", "ydl-net" : "0.0.3.1",
"ydl-utils" : "0.0.3.1", "ydl-utils" : "0.0.3.1",
"ydl-flutter-base": "0.0.6.1",
] ]
...@@ -115,19 +115,19 @@ ext { ...@@ -115,19 +115,19 @@ ext {
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
//第一步 //第一步
"ydl-platform" : "0.0.33.4", "ydl-platform" : "0.0.37",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.32.3", "ydl-webview" : "0.0.36",
"ydl-media" : "0.0.15.1", "ydl-media" : "0.0.20",
"ydl-pay" : "0.0.12.1", "ydl-pay" : "0.0.17",
"m-audioim" : "0.0.41.1", "m-audioim" : "0.0.46",
"ydl-flutter-base": "0.0.10",
//以下 几乎不会动 //以下 几乎不会动
"router" : "0.0.1", "router" : "0.0.1",
"ydl-net" : "0.0.3.1", "ydl-net" : "0.0.3.1",
"ydl-utils" : "0.0.3.1", "ydl-utils" : "0.0.3.1",
"ydl-flutter-base": "0.0.5.41",
] ]
dependencies = [ dependencies = [
......
...@@ -18,6 +18,8 @@ import android.widget.AdapterView ...@@ -18,6 +18,8 @@ import android.widget.AdapterView
import android.widget.LinearLayout import android.widget.LinearLayout
import android.widget.TextView import android.widget.TextView
import com.alibaba.android.arouter.facade.annotation.Route import com.alibaba.android.arouter.facade.annotation.Route
import com.ydl.media.audio.AudioPlayer
import com.ydl.media.view.PlayerFloatHelper
import com.ydl.webview.H5Params import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity import com.ydl.webview.NewH5Activity
import com.ydl.ydlcommon.base.BaseActivity import com.ydl.ydlcommon.base.BaseActivity
...@@ -730,6 +732,15 @@ class CourseListContainerActivity : BaseActivity(), PtrHandler, LoadMoreHandler ...@@ -730,6 +732,15 @@ class CourseListContainerActivity : BaseActivity(), PtrHandler, LoadMoreHandler
getData(false) getData(false)
} }
override fun onDestroy() {
super.onDestroy()
if (!PlayerFloatHelper.isCanClick) {
PlayerFloatHelper.hide()
PlayerFloatHelper.removeView(this)
AudioPlayer.get().stopPlayer()
}
}
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
......
...@@ -141,7 +141,7 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView, ...@@ -141,7 +141,7 @@ public class TrendsHomeFragment extends BaseFragment implements ITrendHomeView,
@Override @Override
public void initDataAndEventLazy() { public void initDataAndEventLazy() {
initDatas(); // initDatas();
} }
private void initViews() { private void initViews() {
......
...@@ -101,11 +101,12 @@ public class TrendsContentListFragment extends BaseFragment implements ITrendsLi ...@@ -101,11 +101,12 @@ public class TrendsContentListFragment extends BaseFragment implements ITrendsLi
public void initDataAndEvent() { public void initDataAndEvent() {
initDatas(); initDatas();
initViews(); initViews();
onRefresh();
} }
@Override @Override
public void initDataAndEventLazy() { public void initDataAndEventLazy() {
onRefresh();
} }
private void initViews() { private void initViews() {
......
...@@ -193,7 +193,8 @@ class InputPassWordActivity : BaseMvpActivity<IInputPassWordContract.View,IInput ...@@ -193,7 +193,8 @@ class InputPassWordActivity : BaseMvpActivity<IInputPassWordContract.View,IInput
private fun showSoftKeyBord() { private fun showSoftKeyBord() {
RxKeyboardTool.showKeyboard(this, true) RxKeyboardTool.toggleSoftInput(this, et_input_password)
} }
/** /**
......
...@@ -333,6 +333,7 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont ...@@ -333,6 +333,7 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
setHint() setHint()
requestFocus()
if (isUmengLoginState) { if (isUmengLoginState) {
tv_skip.visibility = View.VISIBLE tv_skip.visibility = View.VISIBLE
...@@ -374,6 +375,14 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont ...@@ -374,6 +375,14 @@ class RegisterAndLoginActivity : BaseMvpActivity<ILoginContract.View, ILoginCont
} }
} }
private fun requestFocus(){
et_phone_number.post {
et_phone_number.requestFocus()
et_phone_number.isFocusable = true
et_phone_number.isFocusableInTouchMode = true
}
}
private fun setHint() { private fun setHint() {
val hintStr = SpannableString(resources.getString(R.string.user_edittext_hint))// 定义hint的值 val hintStr = SpannableString(resources.getString(R.string.user_edittext_hint))// 定义hint的值
val ass = AbsoluteSizeSpan(16, true)// 设置字体大小 true表示单位是SP val ass = AbsoluteSizeSpan(16, true)// 设置字体大小 true表示单位是SP
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
android:layout_height="2dp" android:layout_height="2dp"
android:layout_marginLeft="4dp" android:layout_marginLeft="4dp"
android:layout_marginRight="4dp" android:layout_marginRight="4dp"
android:background="@color/user_main_theme_light" /> android:background="#2EB0FF" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
......
...@@ -18,8 +18,7 @@ ...@@ -18,8 +18,7 @@
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="您需要同意本隐私保护协议 android:text="您需要同意本隐私保护协议\n才能继续使用壹点灵"
才能继续使用壹点灵"
android:textSize="18dp" android:textSize="18dp"
android:textStyle="bold" android:textStyle="bold"
android:textColor="#242424" android:textColor="#242424"
......
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