本文整理匯總了Java中android.os.Bundle.getBooleanArray方法的典型用法代碼示例。如果您正苦於以下問題:Java Bundle.getBooleanArray方法的具體用法?Java Bundle.getBooleanArray怎麽用?Java Bundle.getBooleanArray使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.os.Bundle
的用法示例。
在下文中一共展示了Bundle.getBooleanArray方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: loadState
import android.os.Bundle; //導入方法依賴的package包/類
private void loadState(Bundle savedInstanceState) {
SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
mLanguage = "en";
mAudioPlaybackController = new AudioPlaybackController(mLanguage, mCurrentGame);
if (savedInstanceState == null)
return;
boolean[] passed = savedInstanceState.getBooleanArray(getString(R.string.audio_point_state));
if (passed != null) {
int i = 0;
for (AudioPoint p : mCurrentGame.getAudioPoints())
mAudioPlaybackController.markAudioPoint(p.Number, passed[i++]);
}
mLastActiveMarker = savedInstanceState.getInt(getString(R.string.last_active_marker));
}
示例2: onRestoreInstanceState
import android.os.Bundle; //導入方法依賴的package包/類
@Override
public void onRestoreInstanceState(Bundle state) {
boolean[] weekstate = state.getBooleanArray(STATE_WEEK);
for (int i = 0; i < weekstate.length; i++) {
LinearLayout day = getDayLayout(i);
day.setTag(weekstate[i]);
}
if (singleSelected) {
disableDays();
} else {
enableDays();
}
super.onRestoreInstanceState(state);
}
示例3: FavePhotoPagerPresenter
import android.os.Bundle; //導入方法依賴的package包/類
public FavePhotoPagerPresenter(@NonNull ArrayList<Photo> photos, int index, int accountId, @Nullable Bundle savedInstanceState) {
super(photos, accountId, savedInstanceState);
this.refreshing = new boolean[photos.size()];
if (savedInstanceState == null) {
mUpdated = new boolean[photos.size()];
setCurrentIndex(index);
refresh(index);
} else {
mUpdated = savedInstanceState.getBooleanArray(SAVE_UPDATED);
}
}
示例4: onCreate
import android.os.Bundle; //導入方法依賴的package包/類
@Override protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (savedInstanceState == null) {
handleIntent(getIntent());
} else {
shouldShowRequestPermissionRationale = savedInstanceState.getBooleanArray(SAVE_RATIONALE);
}
}
示例5: getBooleanArray
import android.os.Bundle; //導入方法依賴的package包/類
public boolean[] getBooleanArray(Bundle state, String key) {
return state.getBooleanArray(key + baseKey);
}
示例6: getBooleanArray
import android.os.Bundle; //導入方法依賴的package包/類
public boolean[] getBooleanArray(Bundle state, String key) {
return state.getBooleanArray(key + mBaseKey);
}
示例7: onRestoreInstanceState
import android.os.Bundle; //導入方法依賴的package包/類
/**
* Fetches the expandable state map from the saved instance state {@link Bundle}
* and restores the expanded states of all of the list items.
* <p>
* Should be called from {@link Activity#onRestoreInstanceState(Bundle)} in
* the {@link Activity} that hosts the RecyclerView that this
* {@link ExpandableRecyclerViewAdapter} is attached to.
* <p>
*
* @param savedInstanceState The {@code Bundle} from which the expanded
* state map is loaded
*/
public void onRestoreInstanceState(Bundle savedInstanceState) {
if (savedInstanceState == null || !savedInstanceState.containsKey(EXPAND_STATE_MAP)) {
return;
}
expandableList.expandedGroupIndexes = savedInstanceState.getBooleanArray(EXPAND_STATE_MAP);
notifyDataSetChanged();
}