Commit 7f2786b4 by konghaorui

fm 模块- 资源前缀重命名

parent 79185d0b
...@@ -2,6 +2,13 @@ apply plugin: 'com.android.library' ...@@ -2,6 +2,13 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android' apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-android-extensions'
apply plugin: 'plugin.resTools' // 资源重命名插件
// 配置资源重命名插件
resConfig {
new_prefix = 'fm_' // 资源前缀
old_prefix = '' // 老前缀,可为''空字符串
}
kapt { kapt {
arguments { arguments {
......
...@@ -38,7 +38,7 @@ public class FMActivity extends BaseActivity { ...@@ -38,7 +38,7 @@ public class FMActivity extends BaseActivity {
@Override @Override
protected int layoutResId() { protected int layoutResId() {
return R.layout.activity_fm; return R.layout.fm_activity_fm;
} }
@Override @Override
......
...@@ -158,7 +158,7 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen ...@@ -158,7 +158,7 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
@Override @Override
protected int layoutResId() { protected int layoutResId() {
return R.layout.activity_fm_detail; return R.layout.fm_activity_fm_detail;
} }
/** /**
...@@ -302,9 +302,9 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen ...@@ -302,9 +302,9 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
refresh_icon.setVisibility(View.GONE); refresh_icon.setVisibility(View.GONE);
anim.cancel(); anim.cancel();
if (AudioPlayer.Companion.get().isPlaying()) { if (AudioPlayer.Companion.get().isPlaying()) {
iv_play.setImageResource(R.drawable.fm_stop_2); iv_play.setImageResource(R.drawable.fm_fm_stop_2);
} else { } else {
iv_play.setImageResource(R.drawable.fm_play_2); iv_play.setImageResource(R.drawable.fm_fm_play_2);
} }
LogUtil.d("id equal " + id); LogUtil.d("id equal " + id);
} }
...@@ -323,7 +323,7 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen ...@@ -323,7 +323,7 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
@Override @Override
public void onStartTrackingTouch(SeekBar seekBar) { public void onStartTrackingTouch(SeekBar seekBar) {
iv_play.setImageResource(R.drawable.fm_play_2); iv_play.setImageResource(R.drawable.fm_fm_play_2);
AudioPlayer.Companion.get().pausePlayer(); AudioPlayer.Companion.get().pausePlayer();
} }
...@@ -348,7 +348,7 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen ...@@ -348,7 +348,7 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
canNext = false; canNext = false;
if (PlayerFloatHelper.Companion.getFmId() != id) { if (PlayerFloatHelper.Companion.getFmId() != id) {
anim.start(); anim.start();
iv_play.setImageResource(R.drawable.fm_stop_2); iv_play.setImageResource(R.drawable.fm_fm_stop_2);
fmSurfaceView.stopTimer(); fmSurfaceView.stopTimer();
fm_progress.setEnabled(false); fm_progress.setEnabled(false);
if (type) { if (type) {
...@@ -399,9 +399,9 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen ...@@ -399,9 +399,9 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
tv_listen.setVisibility(View.VISIBLE); tv_listen.setVisibility(View.VISIBLE);
} }
if (fmDetail.is_favorite() == 1) {//love if (fmDetail.is_favorite() == 1) {//love
iv_love.setImageResource(R.drawable.fm_love_h_2); iv_love.setImageResource(R.drawable.fm_fm_love_h_2);
} else { } else {
iv_love.setImageResource(R.drawable.fm_love_n_2); iv_love.setImageResource(R.drawable.fm_fm_love_n_2);
} }
canNext = true; canNext = true;
LogUtil.d("fmDetail.id " + fmDetail.getId()); LogUtil.d("fmDetail.id " + fmDetail.getId());
...@@ -423,7 +423,7 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen ...@@ -423,7 +423,7 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
map.put("fmAuthor", String.valueOf(fmDetail.getAuthor())); map.put("fmAuthor", String.valueOf(fmDetail.getAuthor()));
map.put("fmImageUrl", String.valueOf(fmDetail.getImage_url())); map.put("fmImageUrl", String.valueOf(fmDetail.getImage_url()));
PlayerFloatHelper.Companion.setPlayTempData(map); PlayerFloatHelper.Companion.setPlayTempData(map);
iv_play.setImageResource(R.drawable.fm_stop_2); iv_play.setImageResource(R.drawable.fm_fm_stop_2);
fm_progress.setProgress(0); fm_progress.setProgress(0);
}else { }else {
this.time = Integer.parseInt(String.valueOf(AudioPlayer.Companion.get().getAudioPosition())); this.time = Integer.parseInt(String.valueOf(AudioPlayer.Companion.get().getAudioPosition()));
...@@ -436,9 +436,9 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen ...@@ -436,9 +436,9 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
//todo xujian 通知栏改变状态修改应用内播放状态图标 //todo xujian 通知栏改变状态修改应用内播放状态图标
// public void onEventMainThread(UpdatePlayStatusEvent status) { // public void onEventMainThread(UpdatePlayStatusEvent status) {
// if (PlayerFloatHelper.Companion.isFmPlaying()) { // if (PlayerFloatHelper.Companion.isFmPlaying()) {
// iv_play.setImageResource(R.drawable.fm_stop_2); // iv_play.setImageResource(R.drawable.fm_fm_stop_2);
// } else { // } else {
// iv_play.setImageResource(R.drawable.fm_play_2); // iv_play.setImageResource(R.drawable.fm_fm_play_2);
// } // }
// } // }
...@@ -456,11 +456,11 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen ...@@ -456,11 +456,11 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
if (i == R.id.iv_play) { if (i == R.id.iv_play) {
if (AudioPlayer.Companion.get().isPlaying()) { if (AudioPlayer.Companion.get().isPlaying()) {
AudioPlayer.Companion.get().pausePlayer(); AudioPlayer.Companion.get().pausePlayer();
iv_play.setImageResource(R.drawable.fm_play_2); iv_play.setImageResource(R.drawable.fm_fm_play_2);
fmSurfaceView.stopTimer(); fmSurfaceView.stopTimer();
} else { } else {
AudioPlayer.Companion.get().startPlayer(); AudioPlayer.Companion.get().startPlayer();
iv_play.setImageResource(R.drawable.fm_stop_2); iv_play.setImageResource(R.drawable.fm_fm_stop_2);
fmSurfaceView.playTimer(); fmSurfaceView.playTimer();
} }
...@@ -520,9 +520,9 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen ...@@ -520,9 +520,9 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe(favFM -> { .subscribe(favFM -> {
if (favFM.getStatus() == 1) { if (favFM.getStatus() == 1) {
iv_love.setImageResource(R.drawable.fm_love_h_2); iv_love.setImageResource(R.drawable.fm_fm_love_h_2);
} else { } else {
iv_love.setImageResource(R.drawable.fm_love_n_2); iv_love.setImageResource(R.drawable.fm_fm_love_n_2);
} }
}, new ThrowableConsumer() { }, new ThrowableConsumer() {
@Override @Override
...@@ -632,7 +632,7 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen ...@@ -632,7 +632,7 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
refresh_icon.setVisibility(View.GONE); refresh_icon.setVisibility(View.GONE);
anim.cancel(); anim.cancel();
fm_progress.setEnabled(true); fm_progress.setEnabled(true);
iv_play.setImageResource(R.drawable.fm_stop_2); iv_play.setImageResource(R.drawable.fm_fm_stop_2);
fmSurfaceView.playTimer(); fmSurfaceView.playTimer();
} }
......
...@@ -27,7 +27,7 @@ public class FMListItemView extends LinearLayout { ...@@ -27,7 +27,7 @@ public class FMListItemView extends LinearLayout {
public FMListItemView(Context context) { public FMListItemView(Context context) {
super(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); sdv_head = findViewById(R.id.sdv_head);
tv_title = findViewById(R.id.tv_title); tv_title = findViewById(R.id.tv_title);
tv_anchor = findViewById(R.id.tv_anchor); tv_anchor = findViewById(R.id.tv_anchor);
......
...@@ -52,7 +52,7 @@ public class FMListViewFragment extends BaseFragment implements PtrHandler, Load ...@@ -52,7 +52,7 @@ public class FMListViewFragment extends BaseFragment implements PtrHandler, Load
@Override @Override
public int layoutResId() { public int layoutResId() {
return R.layout.fragment_fm_list_view; return R.layout.fm_fragment_fm_list_view;
} }
@Override @Override
......
<?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"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<com.ydl.ydlcommon.view.TitleBar <com.ydl.ydlcommon.view.TitleBar
android:id="@+id/tb_title" android:id="@+id/tb_title"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/title_bar_height" android:layout_height="@dimen/title_bar_height"
app:pa_left_start_icon_color="@color/google_green" app:pa_left_start_icon_color="@color/google_green"
app:pa_title_text="心灵电台" /> app:pa_title_text="心灵电台" />
<FrameLayout <FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<com.ydl.ydlcommon.view.SlidingTabLayout <com.ydl.ydlcommon.view.SlidingTabLayout
android:id="@+id/stl_tab" android:id="@+id/stl_tab"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/white" /> android:background="@color/white" />
</FrameLayout> </FrameLayout>
<ImageView <ImageView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/divide_line_stroke_width" android:layout_height="@dimen/divide_line_stroke_width"
android:background="@color/divide_color" /> android:background="@color/fm_divide_color" />
<android.support.v4.view.ViewPager <android.support.v4.view.ViewPager
android:id="@+id/vp_content" android:id="@+id/vp_content"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0px" android:layout_height="0px"
android:layout_weight="1" /> android:layout_weight="1" />
</LinearLayout> </LinearLayout>
\ No newline at end of file
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<in.srain.cube.views.ptr.PtrFrameLayout <in.srain.cube.views.ptr.PtrFrameLayout
android:id="@+id/store_house_ptr_frame" android:id="@+id/store_house_ptr_frame"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<in.srain.cube.views.loadmore.LoadMoreListViewContainer <in.srain.cube.views.loadmore.LoadMoreListViewContainer
android:id="@+id/load_more_list_view_container" android:id="@+id/load_more_list_view_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<ListView <ListView
android:id="@+id/lv_content" android:id="@+id/lv_content"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:divider="@color/divide_color" android:divider="@color/fm_divide_color"
android:dividerHeight="@dimen/divide_line_stroke_width" /> android:dividerHeight="@dimen/divide_line_stroke_width" />
<com.ydl.ydlcommon.ui.LogoLoadingView <com.ydl.ydlcommon.ui.LogoLoadingView
android:id="@+id/v_loading" android:id="@+id/v_loading"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"/> android:layout_height="match_parent"/>
<LinearLayout <LinearLayout
android:id="@+id/ll_empty" android:id="@+id/ll_empty"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center" android:gravity="center"
android:orientation="vertical"> android:orientation="vertical">
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:src="@drawable/empty_video" /> android:src="@drawable/fm_empty_video" />
<TextView <TextView
android:id="@+id/ll_empty_txt" android:id="@+id/ll_empty_txt"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/platform_default_dis_size_huge" android:layout_marginTop="@dimen/platform_default_dis_size_huge"
android:text="还没有喜欢的电台内容" android:text="还没有喜欢的电台内容"
android:textColor="#D6D6D6" /> android:textColor="#D6D6D6" />
</LinearLayout> </LinearLayout>
</in.srain.cube.views.loadmore.LoadMoreListViewContainer> </in.srain.cube.views.loadmore.LoadMoreListViewContainer>
</in.srain.cube.views.ptr.PtrFrameLayout> </in.srain.cube.views.ptr.PtrFrameLayout>
</FrameLayout> </FrameLayout>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/white" android:background="@color/white"
android:padding="@dimen/platform_default_dis_size"> android:padding="@dimen/platform_default_dis_size">
<ImageView <ImageView
android:id="@+id/sdv_head" android:id="@+id/sdv_head"
android:layout_width="112dp" android:layout_width="112dp"
android:layout_height="70dp" android:layout_height="70dp"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:contentDescription="@null" android:contentDescription="@null"
android:scaleType="centerCrop" /> android:scaleType="centerCrop" />
<TextView <TextView
android:id="@+id/tv_title" android:id="@+id/tv_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/iv_next" android:layout_toLeftOf="@+id/iv_next"
android:layout_toRightOf="@+id/sdv_head" android:layout_toRightOf="@+id/sdv_head"
android:padding="@dimen/platform_default_dis_size_small" android:padding="@dimen/platform_default_dis_size_small"
android:text="" android:text=""
android:textSize="@dimen/platform_default_text_size_big" /> android:textSize="@dimen/platform_default_text_size_big" />
<TextView <TextView
android:id="@+id/tv_anchor" android:id="@+id/tv_anchor"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/tv_title" android:layout_below="@+id/tv_title"
android:layout_toRightOf="@+id/sdv_head" android:layout_toRightOf="@+id/sdv_head"
android:drawablePadding="@dimen/platform_default_dis_size_micro" android:drawablePadding="@dimen/platform_default_dis_size_micro"
android:padding="@dimen/platform_default_dis_size_small" android:padding="@dimen/platform_default_dis_size_small"
android:text="主播:" android:text="主播:"
android:textColor="@color/platform_default_text_color_hint" /> android:textColor="@color/platform_default_text_color_hint" />
<TextView <TextView
android:id="@+id/tv_listen_num" android:id="@+id/tv_listen_num"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/tv_title" android:layout_below="@+id/tv_title"
android:layout_toLeftOf="@+id/iv_next" android:layout_toLeftOf="@+id/iv_next"
android:layout_toRightOf="@+id/tv_anchor" android:layout_toRightOf="@+id/tv_anchor"
android:drawablePadding="@dimen/platform_default_dis_size_micro" android:drawablePadding="@dimen/platform_default_dis_size_micro"
android:padding="@dimen/platform_default_dis_size_small" android:padding="@dimen/platform_default_dis_size_small"
android:text="收听:0" android:text="收听:0"
android:textColor="@color/platform_default_text_color_hint" /> android:textColor="@color/platform_default_text_color_hint" />
<ImageView <ImageView
android:id="@+id/iv_next" android:id="@+id/iv_next"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:src="@drawable/msg_next" /> android:src="@drawable/fm_msg_next" />
</RelativeLayout> </RelativeLayout>
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="15dp"> android:padding="15dp">
<ImageView <ImageView
android:id="@+id/iv_head" android:id="@+id/iv_head"
android:layout_width="60dp" android:layout_width="60dp"
android:layout_height="60dp" android:layout_height="60dp"
android:contentDescription="@string/platform_header" android:contentDescription="@string/platform_header"
android:src="@drawable/platform_default_img" /> android:src="@drawable/platform_default_img" />
<TextView <TextView
android:id="@+id/tv_title" android:id="@+id/tv_title"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="12dp" android:layout_marginLeft="12dp"
android:layout_marginRight="12dp" android:layout_marginRight="12dp"
android:layout_weight="1" android:layout_weight="1"
android:background="?android:attr/selectableItemBackground" android:background="?android:attr/selectableItemBackground"
android:ellipsize="end" android:ellipsize="end"
android:gravity="center_vertical" android:gravity="center_vertical"
android:maxLines="2" android:maxLines="2"
android:textColor="@color/platform_default_text_color" android:textColor="@color/platform_default_text_color"
android:textSize="14sp" android:textSize="14sp"
tools:text="课课程名称课程名称课程名称课程名称课程名称课" /> tools:text="课课程名称课程名称课程名称课程名称课程名称课" />
<ImageButton <ImageButton
android:id="@+id/btn_pause_play" android:id="@+id/btn_pause_play"
style="@android:style/Widget.Holo.Button.Borderless.Small" style="@android:style/Widget.Holo.Button.Borderless.Small"
android:layout_width="48dp" android:layout_width="48dp"
android:layout_height="48dp" android:layout_height="48dp"
android:contentDescription="@string/platform_pause_play" android:contentDescription="@string/platform_pause_play"
android:scaleType="centerInside" android:scaleType="centerInside"
android:src="@drawable/ic_pause_24dp" /> android:src="@drawable/fm_ic_pause_24dp" />
<ImageButton <ImageButton
android:id="@+id/btn_close" android:id="@+id/btn_close"
style="@android:style/Widget.Holo.Button.Borderless.Small" style="@android:style/Widget.Holo.Button.Borderless.Small"
android:layout_width="48dp" android:layout_width="48dp"
android:layout_height="48dp" android:layout_height="48dp"
android:contentDescription="@string/platform_close" android:contentDescription="@string/platform_close"
android:scaleType="centerInside" android:scaleType="centerInside"
android:src="@drawable/ic_close_24dp" /> android:src="@drawable/fm_ic_close_24dp" />
</LinearLayout> </LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<color name="divide_color">#EDEDED</color> <color name="fm_divide_color">#EDEDED</color>
</resources> </resources>
\ No newline at end of file
<resources> <resources>
<string name="app_name">FM</string> <string name="fm_app_name">FM</string>
</resources> </resources>
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