List of usage examples for android.os Bundle getStringArray
@Nullable
public String[] getStringArray(@Nullable String key)
From source file:com.cw.litenote.operation.gallery.GalleryPagerAct.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getActionBar() != null) getActionBar().hide();/* www . j a va2 s . c o m*/ setContentView(R.layout.gallery_pager); Bundle bundle = getIntent().getExtras(); assert bundle != null; String[] imageUrls = bundle.getStringArray(IMAGES); int pagerPosition = bundle.getInt(IMAGE_POSITION, 0); if (savedInstanceState != null) { pagerPosition = savedInstanceState.getInt(STATE_POSITION); } UilCommon.init(); pager = (ViewPager) findViewById(R.id.imagePager); pager.setAdapter(new ImagePagerAdapter(imageUrls)); pager.setCurrentItem(pagerPosition); }
From source file:com.fd.colac.activity.picture.ImagePagerActivity.java
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_image_pager); initImageLoader(this); Bundle bundle = getIntent().getExtras(); String[] imageUrls = bundle.getStringArray(IMAGES); int pagerPosition = bundle.getInt(IMAGE_POSITION, 0); if (savedInstanceState != null) { pagerPosition = savedInstanceState.getInt(STATE_POSITION); }/* w w w .j a v a 2 s . c o m*/ options = new DisplayImageOptions.Builder().showImageForEmptyUri(R.drawable.ic_empty) .showImageOnFail(R.drawable.ic_error).resetViewBeforeLoading(true).cacheOnDisc(true) .imageScaleType(ImageScaleType.EXACTLY).bitmapConfig(Bitmap.Config.ARGB_8888) .displayer(new FadeInBitmapDisplayer(300)).build(); pager = (HackyViewPager) findViewById(R.id.pager); pager.setAdapter(new ImagePagerAdapter(imageUrls, this)); pager.setCurrentItem(pagerPosition); mIndicator = (CirclePageIndicator) findViewById(R.id.indicator); mIndicator.setViewPager(pager); }
From source file:com.lanbiao.youxiaoyunfamily.activity.ImagePagerActivity.java
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.ac_image_pager); Bundle bundle = getIntent().getExtras(); //urlbitmap/*w ww. j a va 2 s . c o m*/ String[] imageUrls = bundle.getStringArray("img"); // View int pagerPosition = bundle.getInt("p", 0); // if (savedInstanceState != null) { pagerPosition = savedInstanceState.getInt(STATE_POSITION); } options = new DisplayImageOptions.Builder().showImageForEmptyUri(R.drawable.ic_empty) .showImageOnFail(R.drawable.ic_error).resetViewBeforeLoading(true).cacheOnDisc(true) .imageScaleType(ImageScaleType.EXACTLY).bitmapConfig(Bitmap.Config.RGB_565) .displayer(new FadeInBitmapDisplayer(300)).build(); pager = (ViewPager) findViewById(R.id.pager); pager.setAdapter(new ImagePagerAdapter(imageUrls)); pager.setCurrentItem(pagerPosition); // View }
From source file:org.bwgz.quotation.activity.CursorLoaderManagerActivity.java
@Override public Loader<Cursor> onCreateLoader(int id, Bundle bundle) { Log.d(TAG, String.format("onCreateLoader - id: %d bundle: %s", id, bundle)); Uri uri = bundle.getParcelable(LOADER_BUNDLE_URI); String[] projection = bundle.getStringArray(LOADER_BUNDLE_PROJECTION); String selection = bundle.getString(LOADER_BUNDLE_SELECTION); String[] selectionArgs = bundle.getStringArray(LOADER_BUNDLE_SELECTION_ARGS); String sortOrder = bundle.getString(LOADER_BUNDLE_SORT_ORDER); Log.d(TAG, String.format("onCreateLoader - uri: %s", uri)); return new CursorLoader(this, uri, projection, selection, selectionArgs, sortOrder); }
From source file:com.cwc.litenote.PicturePagerAct.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // if(Build.VERSION.SDK_INT >= 11) // {// w w w. jav a 2s .c o m // ActionBar actionBar = getActionBar(); // actionBar.setDisplayHomeAsUpEnabled(true); // } getActionBar().hide(); // getActionBar().setDisplayShowHomeEnabled(false); // getActionBar().setDisplayShowTitleEnabled(false); setContentView(R.layout.picture_pager); Bundle bundle = getIntent().getExtras(); assert bundle != null; String[] imageUrls = bundle.getStringArray(IMAGES); int pagerPosition = bundle.getInt(IMAGE_POSITION, 0); if (savedInstanceState != null) { pagerPosition = savedInstanceState.getInt(STATE_POSITION); } options = new DisplayImageOptions.Builder().showImageForEmptyUri(R.drawable.ic_empty) .showImageOnFail(R.drawable.ic_error).resetViewBeforeLoading(true).cacheOnDisk(true) .imageScaleType(ImageScaleType.EXACTLY).bitmapConfig(Bitmap.Config.RGB_565).considerExifParams(true) .displayer(new FadeInBitmapDisplayer(300)).build(); pager = (ViewPager) findViewById(R.id.imagePager); pager.setAdapter(new ImagePagerAdapter(imageUrls)); pager.setCurrentItem(pagerPosition); }
From source file:com.z299studio.pb.SettingListDialog.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (savedInstanceState != null) { mOptions = savedInstanceState.getStringArray("option_list"); mTitle = savedInstanceState.getString("option_title"); mSelection = savedInstanceState.getInt("option_selection"); }//www.j ava2 s .co m }
From source file:org.qeo.android.security.ManifestDialog.java
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { Bundle args = getArguments(); AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); builder.setTitle(args.getString(ApplicationSecurity.INTENT_EXTRA_TITLE)); builder.setItems(args.getStringArray(ApplicationSecurity.INTENT_EXTRA_PERMISSIONS), null); // Add the buttons builder.setPositiveButton(R.string.accept, new DialogInterface.OnClickListener() { @Override/* w ww . ja va 2 s . c o m*/ public void onClick(DialogInterface dialog, int id) { notifyClicked(true); } }); builder.setNegativeButton(R.string.reject, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int id) { notifyClicked(false); } }); return builder.create(); }
From source file:mobi.itson.semanaisw2013app.ImagePagerActivity.java
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (!imageLoader.isInited()) { imageLoader.init(ImageLoaderConfiguration.createDefault(this)); }// w ww . ja v a 2 s . c om setContentView(R.layout.ac_image_pager); setupActionBar(); Bundle bundle = getIntent().getExtras(); String[] imageUrls = bundle.getStringArray(IMAGES); int pagerPosition = bundle.getInt(IMAGE_POSITION, 0); if (savedInstanceState != null) { pagerPosition = savedInstanceState.getInt(STATE_POSITION); } options = new DisplayImageOptions.Builder().showImageForEmptyUri(drawable.ic_delete) .showImageOnFail(drawable.ic_input_delete).resetViewBeforeLoading().cacheOnDisc() .imageScaleType(ImageScaleType.EXACTLY).bitmapConfig(Bitmap.Config.RGB_565) .displayer(new FadeInBitmapDisplayer(300)).build(); pager = (ViewPager) findViewById(R.id.pager); pager.setAdapter(new ImagePagerAdapter(imageUrls)); pager.setCurrentItem(pagerPosition); }
From source file:com.trin.nilmobile.imageloader.ImagePagerActivity.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.ac_image_pager); ActionBar actionBar = getActionBar(); actionBar.setHomeButtonEnabled(true); actionBar.setDisplayHomeAsUpEnabled(true); actionBar.setTitle(""); Bundle bundle = getIntent().getExtras(); assert bundle != null; String[] imageUrls = bundle.getStringArray(Extra.IMAGES); int pagerPosition = bundle.getInt(Extra.IMAGE_POSITION, 0); if (savedInstanceState != null) { pagerPosition = savedInstanceState.getInt(STATE_POSITION); }// ww w . j a va 2 s.c o m options = new DisplayImageOptions.Builder().showImageForEmptyUri(R.drawable.ic_empty) .showImageOnFail(R.drawable.ic_error).resetViewBeforeLoading(true).cacheOnDisk(true) .imageScaleType(ImageScaleType.EXACTLY).bitmapConfig(Bitmap.Config.RGB_565).considerExifParams(true) .displayer(new FadeInBitmapDisplayer(300)).build(); pager = (ViewPager) findViewById(R.id.pager); pager.setAdapter(new ImagePagerAdapter(imageUrls)); pager.setCurrentItem(pagerPosition); }
From source file:shirantech.gonepal.app.activities.ImagePagerActivity.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.ac_image_pager); // setUpActionbar(); Bundle bundle = getIntent().getExtras(); assert bundle != null; String[] imageUrls = bundle.getStringArray(EXTRA_IMAGES); String[] captions = bundle.getStringArray(EXTRA_IMAGES_TEXT); int pagerPosition = bundle.getInt(EXTRA_IMAGE_POSITION, 0); activityTitle = bundle.getString(EXTRA_TITLE); setActionbarTitle(activityTitle);/*from w w w . j a v a 2 s . c om*/ if (savedInstanceState != null) { pagerPosition = savedInstanceState.getInt(STATE_POSITION); } options = new DisplayImageOptions.Builder().showImageForEmptyUri(R.drawable.ic_launcher) .showImageOnFail(R.drawable.ic_launcher).resetViewBeforeLoading(true).cacheOnDisk(true) .imageScaleType(ImageScaleType.EXACTLY).bitmapConfig(Bitmap.Config.RGB_565).considerExifParams(true) .displayer(new FadeInBitmapDisplayer(300)).build(); pager = (ViewPager) findViewById(R.id.pager); pager.setAdapter(new ImagePagerAdapter(imageUrls, captions)); pager.setCurrentItem(pagerPosition); }