private void updateFavoriteStation(){
  String showString=null;
  if (FmRadioStation.isFavoriteStation(mContext,mCurrentStation)) {
    String stationName=FmRadioStation.getStationName(mContext,mCurrentStation,FmRadioStation.STATION_TYPE_FAVORITE);
    FmRadioStation.updateStationToDb(mContext,stationName,FmRadioStation.STATION_TYPE_SEARCHED,mCurrentStation);
    mButtonAddToFavorite.setImageResource(R.drawable.btn_fm_favorite_off_selector);
    mTextStationName.setText("");
    showString=mProjectStringExt.getProjectString(mContext,R.string.toast_channel_deleted,R.string.toast_channel_deleted1);
  }
 else {
    String stationName=FmRadioStation.getStationName(mContext,mCurrentStation,FmRadioStation.STATION_TYPE_SEARCHED);
    if (FmRadioStation.isStationExist(mContext,mCurrentStation,FmRadioStation.STATION_TYPE_SEARCHED)) {
      FmRadioStation.updateStationToDb(mContext,stationName,FmRadioStation.STATION_TYPE_FAVORITE,mCurrentStation);
    }
 else {
      FmRadioStation.insertStationToDb(mContext,stationName,mCurrentStation,FmRadioStation.STATION_TYPE_FAVORITE);
    }
    mButtonAddToFavorite.setImageResource(R.drawable.btn_fm_favorite_on_selector);
    mTextStationName.setText(stationName);
    showString=mProjectStringExt.getProjectString(mContext,R.string.toast_channel_added,R.string.toast_channel_added1);
  }
  showToast(showString);
}

private void updateFavoriteStation ( ) { String showString = null ; if ( FmRadioStation . isFavoriteStation ( mContext , mCurrentStation ) ) { String stationName = FmRadioStation . getStationName ( mContext , mCurrentStation , FmRadioStation . STATION_TYPE_FAVORITE ) ; FmRadioStation . updateStationToDb ( mContext , stationName , FmRadioStation . STATION_TYPE_SEARCHED , mCurrentStation ) ; mButtonAddToFavorite . setImageResource ( R . drawable . btn_fm_favorite_off_selector ) ; mTextStationName . setText ( "" ) ; showString = mProjectStringExt . getProjectString ( mContext , R . string . toast_channel_deleted , R . string . toast_channel_deleted1 ) ; } else { String stationName = FmRadioStation . getStationName ( mContext , mCurrentStation , FmRadioStation . STATION_TYPE_SEARCHED ) ; if ( FmRadioStation . isStationExist ( mContext , mCurrentStation , FmRadioStation . STATION_TYPE_SEARCHED ) ) { FmRadioStation . updateStationToDb ( mContext , stationName , FmRadioStation . STATION_TYPE_FAVORITE , mCurrentStation ) ; } else { FmRadioStation . insertStationToDb ( mContext , stationName , mCurrentStation , FmRadioStation . STATION_TYPE_FAVORITE ) ; } mButtonAddToFavorite . setImageResource ( R . drawable . btn_fm_favorite_on_selector ) ; mTextStationName . setText ( stationName ) ; showString = mProjectStringExt . getProjectString ( mContext , R . string . toast_channel_added , R . string . toast_channel_added1 ) ; } showToast ( showString ) ; }
update the favorite ui state
