本文整理汇总了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();
}