Commit 551b761e by 严久程

动态数据展示问题处理

parent e1618ae2
...@@ -204,7 +204,7 @@ dependencies { ...@@ -204,7 +204,7 @@ dependencies {
// implementation project(':m-muse') // implementation project(':m-muse')
implementation project(':m-im') implementation project(':m-im')
// implementation project(':m-dynamic') implementation project(':m-dynamic')
// api rootProject.ext.dependencies["ydl-m-fm-module-ydl"] // api rootProject.ext.dependencies["ydl-m-fm-module-ydl"]
......
<?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
...@@ -7,6 +7,7 @@ import com.ydl.component.mvp.DemoContract ...@@ -7,6 +7,7 @@ import com.ydl.component.mvp.DemoContract
import com.ydl.component.mvp.DemoPresenter 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.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
...@@ -61,9 +62,9 @@ class FragmentContainerActivity : BaseLceActivity<DemoContract.View, DemoContra ...@@ -61,9 +62,9 @@ class FragmentContainerActivity : BaseLceActivity<DemoContract.View, DemoContra
if ("NewMultiMessageFragment" == fragmentName) { if ("NewMultiMessageFragment" == fragmentName) {
return NewMultiMessageFragment() return NewMultiMessageFragment()
} }
// if ("TrendsHomeFragment" == fragmentName) { if ("TrendsHomeFragment" == fragmentName) {
// return TrendsHomeFragment() return TrendsHomeFragment()
// } }
// if ("YdlHomeFragment" == fragmentName) { // if ("YdlHomeFragment" == fragmentName) {
// return YdlHomeFragment() // return YdlHomeFragment()
// } // }
......
<?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
ext { ext {
kotlin_version = "1.3.21" kotlin_version = "1.3.21"
dev_mode = false dev_mode = true
ydl_app = [ ydl_app = [
appName : "心理咨询壹点灵", appName : "心理咨询壹点灵",
......
...@@ -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() {
......
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