當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。