当前位置: 首页>>代码示例>>Java>>正文


Java Bundle.getBooleanArray方法代码示例

本文整理汇总了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));
}
 
开发者ID:LenaShervarly,项目名称:TreasureHunting,代码行数:18,代码来源:MapsActivity.java

示例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);
}
 
开发者ID:jcolladosp,项目名称:ePills,代码行数:17,代码来源:AddPillSetTime.java

示例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);
    }
}
 
开发者ID:PhoenixDevTeam,项目名称:Phoenix-for-VK,代码行数:13,代码来源:FavePhotoPagerPresenter.java

示例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);
  }
}
 
开发者ID:vanniktech,项目名称:RxPermission,代码行数:10,代码来源:ShadowActivity.java

示例5: getBooleanArray

import android.os.Bundle; //导入方法依赖的package包/类
public boolean[] getBooleanArray(Bundle state, String key) {
    return state.getBooleanArray(key + baseKey);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:4,代码来源:Injector.java

示例6: getBooleanArray

import android.os.Bundle; //导入方法依赖的package包/类
public boolean[] getBooleanArray(Bundle state, String key) {
    return state.getBooleanArray(key + mBaseKey);
}
 
开发者ID:evernote,项目名称:android-state,代码行数:4,代码来源:InjectionHelper.java

示例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();
}
 
开发者ID:joedayz,项目名称:pedidos-app,代码行数:20,代码来源:ExpandableRecyclerViewAdapter.java


注:本文中的android.os.Bundle.getBooleanArray方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。