Commit 8619efbe by 严久程
parents ab5f7bff 0e3e5822
......@@ -165,10 +165,9 @@ dependencies {
kapt rootProject.ext.dependencies["butterknife-compiler"]
if (rootProject.ext.dev_mode) {
if (true) {
//开发模式
api project(':m-user')
//api project(':m-fm')
api project(':m-tests')
api project(':m-consultant')
api (project(':ydl-platform')){
......@@ -176,6 +175,12 @@ dependencies {
}
implementation project(':ydl-webview')
implementation project(':ydl-media')
// api rootProject.ext.dependencies["ydl-m-fm-module-ydl"]
// api rootProject.ext.dependencies["ydl-m-fm-api"]
api project(':m-fm')
implementation modularPublication('com.ydl:m-fm-api')
} else {
//发布模式
api 'com.ydl:m-user-module-ydl:0.0.6'
......
......@@ -19,9 +19,11 @@ import com.ydl.component.mvp.DemoPresenter
import com.ydl.media.audio.PlayService
import com.ydl.ydl_router.manager.YDLRouterManager
import com.ydl.ydl_router.manager.YDLRouterParams
import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.mvp.lce.BaseLceActivity
import com.ydl.ydlcommon.router.IYDLRouterConstant
import com.yidianling.common.tools.ToastUtil
import com.yidianling.fm.api.service.IFMService
import com.yidianling.tests.home.TestHomeActivity
import kotlinx.android.synthetic.main.activity_main.*
......@@ -31,9 +33,18 @@ import kotlinx.android.synthetic.main.activity_main.*
*/
class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(),
DemoContract.View {
private var serviceConnection: ServiceConnection? = null
protected var playService: PlayService? = null
override fun getContentViewId(): Int {
return R.id.lce_content_view
}
override fun getStateViewId(): Int {
return R.id.lce_state_view
}
override fun setData(data: String) {
tv_content.text = data
}
......@@ -48,10 +59,10 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
override fun initDataAndEvent() {
bindService()
loadData()
reLoadData()
requestPermission()
tv_user.setOnClickListener {
loadData()
reLoadData()
}
tv_home.setOnClickListener {
......@@ -102,13 +113,14 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
}
bt_to_fm.setOnClickListener {
YDLRouterManager.router(IYDLRouterConstant.ROUTER_FM_LIST)
startActivity(ModularServiceManager.provide(IFMService::class.java).fmListIntent(this))
// YDLRouterManager.router(IYDLRouterConstant.ROUTER_FM_LIST)
}
}
override fun loadData() {
override fun reLoadData() {
mPresenter?.loadUsers()
}
......
......@@ -6,6 +6,14 @@ import com.ydl.component.mvp.DemoPresenter
import com.ydl.ydlcommon.mvp.lce.BaseLceActivity
class MusicPlayActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(), DemoContract.View {
override fun getContentViewId(): Int {
return R.id.lce_content_view
}
override fun getStateViewId(): Int {
return R.id.lce_state_view
}
private var mPlayFragment: PlayFragment? = null
override fun createPresenter(): DemoContract.Presenter {
......@@ -17,10 +25,10 @@ class MusicPlayActivity : BaseLceActivity<DemoContract.View, DemoContract.Prese
}
override fun initDataAndEvent() {
loadData()
reLoadData()
}
override fun loadData() {
override fun reLoadData() {
mPresenter.loadFmMusic()
}
......
......@@ -18,7 +18,8 @@ import io.reactivex.Observable
class DemoModel : BaseModel(), DemoContract.Model {
override fun getFmMusic(): Observable<HomeFMBean> {
return YDLHttpUtils.obtainApi(DemoService::class.java)
.getFMData().compose(RxUtils.resultJavaData())
.getFMData()
.compose(RxUtils.resultJavaData())
}
......
......@@ -24,18 +24,15 @@ class DemoPresenter : BasePresenter<DemoContract.View,DemoContract.Model>(),
}
override fun onSuccess(homeFMBean: HomeFMBean) {
// var jsonStirng = Gson().toJson(homeFMBean.list)
// val list = Gson().fromJson<ArrayList<Music>>(jsonStirng, object : TypeToken<ArrayList<Music>>() {}.type)
homeFMBean.list?.let {
AudioPlayer.get().addPlayList(stringToMusicPlayerList(it))
mView.setData("")
}
}
})
}
override fun loadHome() = mModel!!.getHome()
override fun loadHome() = mModel.getHome()
.compose(RxUtils.applySchedulers(mView))
.subscribe(object : CommonObserver<JsonObject>() {
override fun onError(errorMsg: String) {
......@@ -43,11 +40,11 @@ class DemoPresenter : BasePresenter<DemoContract.View,DemoContract.Model>(),
override fun onSuccess(users: JsonObject) {
var cateTitle = users.getAsJsonObject("data").getAsJsonArray("askCategoryData").get(0).asJsonObject.get("cateTitle").asString;
mView?.setData(cateTitle)
mView.setData(cateTitle)
}
})
override fun loadUsers() = mModel!!.getUser()
override fun loadUsers() = mModel.getUser()
.compose(RxUtils.applySchedulers(mView))//使用 Rxlifecycle,使 Disposable 和 Activity 一起销毁
.subscribe(object : CommonObserver<JsonArray>() {
override fun onError(errorMsg: String) {
......
......@@ -169,12 +169,16 @@ ext {
"ydl-hnet" : 'com.ydl:h-net:0.0.8',
"ydl-utils" : 'com.ydl:ydl-utils:0.0.2',
"ydl-net" : 'com.ydl:ydl-net:0.0.1',
//Modular Api
"ydl-user-router" : 'com.ydl:router:1.0.0-SNAPSHOT@aar',
"ydl-platform" : 'com.ydl:ydl-platform:0.0.10@aar',
//功能组件
"ydl-platform" : 'com.ydl:ydl-platform:0.0.13@aar',
"ydl-webview" : 'com.ydl:ydl-webview:0.0.15@aar',
//业务组件
"ydl-m-user-api" : 'com.ydl:m-user-api:0.0.5',
"ydl-webview" : 'com.ydl:ydl-webview:0.0.14@aar',
"ydl-m-muse-api" : 'com.ydl:m-muse-api:0.0.1@aar'
"ydl-m-muse-api" : 'com.ydl:m-muse-api:0.0.1',
"ydl-m-fm-api" : 'com.ydl:m-fm-api:0.0.2',
"ydl-m-fm-module-ydl" : 'com.ydl:m-fm-module-ydl:0.0.1@aar'
]
}
......@@ -8,14 +8,14 @@ modular {
groupId = "com.ydl"
artifactId = "m-consultant-module-xlzx"
// 上报的 心理咨询 业务模块 aar 包的版本号
version = "0.0.11"
version = "0.0.13"
}
ydl{
groupId = "com.ydl"
artifactId = "m-consultant-module-ydl"
// 上报的 壹点灵 业务模块 aar 包的版本号
version = "0.0.11"
version = "0.0.13"
}
}
......
......@@ -2,6 +2,13 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'plugin.resTools' // 资源重命名插件
// 配置资源重命名插件
resConfig {
new_prefix = 'fm_' // 资源前缀
old_prefix = '' // 老前缀,可为''空字符串
}
kapt {
arguments {
......@@ -62,18 +69,18 @@ dependencies {
// 注意此处的依赖方式:kotlin中使用和java中使用方式有不同
kapt "com.alibaba:arouter-compiler:$arouter_compiler"
api rootProject.ext.dependencies["ydl-user-router"]
if (rootProject.ext.dev_mode){
//开发时使用
api project(":ydl-platform")
api project(':m-user')
implementation project(':ydl-media')
implementation modularPublication('com.ydl:m-user-api')
implementation project(':ydl-media')
} else {
//发布时使用
api rootProject.ext.dependencies["ydl-m-user-api"]
api(rootProject.ext.dependencies["ydl-platform"]) {
transitive = true
}
implementation project(':ydl-media')
implementation rootProject.ext.dependencies["ydl-m-user-api"]
implementation rootProject.ext.dependencies["ydl-platform"]
}
}
......@@ -15,7 +15,7 @@ modular {
groupId = "com.ydl"
artifactId = "m-fm-module-ydl"
// 上报的 壹点灵 业务模块 aar 包的版本号
version = "0.0.1"
version = "0.0.6"
}
}
......@@ -24,7 +24,7 @@ modular {
groupId = "com.ydl"
artifactId = "m-fm-api"
//开发时注释掉版本号,发布api时打开
//version = "0.0.1"
version = "0.0.2"
// API 层打包时需要引入的依赖
apiDependencies {
implementation "com.google.code.gson:gson:2.8.2"
......
package com.yidianling.fm;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.widget.PopupWindow;
......@@ -11,6 +14,7 @@ import com.ydl.media.view.PlayerFloatHelper;
import com.ydl.ydlcommon.adapter.FragmentWithTabPagerAdapter;
import com.ydl.ydlcommon.base.BaseActivity;
import com.ydl.ydlcommon.utils.PopUtils;
import com.ydl.ydlcommon.utils.bitmap.ColorUtil;
import com.ydl.ydlcommon.view.SlidingTabLayout;
import com.ydl.ydlcommon.view.TitleBar;
......@@ -34,11 +38,13 @@ public class FMActivity extends BaseActivity {
private PopupWindow popupWindow;
public static Intent newIntent(Activity activity) {
Intent intent = new Intent(activity, FMActivity.class);
return intent;
}
@Override
protected int layoutResId() {
return R.layout.activity_fm;
return R.layout.fm_activity_fm;
}
@Override
......@@ -75,9 +81,10 @@ public class FMActivity extends BaseActivity {
}
FragmentWithTabPagerAdapter adapter = new FragmentWithTabPagerAdapter(getSupportFragmentManager(), titleList, fragmentList);
stl_tab.setBackgroundColor(Color.WHITE);
stl_tab.setSelectedIndicatorColors(ColorUtil.changeColor(this, R.color.fm_google_green));
stl_tab.setSelectColor(ColorUtil.changeColor(this, R.color.fm_google_green));
vp_content.setAdapter(adapter);
stl_tab.setIsDoubleTab(true);
stl_tab.setSelectedIndicatorColors(0xFF1da1f2);
stl_tab.setDividerColors(Color.TRANSPARENT);
stl_tab.setViewPager(vp_content);
vp_content.setCurrentItem(0);
......
......@@ -25,15 +25,12 @@ import com.alibaba.android.arouter.facade.annotation.Route;
import com.ydl.media.audio.AudioPlayer;
import com.ydl.media.audio.OnPlayerEventListener;
import com.ydl.media.audio.model.Music;
import com.ydl.media.audio.utils.PlayProgressUtil;
import com.ydl.media.view.PlayerFloatHelper;
import com.ydl.ydl_image.module.GlideApp;
import com.ydl.ydl_image.transform.GlideCircleRingTransform;
import com.ydl.ydlcommon.base.BaseActivity;
import com.ydl.ydlcommon.data.http.RxUtils;
import com.ydl.ydlcommon.data.http.ThrowableConsumer;
import com.ydl.ydlcommon.router.YdlCommonOut;
import com.ydl.ydlcommon.utils.UMEventUtils;
import com.ydl.ydlcommon.utils.remind.ToastHelper;
import com.ydl.ydlcommon.view.TitleBar;
import com.ydl.ydlcommon.view.dialog.YDLShareDialog;
......@@ -158,7 +155,7 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
@Override
protected int layoutResId() {
return R.layout.activity_fm_detail;
return R.layout.fm_activity_fm_detail;
}
/**
......@@ -438,7 +435,7 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
// if (PlayerFloatHelper.Companion.isFmPlaying()) {
// iv_play.setImageResource(R.drawable.fm_stop_2);
// } else {
// iv_play.setImageResource(R.drawable.fm_play_2);
// iv_play.setImageResource(R.drawable.fm_fm_play_2);
// }
// }
......
......@@ -27,7 +27,7 @@ public class FMListItemView extends LinearLayout {
public FMListItemView(Context context) {
super(context);
inflate(context, R.layout.ui_fm_list_item, this);
inflate(context, R.layout.fm_ui_fm_list_item, this);
sdv_head = findViewById(R.id.sdv_head);
tv_title = findViewById(R.id.tv_title);
tv_anchor = findViewById(R.id.tv_anchor);
......
......@@ -52,7 +52,7 @@ public class FMListViewFragment extends BaseFragment implements PtrHandler, Load
@Override
public int layoutResId() {
return R.layout.fragment_fm_list_view;
return R.layout.fm_fragment_fm_list_view;
}
@Override
......@@ -71,7 +71,7 @@ public class FMListViewFragment extends BaseFragment implements PtrHandler, Load
store_house_ptr_frame = getRootView().findViewById(R.id.store_house_ptr_frame);
}
final MaterialHeader header = new MaterialHeader(getActivity());
int color = getResources().getColor(R.color.google_green);
int color = getResources().getColor(R.color.fm_google_green);
header.setColorSchemeColors(new int[]{color});
header.setLayoutParams(new PtrFrameLayout.LayoutParams(-1, -2));
int padding = (int) getActivity().getResources().getDimension(R.dimen.platform_default_dis_size);
......
package com.yidianling.fm;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.RectF;
import android.graphics.Typeface;
import android.util.AttributeSet;
import android.view.View;
public class RoundProgressBar extends View {
private Paint paint;
private int roundColor;
private int roundProgressColor;
private int textColor;
private float textSize;
private float roundWidth;
private int max;
private int progress;
private boolean textIsDisplayable;
private int style;
public static final int STROKE = 0;
public static final int FILL = 1;
public RoundProgressBar(Context context) {
this(context, null);
}
public RoundProgressBar(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public RoundProgressBar(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
paint = new Paint();
TypedArray mTypedArray = context.obtainStyledAttributes(attrs,
R.styleable.RoundProgressBar);
roundColor = mTypedArray.getColor(
R.styleable.RoundProgressBar_roundColor, 0x558B8B8B);
roundProgressColor = mTypedArray.getColor(
R.styleable.RoundProgressBar_roundProgressColor, 0xFF91E300);
textColor = mTypedArray.getColor(
R.styleable.RoundProgressBar_textColor, Color.GREEN);
textSize = mTypedArray.getDimension(
R.styleable.RoundProgressBar_textSize, 15);
roundWidth = mTypedArray.getDimension(
R.styleable.RoundProgressBar_roundWidth, 5);
max = mTypedArray.getInteger(R.styleable.RoundProgressBar_round_progress_bar_max_num, 100);
textIsDisplayable = mTypedArray.getBoolean(
R.styleable.RoundProgressBar_textIsDisplayable, true);
style = mTypedArray.getInt(R.styleable.RoundProgressBar_style, 0);
mTypedArray.recycle();
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
int centre = getWidth() / 2;
int radius = (int) (centre - roundWidth / 2);
canvas.save();
canvas.rotate(-90, centre, centre);
paint.setColor(roundColor);
paint.setStyle(Paint.Style.STROKE);
paint.setStrokeWidth(roundWidth);
paint.setAntiAlias(true);
canvas.drawCircle(centre, centre, radius, paint);
paint.setStrokeWidth(0);
paint.setColor(textColor);
paint.setTextSize(textSize);
paint.setTypeface(Typeface.DEFAULT_BOLD);
int percent = (int) (((float) progress / (float) max) * 100);
float textWidth = paint.measureText(percent + "%");
if (textIsDisplayable && percent != 0 && style == STROKE) {
canvas.drawText(percent + "%", centre - textWidth / 2, centre
+ textSize / 2, paint);
}
paint.setStrokeWidth(roundWidth);
paint.setColor(roundProgressColor);
RectF oval = new RectF(centre - radius, centre - radius, centre
+ radius, centre + radius);
switch (style) {
case STROKE: {
paint.setStyle(Paint.Style.STROKE);
canvas.drawArc(oval, 0, 360 * progress / max, false, paint);
break;
}
case FILL: {
paint.setStyle(Paint.Style.FILL_AND_STROKE);
if (progress != 0)
canvas.drawArc(oval, 0, 360 * progress / max, true, paint);
break;
}
}
canvas.restore();
}
public synchronized int getMax() {
return max;
}
public synchronized void setMax(int max) {
if (max < 0) {
throw new IllegalArgumentException("max not less than 0");
}
this.max = max;
}
public synchronized int getProgress() {
return progress;
}
public synchronized void setProgress(int progress) {
if (progress < 0) {
throw new IllegalArgumentException("progress not less than 0");
}
if (progress > max) {
progress = max;
}
if (progress <= max) {
this.progress = progress;
postInvalidate();
}
}
public int getCricleColor() {
return roundColor;
}
public void setCricleColor(int cricleColor) {
this.roundColor = cricleColor;
}
public int getCricleProgressColor() {
return roundProgressColor;
}
public void setCricleProgressColor(int cricleProgressColor) {
this.roundProgressColor = cricleProgressColor;
}
public int getTextColor() {
return textColor;
}
public void setTextColor(int textColor) {
this.textColor = textColor;
}
public float getTextSize() {
return textSize;
}
public void setTextSize(float textSize) {
this.textSize = textSize;
}
public float getRoundWidth() {
return roundWidth;
}
public void setRoundWidth(float roundWidth) {
this.roundWidth = roundWidth;
}
}
package com.yidianling.fm.modular
import android.app.Activity
import android.content.Context
import android.content.Intent
import com.alibaba.android.arouter.facade.annotation.Route
import com.ydl.media.audio.AudioPlayer
import com.ydl.media.view.PlayerFloatHelper
import com.yidianling.fm.FMActivity
import com.yidianling.fm.FMDetailActivity
import com.yidianling.fm.api.service.IFMService
/**
* Created by xj on 2019/11/6.
*/
@Route(path = "/fm/FMService")
class FMServiceImpl : IFMService {
constructor()
override fun init(context: Context?) {
}
/**
* 打开FM列表页面
*/
override fun fmListIntent(activity: Activity): Intent {
return FMActivity.newIntent(activity)
}
/**
* 打开FM播放页面
*/
override fun fmDetailIntent(activity: Activity, id: Int): Intent {
return FMDetailActivity.newIntent(activity, id)
}
/**
* 打开FM播放页面
*/
override fun fmDetailIntent(activity: Activity, id: Int, isSplash: Boolean): Intent {
return FMDetailActivity.newIntent(activity, id, isSplash)
}
/**
* 获取FM播放ID
*/
override fun getFmId(): Int {
return PlayerFloatHelper.getFmId()
}
/**
* 关闭音乐播放
*/
override fun closePlayer() {
if (AudioPlayer.get().isPlaying) {
AudioPlayer.get().stopPlayer()
}
}
/**
* 判断是否正在播放中
*/
override fun isPlaying(): Boolean {
return AudioPlayer.get().isPlaying
}
/**
* 暂停播放
*/
override fun pause(){
AudioPlayer.get().pausePlayer()
}
override fun replay() {}
}
\ No newline at end of file
......@@ -15,7 +15,6 @@ object FMIn {
fun isLogin(): Boolean {
return ModularServiceManager.provide(IUserService::class.java).isLogin()
// return RouterManager.getUserRouter()?.isLogin()?:false
}
fun mainIntent(activity: Activity): Intent? {
......
package com.yidianling.fm.api.service
import android.app.Activity
import android.content.Intent
import com.alibaba.android.arouter.facade.template.IProvider
/**
......@@ -7,4 +9,19 @@ import com.alibaba.android.arouter.facade.template.IProvider
*/
interface IFMService: IProvider{
fun fmListIntent(activity: Activity): Intent
fun fmDetailIntent(activity: Activity, id: Int): Intent
fun fmDetailIntent(activity: Activity, id: Int, isSplash: Boolean): Intent
fun getFmId(): Int
fun closePlayer()
fun isPlaying(): Boolean
fun pause()
fun replay()
}
\ No newline at end of file
......@@ -9,7 +9,7 @@
android:width="7dp"
android:height="7dp" />
<stroke android:color="@color/white" android:width="1dp"/>
<solid android:color="@color/google_green" />
<solid android:color="@color/fm_google_green" />
</shape>
</item>
<item>
......
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/fm_nim_picker_preview_pressed" android:state_pressed="true"></item>
<item android:drawable="@drawable/fm_nim_picker_preview_disable" android:state_enabled="false"></item>
<item android:drawable="@drawable/fm_nim_picker_preview_normal"></item>
</selector>
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/nim_picker_preview_pressed" android:state_pressed="true"></item>
<item android:drawable="@drawable/nim_picker_preview_disable" android:state_enabled="false"></item>
<item android:drawable="@drawable/nim_picker_preview_normal"></item>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.ydl.ydlcommon.view.TitleBar
android:id="@+id/tb_title"
android:layout_width="match_parent"
android:layout_height="@dimen/title_bar_height"
app:pa_left_start_icon_color="@color/google_green"
app:pa_title_text="心灵电台" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.ydl.ydlcommon.view.SlidingTabLayout
android:id="@+id/stl_tab"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white" />
</FrameLayout>
<ImageView
android:layout_width="match_parent"
android:layout_height="@dimen/divide_line_stroke_width"
android:background="@color/divide_color" />
<android.support.v4.view.ViewPager
android:id="@+id/vp_content"
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="1" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.ydl.ydlcommon.view.TitleBar
android:id="@+id/tb_title"
android:layout_width="match_parent"
android:layout_height="@dimen/title_bar_height"
app:pa_left_start_icon_color="@color/fm_google_green"
app:pa_title_text="心灵电台" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.ydl.ydlcommon.view.SlidingTabLayout
android:id="@+id/stl_tab"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"/>
</FrameLayout>
<ImageView
android:layout_width="match_parent"
android:layout_height="@dimen/divide_line_stroke_width"
android:background="@color/fm_divide_color" />
<android.support.v4.view.ViewPager
android:id="@+id/vp_content"
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="1" />
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/ll_root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/fm_play_in"
android:fitsSystemWindows="true"
android:orientation="vertical">
<com.ydl.ydlcommon.view.TitleBar
android:id="@+id/tb_title"
android:layout_width="match_parent"
android:layout_height="@dimen/title_bar_height"
android:background="@color/transparent"
app:pa_left_start_icon="@drawable/fm_back"
app:pa_right_start_icon="@drawable/fm_item"
app:pa_title_bar_text_color="@color/white"
app:pa_title_text="心灵电台" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="74dp"
android:gravity="center_vertical"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.yidianling.fm.widget.FMSurfaceView
android:id="@+id/fmSurfaceView"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<LinearLayout
android:id="@+id/ll_last_time"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<android.support.v7.widget.CardView
android:id="@+id/fm_card"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:cardElevation="0dp">
<ImageView
android:id="@+id/fm_img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/fm_hint_img"
android:scaleType="centerCrop"/>
</android.support.v7.widget.CardView>
</LinearLayout>
<ProgressBar
android:id="@+id/circle_progress"
style="?android:attr/progressBarStyleLarge"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_centerInParent="true"
android:background="@drawable/shape_circle_black_bg"
android:visibility="gone"/>
<ImageView
android:id="@+id/refresh_icon"
android:layout_width="@dimen/platform_dp_25"
android:layout_height="@dimen/platform_dp_25"
android:src="@drawable/heart_refresh"
android:layout_centerInParent="true"
android:visibility="gone"/>
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_bottom"
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_alignParentBottom="true"
android:gravity="center_vertical">
<ImageView
android:id="@+id/iv_love"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="@dimen/platform_dp_19"
android:scaleType="fitCenter"
android:src="@drawable/fm_love_n_2" />
<ImageView
android:id="@+id/iv_last"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="@dimen/platform_dp_36"
android:src="@drawable/fm_last_2" />
<ImageView
android:id="@+id/iv_play"
android:layout_width="0dp"
android:layout_weight="2"
android:layout_height="60dp"
android:layout_centerInParent="true"
android:src="@drawable/fm_play_2"/>
<ImageView
android:id="@+id/iv_next"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="36dp"
android:src="@drawable/fm_next_2" />
<ImageView
android:id="@+id/iv_share"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="19dp"
android:src="@drawable/fm_share_2" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_above="@+id/ll_bottom"
android:gravity="center"
android:layout_marginBottom="39dp">
<TextView
android:id="@+id/tv_fm_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:textColor="@color/platform_color_FFFFFF"
android:textSize="@dimen/platform_dp_16"
android:visibility="gone"/>
<TextView
android:id="@+id/tv_anchor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="主播:"
android:textColor="@color/platform_color_FFFFFF"
android:textSize="@dimen/platform_dp_12"
android:layout_marginTop="@dimen/platform_dp_4"
android:layout_marginBottom="@dimen/platform_dp_10"
android:visibility="gone"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center"
android:layout_marginTop="@dimen/platform_dp_6">
<ImageView
android:id="@+id/tv_listen_icon"
android:layout_width="@dimen/platform_dp_15"
android:layout_height="@dimen/platform_dp_12"
android:src="@drawable/fm_listen_2"
android:layout_marginRight="@dimen/platform_dp_5"
android:visibility="gone"/>
<TextView
android:id="@+id/tv_listen"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0"
android:textStyle="bold"
android:textColor="@color/platform_color_FFFFFF"
android:textSize="13dp"
android:layout_marginRight="@dimen/platform_dp_19"
android:visibility="gone" />
<ImageView
android:id="@+id/tv_like_icon"
android:layout_width="@dimen/platform_dp_16"
android:layout_height="@dimen/platform_dp_13"
android:src="@drawable/fm_like_2"
android:layout_marginTop="0.5dp"
android:layout_marginRight="@dimen/platform_dp_5"
android:visibility="gone"/>
<TextView
android:id="@+id/tv_like"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0"
android:textStyle="bold"
android:textColor="@color/platform_color_FFFFFF"
android:textSize="13dp"
android:visibility="gone"/>
</LinearLayout>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/ll_bottom"
android:layout_marginBottom="-12dp"
android:orientation="vertical">
<TextView
android:id="@+id/tv_currentTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginBottom="@dimen/platform_dp_7"
android:layout_marginLeft="@dimen/platform_dp_25"
android:layout_weight="1"
android:text=""
android:textColor="#FFFFFF"
android:textSize="@dimen/dp_10" />
<TextView
android:id="@+id/tv_allTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginBottom="@dimen/platform_dp_7"
android:layout_marginRight="@dimen/platform_dp_25"
android:layout_weight="1"
android:text=""
android:textColor="#FFFFFF"
android:textSize="@dimen/dp_10" />
<SeekBar
android:id="@+id/fm_progress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_currentTime"
android:layout_marginLeft="@dimen/platform_dp_25"
android:layout_marginRight="@dimen/platform_dp_25"
android:maxHeight="1dp"
android:minHeight="1dp"
android:paddingStart="4dp"
android:paddingEnd="4dp"
android:progressDrawable="@drawable/seekbar_fm_drag"
android:thumb="@drawable/dot_seekbar_fm" />
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/ll_root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/fm_play_in"
android:fitsSystemWindows="true"
android:orientation="vertical">
<com.ydl.ydlcommon.view.TitleBar
android:id="@+id/tb_title"
android:layout_width="match_parent"
android:layout_height="@dimen/title_bar_height"
android:background="@color/transparent"
app:pa_left_start_icon="@drawable/fm_back"
app:pa_right_start_icon="@drawable/fm_item"
app:pa_title_bar_text_color="@color/white"
app:pa_title_text="心灵电台" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="74dp"
android:gravity="center_vertical"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.yidianling.fm.widget.FMSurfaceView
android:id="@+id/fmSurfaceView"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<LinearLayout
android:id="@+id/ll_last_time"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<android.support.v7.widget.CardView
android:id="@+id/fm_card"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:cardElevation="0dp">
<ImageView
android:id="@+id/fm_img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/fm_hint_img"
android:scaleType="centerCrop"/>
</android.support.v7.widget.CardView>
</LinearLayout>
<ProgressBar
android:id="@+id/circle_progress"
style="?android:attr/progressBarStyleLarge"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_centerInParent="true"
android:background="@drawable/fm_shape_circle_black_bg"
android:visibility="gone"/>
<ImageView
android:id="@+id/refresh_icon"
android:layout_width="@dimen/platform_dp_25"
android:layout_height="@dimen/platform_dp_25"
android:src="@drawable/fm_heart_refresh"
android:layout_centerInParent="true"
android:visibility="gone"/>
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_bottom"
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_alignParentBottom="true"
android:gravity="center_vertical">
<ImageView
android:id="@+id/iv_love"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="@dimen/platform_dp_19"
android:scaleType="fitCenter"
android:src="@drawable/fm_love_n_2" />
<ImageView
android:id="@+id/iv_last"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="@dimen/platform_dp_36"
android:src="@drawable/fm_last_2" />
<ImageView
android:id="@+id/iv_play"
android:layout_width="0dp"
android:layout_weight="2"
android:layout_height="60dp"
android:layout_centerInParent="true"
android:src="@drawable/fm_play_2"/>
<ImageView
android:id="@+id/iv_next"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="36dp"
android:src="@drawable/fm_next_2" />
<ImageView
android:id="@+id/iv_share"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="19dp"
android:src="@drawable/fm_share_2" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_above="@+id/ll_bottom"
android:gravity="center"
android:layout_marginBottom="39dp">
<TextView
android:id="@+id/tv_fm_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:textColor="@color/platform_color_FFFFFF"
android:textSize="@dimen/platform_dp_16"
android:visibility="gone"/>
<TextView
android:id="@+id/tv_anchor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="主播:"
android:textColor="@color/platform_color_FFFFFF"
android:textSize="@dimen/platform_dp_12"
android:layout_marginTop="@dimen/platform_dp_4"
android:layout_marginBottom="@dimen/platform_dp_10"
android:visibility="gone"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center"
android:layout_marginTop="@dimen/platform_dp_6">
<ImageView
android:id="@+id/tv_listen_icon"
android:layout_width="@dimen/platform_dp_15"
android:layout_height="@dimen/platform_dp_12"
android:src="@drawable/fm_listen_2"
android:layout_marginRight="@dimen/platform_dp_5"
android:visibility="gone"/>
<TextView
android:id="@+id/tv_listen"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0"
android:textStyle="bold"
android:textColor="@color/platform_color_FFFFFF"
android:textSize="13dp"
android:layout_marginRight="@dimen/platform_dp_19"
android:visibility="gone" />
<ImageView
android:id="@+id/tv_like_icon"
android:layout_width="@dimen/platform_dp_16"
android:layout_height="@dimen/platform_dp_13"
android:src="@drawable/fm_like_2"
android:layout_marginTop="0.5dp"
android:layout_marginRight="@dimen/platform_dp_5"
android:visibility="gone"/>
<TextView
android:id="@+id/tv_like"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0"
android:textStyle="bold"
android:textColor="@color/platform_color_FFFFFF"
android:textSize="13dp"
android:visibility="gone"/>
</LinearLayout>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/ll_bottom"
android:layout_marginBottom="-12dp"
android:orientation="vertical">
<TextView
android:id="@+id/tv_currentTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginBottom="@dimen/platform_dp_7"
android:layout_marginLeft="@dimen/platform_dp_25"
android:layout_weight="1"
android:text=""
android:textColor="#FFFFFF"
android:textSize="@dimen/dp_10" />
<TextView
android:id="@+id/tv_allTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginBottom="@dimen/platform_dp_7"
android:layout_marginRight="@dimen/platform_dp_25"
android:layout_weight="1"
android:text=""
android:textColor="#FFFFFF"
android:textSize="@dimen/dp_10" />
<SeekBar
android:id="@+id/fm_progress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_currentTime"
android:layout_marginLeft="@dimen/platform_dp_25"
android:layout_marginRight="@dimen/platform_dp_25"
android:maxHeight="1dp"
android:minHeight="1dp"
android:paddingStart="4dp"
android:paddingEnd="4dp"
android:progressDrawable="@drawable/fm_seekbar_fm_drag"
android:thumb="@drawable/fm_dot_seekbar_fm" />
</RelativeLayout>
</RelativeLayout>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<in.srain.cube.views.ptr.PtrFrameLayout
android:id="@+id/store_house_ptr_frame"
android:layout_width="match_parent"
android:layout_height="match_parent">
<in.srain.cube.views.loadmore.LoadMoreListViewContainer
android:id="@+id/load_more_list_view_container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
android:id="@+id/lv_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="@color/divide_color"
android:dividerHeight="@dimen/divide_line_stroke_width" />
<com.ydl.ydlcommon.ui.LogoLoadingView
android:id="@+id/v_loading"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<LinearLayout
android:id="@+id/ll_empty"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/empty_video" />
<TextView
android:id="@+id/ll_empty_txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/platform_default_dis_size_huge"
android:text="还没有喜欢的电台内容"
android:textColor="#D6D6D6" />
</LinearLayout>
</in.srain.cube.views.loadmore.LoadMoreListViewContainer>
</in.srain.cube.views.ptr.PtrFrameLayout>
</FrameLayout>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<in.srain.cube.views.ptr.PtrFrameLayout
android:id="@+id/store_house_ptr_frame"
android:layout_width="match_parent"
android:layout_height="match_parent">
<in.srain.cube.views.loadmore.LoadMoreListViewContainer
android:id="@+id/load_more_list_view_container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
android:id="@+id/lv_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="@color/fm_divide_color"
android:dividerHeight="@dimen/divide_line_stroke_width" />
<com.ydl.ydlcommon.ui.LogoLoadingView
android:id="@+id/v_loading"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<LinearLayout
android:id="@+id/ll_empty"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/fm_empty_video" />
<TextView
android:id="@+id/ll_empty_txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/platform_default_dis_size_huge"
android:text="还没有喜欢的电台内容"
android:textColor="#D6D6D6" />
</LinearLayout>
</in.srain.cube.views.loadmore.LoadMoreListViewContainer>
</in.srain.cube.views.ptr.PtrFrameLayout>
</FrameLayout>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:padding="@dimen/platform_default_dis_size">
<ImageView
android:id="@+id/sdv_head"
android:layout_width="112dp"
android:layout_height="70dp"
android:layout_centerVertical="true"
android:contentDescription="@null"
android:scaleType="centerCrop" />
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/iv_next"
android:layout_toRightOf="@+id/sdv_head"
android:padding="@dimen/platform_default_dis_size_small"
android:text=""
android:textSize="@dimen/platform_default_text_size_big" />
<TextView
android:id="@+id/tv_anchor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_title"
android:layout_toRightOf="@+id/sdv_head"
android:drawablePadding="@dimen/platform_default_dis_size_micro"
android:padding="@dimen/platform_default_dis_size_small"
android:text="主播:"
android:textColor="@color/platform_default_text_color_hint" />
<TextView
android:id="@+id/tv_listen_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_title"
android:layout_toLeftOf="@+id/iv_next"
android:layout_toRightOf="@+id/tv_anchor"
android:drawablePadding="@dimen/platform_default_dis_size_micro"
android:padding="@dimen/platform_default_dis_size_small"
android:text="收听:0"
android:textColor="@color/platform_default_text_color_hint" />
<ImageView
android:id="@+id/iv_next"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@drawable/msg_next" />
</RelativeLayout>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:padding="@dimen/platform_default_dis_size">
<ImageView
android:id="@+id/sdv_head"
android:layout_width="112dp"
android:layout_height="70dp"
android:layout_centerVertical="true"
android:contentDescription="@null"
android:scaleType="centerCrop" />
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/iv_next"
android:layout_toRightOf="@+id/sdv_head"
android:padding="@dimen/platform_default_dis_size_small"
android:text=""
android:textSize="@dimen/platform_default_text_size_big" />
<TextView
android:id="@+id/tv_anchor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_title"
android:layout_toRightOf="@+id/sdv_head"
android:drawablePadding="@dimen/platform_default_dis_size_micro"
android:padding="@dimen/platform_default_dis_size_small"
android:text="主播:"
android:textColor="@color/platform_default_text_color_hint" />
<TextView
android:id="@+id/tv_listen_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_title"
android:layout_toLeftOf="@+id/iv_next"
android:layout_toRightOf="@+id/tv_anchor"
android:drawablePadding="@dimen/platform_default_dis_size_micro"
android:padding="@dimen/platform_default_dis_size_small"
android:text="收听:0"
android:textColor="@color/platform_default_text_color_hint" />
<ImageView
android:id="@+id/iv_next"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@drawable/fm_msg_next" />
</RelativeLayout>
<?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:gravity="center_vertical"
android:orientation="horizontal"
android:padding="15dp">
<ImageView
android:id="@+id/iv_head"
android:layout_width="60dp"
android:layout_height="60dp"
android:contentDescription="@string/platform_header"
android:src="@drawable/platform_default_img" />
<TextView
android:id="@+id/tv_title"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:layout_weight="1"
android:background="?android:attr/selectableItemBackground"
android:ellipsize="end"
android:gravity="center_vertical"
android:maxLines="2"
android:textColor="@color/platform_default_text_color"
android:textSize="14sp"
tools:text="课课程名称课程名称课程名称课程名称课程名称课" />
<ImageButton
android:id="@+id/btn_pause_play"
style="@android:style/Widget.Holo.Button.Borderless.Small"
android:layout_width="48dp"
android:layout_height="48dp"
android:contentDescription="@string/platform_pause_play"
android:scaleType="centerInside"
android:src="@drawable/ic_pause_24dp" />
<ImageButton
android:id="@+id/btn_close"
style="@android:style/Widget.Holo.Button.Borderless.Small"
android:layout_width="48dp"
android:layout_height="48dp"
android:contentDescription="@string/platform_close"
android:scaleType="centerInside"
android:src="@drawable/ic_close_24dp" />
</LinearLayout>
\ 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:gravity="center_vertical"
android:orientation="horizontal"
android:padding="15dp">
<ImageView
android:id="@+id/iv_head"
android:layout_width="60dp"
android:layout_height="60dp"
android:contentDescription="@string/platform_header"
android:src="@drawable/platform_default_img" />
<TextView
android:id="@+id/tv_title"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:layout_weight="1"
android:background="?android:attr/selectableItemBackground"
android:ellipsize="end"
android:gravity="center_vertical"
android:maxLines="2"
android:textColor="@color/platform_default_text_color"
android:textSize="14sp"
tools:text="课课程名称课程名称课程名称课程名称课程名称课" />
<ImageButton
android:id="@+id/btn_pause_play"
style="@android:style/Widget.Holo.Button.Borderless.Small"
android:layout_width="48dp"
android:layout_height="48dp"
android:contentDescription="@string/platform_pause_play"
android:scaleType="centerInside"
android:src="@drawable/fm_ic_pause_24dp" />
<ImageButton
android:id="@+id/btn_close"
style="@android:style/Widget.Holo.Button.Borderless.Small"
android:layout_width="48dp"
android:layout_height="48dp"
android:contentDescription="@string/platform_close"
android:scaleType="centerInside"
android:src="@drawable/fm_ic_close_24dp" />
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--RoundProgressBar-->
<declare-styleable name="RoundProgressBar">
<attr name="roundColor" format="color" />
<attr name="roundProgressColor" format="color" />
<attr name="roundWidth" format="dimension"></attr>
<attr name="textColor" format="color" />
<attr name="textSize" format="dimension" />
<attr name="round_progress_bar_max_num" format="integer"></attr>
<attr name="textIsDisplayable" format="boolean"></attr>
<attr name="style">
<enum name="STROKE" value="0"></enum>
<enum name="FILL" value="1"></enum>
</attr>
</declare-styleable>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="divide_color">#EDEDED</color>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="fm_divide_color">#EDEDED</color>
</resources>
<resources>
<string name="app_name">FM</string>
</resources>
<resources>
<string name="fm_app_name">FM</string>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="google_green">#2ca94f</color>
<color name="fm_google_green">#FFDD33</color>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="google_green">#1da1f2</color>
<color name="fm_google_green">#1da1f2</color>
</resources>
\ No newline at end of file
......@@ -68,6 +68,7 @@ dependencies {
implementation project(':ydl-media')
} else {
//发布时使用
implementation project(':ydl-media')
api(rootProject.ext.dependencies["ydl-platform"]) {
transitive = true
}
......
......@@ -78,7 +78,7 @@ dependencies {
implementation modularPublication('com.ydl:m-test-api')
}else {
//发布时使用
compileOnly rootProject.ext.dependencies["ydl-m-test-api"]
implementation modularPublication('com.ydl:m-test-api')
api rootProject.ext.dependencies["ydl-webview"]
api(rootProject.ext.dependencies["ydl-platform"]) {
transitive = true
......
......@@ -8,14 +8,14 @@ modular {
groupId = "com.ydl"
artifactId = "m-user-module-xlzx"
// 上报的 心理咨询 业务模块 aar 包的版本号
version = "0.0.19"
version = "0.0.21"
}
ydl{
groupId = "com.ydl"
artifactId = "m-user-module-ydl"
// 上报的 壹点灵 业务模块 aar 包的版本号
version = "0.0.19"
version = "0.0.21"
}
}
......
IS_PUBLISH=true
VERSION_NAME=0.0.1
\ No newline at end of file
VERSION_NAME=0.0.4
\ No newline at end of file
IS_PUBLISH=true
VERSION_NAME=0.0.10
\ No newline at end of file
VERSION_NAME=0.0.13
\ No newline at end of file
......@@ -86,6 +86,7 @@ object RxUtils {
/**
* RxJava 线程协调 / RxLifecycle绑定方法
* 自动调用 showLoading/hideLoading 方法
* @param view LceView 强转使用
*/
fun <T> applySchedulers(view: ILceView): ObservableTransformer<T, T> {
......
......@@ -2,7 +2,6 @@ package com.ydl.ydlcommon.mvp.lce
import android.support.annotation.CallSuper
import android.view.View
import com.ydl.ydlcommon.R
import com.ydl.ydlcommon.base.BaseMvpActivity
import com.ydl.ydlcommon.mvp.base.IPresenter
import com.ydl.ydlcommon.mvp.base.IView
......@@ -13,34 +12,28 @@ import com.ydl.ydlcommon.mvp.lce.view.ILceViewState
* Des: LCE 架构 BaseActivity,统一处理页面加载状态
* LCE:L:Loading加载,C:Content加载内容,E:Error加载失败
*
* 【注意:StateView需设置id为:R.id.lce_state_view】
* 【注意:ContentView需设置id为:R.id.lce_content_view】
* 【注意:StateView需继承 ILceViewState 接口】
*/
abstract class BaseLceActivity<V : IView, P : IPresenter<V>> : BaseMvpActivity<V, P>(), ILceView{
abstract class BaseLceActivity<V : IView, P : IPresenter<V>> : BaseMvpActivity<V, P>(), ILceView {
protected lateinit var lceStateView: ILceViewState
protected var lceContentView: View? = null
private var lceStateView: ILceViewState? = null
private var lceContentView: View? = null
@CallSuper
override fun onContentChanged() {
super.onContentChanged()
lceStateView = createStateView()
lceContentView = createContentView()
if (lceContentView == null) {
throw NullPointerException(
"请检查布局文件中ContentView是否设置,id需为R.id.lce_content_view"
)
}
}
protected fun createStateView(): ILceViewState {
val stateView = findViewById<View>(R.id.lce_state_view)
if (stateView is ILceViewState) {
private fun createStateView(): ILceViewState {
val stateView:View? = findViewById<View>(getStateViewId())
if (stateView != null && stateView is ILceViewState) {
val viewState = stateView as ILceViewState
viewState.setListener(object : ILceViewState.LogoLoadingListener {
override fun onDataResetClick() {
loadData()
reLoadData()
}
override fun onBackClick() {
......@@ -51,33 +44,48 @@ abstract class BaseLceActivity<V : IView, P : IPresenter<V>> : BaseMvpActivity<V
}
throw NullPointerException(
"请检查布局文件中StateView是否设置,id需为R.id.lce_state_view"
"请检查布局文件中 StateView 是否设置,StateView 需继承 ILceViewState 接口 , className:${this.javaClass.simpleName}"
)
}
protected fun createContentView(): View {
return findViewById(R.id.lce_content_view)
private fun createContentView(): View {
val contentView: View? = findViewById<View>(getContentViewId())
?: throw NullPointerException(
"请检查布局文件中 ContentView 是否设置 , className:${this.javaClass.simpleName}"
)
return contentView!!
}
/**
* 获取 ContentView 控件ID
*/
abstract fun getContentViewId(): Int
/**
* 获取 StateVie 控件 ID
*/
abstract fun getStateViewId(): Int
override fun showLoading() {
lceStateView.showLoading()
lceStateView?.showLoading()
lceContentView?.visibility = View.INVISIBLE
}
override fun hideLoading() {
lceStateView.hideLoading()
}
override fun showContent() {
lceContentView?.visibility = View.VISIBLE
lceStateView.hideLoading()
lceStateView?.hideLoading()
}
override fun showEmpty(msg: String) {
lceStateView.showEmpty(msg)
lceContentView?.visibility = View.INVISIBLE
lceStateView?.showEmpty(msg)
}
override fun showError(msg: String) {
lceStateView.showError(msg)
lceContentView?.visibility = View.INVISIBLE
lceStateView?.showError(msg)
}
}
......
......@@ -4,7 +4,6 @@ import android.os.Bundle
import android.support.annotation.CallSuper
import android.support.v4.app.FragmentActivity
import android.view.View
import com.ydl.ydlcommon.R
import com.ydl.ydlcommon.base.BaseMvpDialogFragment
import com.ydl.ydlcommon.mvp.base.IPresenter
import com.ydl.ydlcommon.mvp.base.IView
......@@ -21,30 +20,23 @@ import java.util.*
*/
abstract class BaseLceDialogFragment<V : IView, P : IPresenter<V>> : BaseMvpDialogFragment<V, P>(), ILceView {
protected var lceStateView: ILceViewState? = null
protected var lceContentView: View? = null
private var lceStateView: ILceViewState? = null
private var lceContentView: View? = null
@CallSuper
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
lceStateView = createStateView(view)
lceContentView = createContentView(view)
if (lceContentView == null) {
throw NullPointerException(
"请检查布局文件中ContentView是否设置,id需为R.id.lce_content_view"
)
}
}
protected fun createStateView(view: View): ILceViewState {
val stateView = view.findViewById<View>(R.id.lce_state_view)
if (stateView is ILceViewState) {
private fun createStateView(view: View): ILceViewState {
val stateView:View? = view.findViewById<View>(getStateViewId())
if (stateView != null && stateView is ILceViewState) {
val viewState = stateView as ILceViewState
viewState.setListener(object : ILceViewState.LogoLoadingListener {
override fun onDataResetClick() {
loadData()
reLoadData()
}
override fun onBackClick() {
......@@ -55,34 +47,48 @@ abstract class BaseLceDialogFragment<V : IView, P : IPresenter<V>> : BaseMvpDial
}
throw NullPointerException(
"请检查布局文件中StateView是否设置,id需为R.id.lce_state_view"
"请检查布局文件中 StateView 是否设置,StateView 需继承 ILceViewState 接口 , className:${this.javaClass.simpleName}"
)
}
private fun createContentView(view: View): View {
val contentView: View? = view.findViewById<View>(getContentViewId())
?: throw NullPointerException(
"请检查布局文件中 ContentView 是否设置 , className:${this.javaClass.simpleName}"
)
protected fun createContentView(view: View): View {
return view.findViewById(R.id.lce_content_view)
return contentView!!
}
/**
* 获取 ContentView 控件ID
*/
abstract fun getContentViewId(): Int
/**
* 获取 StateVie 控件 ID
*/
abstract fun getStateViewId(): Int
override fun showLoading() {
lceStateView!!.showLoading()
lceStateView?.showLoading()
lceContentView?.visibility = View.INVISIBLE
}
override fun hideLoading() {
lceStateView!!.hideLoading()
}
override fun showContent() {
lceContentView?.visibility = View.VISIBLE
lceStateView!!.hideLoading()
lceStateView?.hideLoading()
}
override fun showEmpty(msg: String) {
lceStateView!!.showEmpty(msg)
lceContentView?.visibility = View.INVISIBLE
lceStateView?.showEmpty(msg)
}
override fun showError(msg: String) {
lceStateView!!.showError(msg)
lceContentView?.visibility = View.INVISIBLE
lceStateView?.showError(msg)
}
override fun onDestroyView() {
......
......@@ -4,7 +4,6 @@ import android.os.Bundle
import android.support.annotation.CallSuper
import android.support.v4.app.FragmentActivity
import android.view.View
import com.ydl.ydlcommon.R
import com.ydl.ydlcommon.base.BaseMvpFragment
import com.ydl.ydlcommon.mvp.base.IPresenter
import com.ydl.ydlcommon.mvp.base.IView
......@@ -20,8 +19,8 @@ import java.util.*
*/
abstract class BaseLceFragment< V : IView, P : IPresenter<V>> : BaseMvpFragment<V, P>(), ILceView {
protected var lceStateView: ILceViewState? = null
protected var lceContentView: View? = null
private var lceStateView: ILceViewState? = null
private var lceContentView: View? = null
@CallSuper
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
......@@ -37,13 +36,13 @@ abstract class BaseLceFragment< V : IView, P : IPresenter<V>> : BaseMvpFragment<
}
protected fun createStateView(view: View): ILceViewState {
val stateView = view.findViewById<View>(R.id.lce_state_view)
if (stateView is ILceViewState) {
private fun createStateView(view: View): ILceViewState {
val stateView:View? = view.findViewById<View>(getStateViewId())
if (stateView != null && stateView is ILceViewState) {
val viewState = stateView as ILceViewState
viewState.setListener(object : ILceViewState.LogoLoadingListener {
override fun onDataResetClick() {
loadData()
reLoadData()
}
override fun onBackClick() {
......@@ -54,34 +53,48 @@ abstract class BaseLceFragment< V : IView, P : IPresenter<V>> : BaseMvpFragment<
}
throw NullPointerException(
"请检查布局文件中StateView是否设置,id需为R.id.lce_state_view"
"请检查布局文件中 StateView 是否设置,StateView 需继承 ILceViewState 接口 , className:${this.javaClass.simpleName}"
)
}
private fun createContentView(view: View): View {
val contentView: View? = view.findViewById<View>(getContentViewId())
?: throw NullPointerException(
"请检查布局文件中 ContentView 是否设置 , className:${this.javaClass.simpleName}"
)
protected fun createContentView(view: View): View {
return view.findViewById(R.id.lce_content_view)
return contentView!!
}
/**
* 获取 ContentView 控件ID
*/
abstract fun getContentViewId(): Int
/**
* 获取 StateVie 控件 ID
*/
abstract fun getStateViewId(): Int
override fun showLoading() {
lceStateView!!.showLoading()
lceStateView?.showLoading()
lceContentView?.visibility = View.INVISIBLE
}
override fun hideLoading() {
lceStateView!!.hideLoading()
}
override fun showContent() {
lceContentView?.visibility = View.VISIBLE
lceStateView!!.hideLoading()
lceStateView?.hideLoading()
}
override fun showEmpty(msg: String) {
lceStateView!!.showEmpty(msg)
lceContentView?.visibility = View.INVISIBLE
lceStateView?.showEmpty(msg)
}
override fun showError(msg: String) {
lceStateView!!.showError(msg)
lceContentView?.visibility = View.INVISIBLE
lceStateView?.showError(msg)
}
override fun onDestroyView() {
......
......@@ -16,15 +16,12 @@ interface ILceView : IView{
fun hideLoading()
@UiThread
fun showContent()
@UiThread
fun showError(msg: String)
@UiThread
fun showEmpty(msg: String)
@UiThread
fun loadData()
fun reLoadData()
}
package com.ydl.ydlcommon.utils.bitmap;
import android.content.Context;
import android.graphics.Color;
import android.graphics.LinearGradient;
import android.graphics.Shader;
......@@ -460,4 +461,13 @@ public class ColorUtil {
return Color.argb(alpha, red, green, blue);
}
public static int changeColor(Context context, int id){
StringBuffer stringBuffer = new StringBuffer();
int color = context.getResources().getColor(id);
String hexCode = String.format("#%06X", Integer.valueOf(16777215 & color));
return Color.parseColor(hexCode);
}
}
......@@ -74,9 +74,13 @@ public class SlidingTabLayout extends HorizontalScrollView {
private static final int TITLE_OFFSET_DIPS = 24;
private static final int TAB_VIEW_PADDING_DIPS = 16;
private static final int TAB_VIEW_TEXT_SIZE_SP = 14;
private static final int SELECT_TEXT_COLOR = 0xFF1da1f2;
private static int SELECT_TEXT_COLOR = 0xFF1da1f2;
private static final int UNSELECT_TEXT_COLOR = 0xFF7D7D7D;
public static void setSelectColor(int color) {
SELECT_TEXT_COLOR = color;
}
private boolean isDoubleTab = false;//this mode has two tab and can not slide
private int mTitleOffset;
......
IS_PUBLISH=true
VERSION_NAME=0.0.14
\ No newline at end of file
VERSION_NAME=0.0.15
\ 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