Commit 7f2786b4 by konghaorui

fm 模块- 资源前缀重命名

parent 79185d0b
......@@ -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 {
......
......@@ -38,7 +38,7 @@ public class FMActivity extends BaseActivity {
@Override
protected int layoutResId() {
return R.layout.activity_fm;
return R.layout.fm_activity_fm;
}
@Override
......
......@@ -158,7 +158,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;
}
/**
......@@ -302,9 +302,9 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
refresh_icon.setVisibility(View.GONE);
anim.cancel();
if (AudioPlayer.Companion.get().isPlaying()) {
iv_play.setImageResource(R.drawable.fm_stop_2);
iv_play.setImageResource(R.drawable.fm_fm_stop_2);
} else {
iv_play.setImageResource(R.drawable.fm_play_2);
iv_play.setImageResource(R.drawable.fm_fm_play_2);
}
LogUtil.d("id equal " + id);
}
......@@ -323,7 +323,7 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
@Override
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();
}
......@@ -348,7 +348,7 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
canNext = false;
if (PlayerFloatHelper.Companion.getFmId() != id) {
anim.start();
iv_play.setImageResource(R.drawable.fm_stop_2);
iv_play.setImageResource(R.drawable.fm_fm_stop_2);
fmSurfaceView.stopTimer();
fm_progress.setEnabled(false);
if (type) {
......@@ -399,9 +399,9 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
tv_listen.setVisibility(View.VISIBLE);
}
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 {
iv_love.setImageResource(R.drawable.fm_love_n_2);
iv_love.setImageResource(R.drawable.fm_fm_love_n_2);
}
canNext = true;
LogUtil.d("fmDetail.id " + fmDetail.getId());
......@@ -423,7 +423,7 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
map.put("fmAuthor", String.valueOf(fmDetail.getAuthor()));
map.put("fmImageUrl", String.valueOf(fmDetail.getImage_url()));
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);
}else {
this.time = Integer.parseInt(String.valueOf(AudioPlayer.Companion.get().getAudioPosition()));
......@@ -436,9 +436,9 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
//todo xujian 通知栏改变状态修改应用内播放状态图标
// public void onEventMainThread(UpdatePlayStatusEvent status) {
// if (PlayerFloatHelper.Companion.isFmPlaying()) {
// iv_play.setImageResource(R.drawable.fm_stop_2);
// iv_play.setImageResource(R.drawable.fm_fm_stop_2);
// } 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
if (i == R.id.iv_play) {
if (AudioPlayer.Companion.get().isPlaying()) {
AudioPlayer.Companion.get().pausePlayer();
iv_play.setImageResource(R.drawable.fm_play_2);
iv_play.setImageResource(R.drawable.fm_fm_play_2);
fmSurfaceView.stopTimer();
} else {
AudioPlayer.Companion.get().startPlayer();
iv_play.setImageResource(R.drawable.fm_stop_2);
iv_play.setImageResource(R.drawable.fm_fm_stop_2);
fmSurfaceView.playTimer();
}
......@@ -520,9 +520,9 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
.observeOn(AndroidSchedulers.mainThread())
.subscribe(favFM -> {
if (favFM.getStatus() == 1) {
iv_love.setImageResource(R.drawable.fm_love_h_2);
iv_love.setImageResource(R.drawable.fm_fm_love_h_2);
} else {
iv_love.setImageResource(R.drawable.fm_love_n_2);
iv_love.setImageResource(R.drawable.fm_fm_love_n_2);
}
}, new ThrowableConsumer() {
@Override
......@@ -632,7 +632,7 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
refresh_icon.setVisibility(View.GONE);
anim.cancel();
fm_progress.setEnabled(true);
iv_play.setImageResource(R.drawable.fm_stop_2);
iv_play.setImageResource(R.drawable.fm_fm_stop_2);
fmSurfaceView.playTimer();
}
......
......@@ -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
......
<?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/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>
<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>
<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>
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