mt6735 在FM station list界面,将当前正在播放的频道标识出来
时间:10-02
整理:3721RD
点击:
[DESCRIPTION]
在FM station list界面,将当前正在播放的频道标识出来.
[SOLUTION]
1.修改FMRadioActivity.java方法:private void enterChannelList()
在 intent.setClass(FMRadioActivity.this, FMRadioFavorite.class);
之前添加:
Bundle bd= new Bundle();
bd.putInt("current_freq",mCurrentStation);
intent.putExtras(bd);
2.修改FMRadioFavorite.java
添加: static private int currentstation;
3.修改 public void onCreate(Bundle savedInstanceState)
在 super.onCreate(savedInstanceState);
之后添加:
Bundle bd = this.getIntent().getExtras();
currentstation=bd.getInt("current_freq");
4.修改 public void bindView(View view, Context context, Cursor cursor)
在 viewHolder.mStationFreqView.setText(FMRadioUtils.formatStation(stationFreq));
之前添加:
if (currentstation== stationFreq) {
stationName =stationName + " now playing!";
}
在FM station list界面,将当前正在播放的频道标识出来.
[SOLUTION]
1.修改FMRadioActivity.java方法:private void enterChannelList()
在 intent.setClass(FMRadioActivity.this, FMRadioFavorite.class);
之前添加:
Bundle bd= new Bundle();
bd.putInt("current_freq",mCurrentStation);
intent.putExtras(bd);
2.修改FMRadioFavorite.java
添加: static private int currentstation;
3.修改 public void onCreate(Bundle savedInstanceState)
在 super.onCreate(savedInstanceState);
之后添加:
Bundle bd = this.getIntent().getExtras();
currentstation=bd.getInt("current_freq");
4.修改 public void bindView(View view, Context context, Cursor cursor)
在 viewHolder.mStationFreqView.setText(FMRadioUtils.formatStation(stationFreq));
之前添加:
if (currentstation== stationFreq) {
stationName =stationName + " now playing!";
}
66666