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


Java Bundle.putString方法代码示例

本文整理汇总了Java中android.os.Bundle.putString方法的典型用法代码示例。如果您正苦于以下问题:Java Bundle.putString方法的具体用法?Java Bundle.putString怎么用?Java Bundle.putString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.os.Bundle的用法示例。


在下文中一共展示了Bundle.putString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: fun_openImage

import android.os.Bundle; //导入方法依赖的package包/类
@JavascriptInterface
public void fun_openImage(String jsonString) {
    JSInBean jsInBean = JSBridgeUtil.getInstance().parseJsonArray(jsonString);
    try {
        int options = (int) (new JSONObject(jsInBean.getName()).getDouble("scale") * 100.0d);
        if (this.activityHandler != null) {
            Message message = new Message();
            message.what = 3;
            message.obj = Integer.valueOf(options);
            Bundle bundle = new Bundle();
            bundle.putString(a.c, jsInBean.getCallback());
            bundle.putString("callback_id", jsInBean.getCallback_id());
            message.setData(bundle);
            this.activityHandler.sendMessage(message);
        }
    } catch (JSONException e) {
        e.printStackTrace();
    }
    android.content.Intent intent = new android.content.Intent("android.intent.action.PICK");
    intent.setType("image/*");
    this.mActivity.startActivityForResult(intent, 10002);
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:23,代码来源:JavaScriptinterface.java

示例2: onCreate

import android.os.Bundle; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_product_profile);
    ButterKnife.bind(this);
    if (savedInstanceState == null) {
        ProductSoldFragmentProfile fragment = new ProductSoldFragmentProfile();
        Bundle args = new Bundle();
        Bundle extras = getIntent().getExtras();
        System.out.println(getIntent().getStringExtra(ViMarket.seller_ID));
        args.putString(ViMarket.seller_ID,  getIntent().getStringExtra(ViMarket.seller_ID));
        fragment.setArguments(args);
        getSupportFragmentManager().beginTransaction().replace(R.id.product_profile_container, fragment).commit();

    }
    Intent returnIntent = new Intent();
    setResult(Activity.RESULT_CANCELED, returnIntent);

}
 
开发者ID:sega4revenge,项目名称:Sega,代码行数:20,代码来源:ProfileProductSold.java

示例3: onSaveInstanceState

import android.os.Bundle; //导入方法依赖的package包/类
/**
 * Taking or choosing a picture launches another Activity, so we need to implement the
 * save/restore APIs to handle the case where the CordovaActivity is killed by the OS
 * before we get the launched Activity's result.
 */
public Bundle onSaveInstanceState() {
    Bundle state = new Bundle();
    state.putInt("destType", this.destType);
    state.putInt("srcType", this.srcType);
    state.putInt("mQuality", this.mQuality);
    state.putInt("targetWidth", this.targetWidth);
    state.putInt("targetHeight", this.targetHeight);
    state.putInt("encodingType", this.encodingType);
    state.putInt("mediaType", this.mediaType);
    state.putInt("numPics", this.numPics);
    state.putBoolean("allowEdit", this.allowEdit);
    state.putBoolean("correctOrientation", this.correctOrientation);
    state.putBoolean("saveToPhotoAlbum", this.saveToPhotoAlbum);

    if (this.croppedUri != null) {
        state.putString("croppedUri", this.croppedUri.toString());
    }

    if (this.imageUri != null) {
        state.putString("imageUri", this.imageUri.getFileUri().toString());
    }

    return state;
}
 
开发者ID:Andy-Ta,项目名称:COB,代码行数:30,代码来源:CameraLauncher.java

示例4: handleMessage

import android.os.Bundle; //导入方法依赖的package包/类
public void handleMessage(Message msg) {
	HiBangUser user = ((SLoginMsg)msg.obj).getUser();
	if (user.getUserID() == -1) {
		//MyToast.ShowMessage(LoginActivity.this, "登录失败,账号或密码错误");
		showCustomToast("登录失败,账号或密码错误");
		closeLoadingDialog();
	} else if(user.getUserID() == -2) { 
	//	MyToast.ShowMessage(LoginActivity.this, "登录失败,重复登录!");
		showCustomToast("登录失败,重复登录!");
		closeLoadingDialog();
	}
	else {
		//MyToast.ShowMessage(LoginActivity.this, "登陆成功" );
		showCustomToast("登陆成功!");
		closeLoadingDialog();
		application.setUser(user);
		String psd = mEtPwd.getText().toString(); 
		application.getHiBang().storeAccessToken(user, psd, String.valueOf(user.hashCode()), System.currentTimeMillis()+7*24*60*60*1000);
		Intent intent = new Intent(LoginActivity.this,MainTabActivity.class);
		Bundle bundle = new Bundle();
		bundle.putString("className", MessageActivity.class.getName());
		intent.putExtras(bundle);
		LoginActivity.this.startActivity(intent);
		LoginActivity.this.finish();
	}
}
 
开发者ID:qizhenghao,项目名称:HiBangClient,代码行数:27,代码来源:LoginActivity.java

示例5: onSaveInstanceState

import android.os.Bundle; //导入方法依赖的package包/类
@Override
public void onSaveInstanceState(final Bundle outState) {
    super.onSaveInstanceState(outState);

    final FragmentManager fm = getFragmentManager();

    if (fm.findFragmentByTag(CurrentFeedFragment.TAG) != null) {
        outState.putString(KEY_FRAGMENT_TAG, CurrentFeedFragment.TAG);
    } else if (fm.findFragmentByTag(FeedSubscriptionsFragment.TAG) != null) {
        outState.putString(KEY_FRAGMENT_TAG, FeedSubscriptionsFragment.TAG);
    } else if (fm.findFragmentByTag(SavedEntriesFragment.TAG) != null) {
        outState.putString(KEY_FRAGMENT_TAG, SavedEntriesFragment.TAG);
    } else if (fm.findFragmentByTag(InitialSetupFragment.TAG) != null) {
        outState.putString(KEY_FRAGMENT_TAG, InitialSetupFragment.TAG);
    } else if (fm.findFragmentByTag(LoadCurrentFeedFragment.TAG) != null) {
        outState.putString(KEY_FRAGMENT_TAG, LoadCurrentFeedFragment.TAG);
    }

    if (mActionMode != null) {
        mActionMode.finish();
    }
}
 
开发者ID:Applications-Development,项目名称:SimpleRssReader,代码行数:23,代码来源:MainActivity.java

示例6: startSaveImageDialogFragment

import android.os.Bundle; //导入方法依赖的package包/类
private void startSaveImageDialogFragment() {
    SaveImageDialogFragment dialog = new SaveImageDialogFragment();
    Bundle bundle = new Bundle();
    bundle.putString(Constants.ARG_URL, mUrl);
    dialog.setArguments(bundle);

    dialog.show(getSupportFragmentManager(), null);
}
 
开发者ID:nichbar,项目名称:Aequorea,代码行数:9,代码来源:PhotoActivity.java

示例7: PublishLikeRequestWrapper

import android.os.Bundle; //导入方法依赖的package包/类
PublishLikeRequestWrapper(String objectId, LikeView.ObjectType objectType) {
    super(objectId, objectType);

    Bundle likeRequestParams = new Bundle();
    likeRequestParams.putString("object", objectId);

    setRequest(new GraphRequest(
            AccessToken.getCurrentAccessToken(),
            "me/og.likes",
            likeRequestParams,
            HttpMethod.POST));
}
 
开发者ID:eviltnan,项目名称:kognitivo,代码行数:13,代码来源:LikeActionController.java

示例8: onStartSubScreen

import android.os.Bundle; //导入方法依赖的package包/类
protected void onStartSubScreen(PreferenceScreen preferenceScreen)
{
    Bundle args = new Bundle();
    args.putString(PreferenceFragmentCompat.ARG_PREFERENCE_ROOT, preferenceScreen.getKey());
    args.putString(ConstantsUI.PREF_SCREEN_TITLE, preferenceScreen.getTitle().toString());
    replaceSettingsFragment(args);
}
 
开发者ID:nextgis,项目名称:android_nextgis_mobile,代码行数:8,代码来源:NGPreferenceActivity.java

示例9: newInstance

import android.os.Bundle; //导入方法依赖的package包/类
public static DownloadDialog newInstance(String url) {
    DownloadDialog dialog = new DownloadDialog();
    Bundle bundle = new Bundle();
    bundle.putString(EXTRA_URL, url);
    dialog.setArguments(bundle);
    return dialog;
}
 
开发者ID:zhuyu1022,项目名称:amap,代码行数:8,代码来源:DownloadDialog.java

示例10: onSaveInstanceState

import android.os.Bundle; //导入方法依赖的package包/类
/**
 * Parcelable interface: procedure writes the formula state
 */
@Override
@SuppressLint("MissingSuperCall")
public Parcelable onSaveInstanceState()
{
    Bundle bundle = new Bundle();
    bundle.putString(STATE_IMAGE_TYPE, imageType.toString());
    switch (imageType)
    {
    case NONE:
        // nothing to do
        break;
    case BITMAP:
        if (bitmap != null)
        {
            bundle.putParcelable(STATE_IMAGE_BITMAP, bitmap);
        }
        break;
    case SVG:
        if (svgData != null)
        {
            bundle.putString(STATE_IMAGE_SVG, svgData);
        }
        break;
    }
    return bundle;
}
 
开发者ID:mkulesh,项目名称:microMathematics,代码行数:30,代码来源:CustomImageView.java

示例11: onSaveInstanceState

import android.os.Bundle; //导入方法依赖的package包/类
@Override
protected void onSaveInstanceState(Bundle outState) {
    TextView textViewDate = (TextView) findViewById(R.id.textview_date);

    super.onSaveInstanceState(outState);

    outState.putBoolean(KEY_INPUT_HELP_OPEN, isInputHelpPopupOpen);
    outState.putBoolean(KEY_MEAT_MODIFIED, isMeatModified);
    outState.putBoolean(KEY_SUBMIT_DATA_ENABLED, isSubmitDataEnabled);
    outState.putString(KEY_DATE, textViewDate.getText().toString());
    outState.putInt(KEY_WEIGHT, weightSelected);
}
 
开发者ID:mr-kojo,项目名称:Veggietizer,代码行数:13,代码来源:InputActivity.java

示例12: newInstance

import android.os.Bundle; //导入方法依赖的package包/类
/**
 */
public static FileListFragment newInstance(String param1, String param2) {
    FileListFragment fragment = new FileListFragment();
    Bundle args = new Bundle();
    args.putString(ARG_PARAM1, param1);
    args.putString(ARG_PARAM2, param2);
    fragment.setArguments(args);
    return fragment;
}
 
开发者ID:tryBetter,项目名称:minVideo,代码行数:11,代码来源:FileListFragment.java

示例13: onSaveInstanceState

import android.os.Bundle; //导入方法依赖的package包/类
@Override
public void onSaveInstanceState(Bundle outState) {

    super.onSaveInstanceState(outState);

    outState.putBoolean("restore", true);
    outState.putString("mTitleText", mTitleText);
}
 
开发者ID:searchy2,项目名称:AndroidCrossPromotion,代码行数:9,代码来源:MainActivity.java

示例14: newInstance

import android.os.Bundle; //导入方法依赖的package包/类
public static ImageDetailFragment newInstance(String imageUrl) {
    final ImageDetailFragment f = new ImageDetailFragment();

    final Bundle args = new Bundle();
    args.putString("url", imageUrl);
    f.setArguments(args);

    return f;
}
 
开发者ID:mangestudio,项目名称:GCSApp,代码行数:10,代码来源:ImageDetailFragment.java

示例15: newInstance

import android.os.Bundle; //导入方法依赖的package包/类
public static ErrorDialog newInstance(String message) {
    ErrorDialog dialog = new ErrorDialog();
    Bundle args = new Bundle();
    args.putString(ARG_MESSAGE, message);
    dialog.setArguments(args);
    return dialog;
}
 
开发者ID:neural-nuts,项目名称:Cam2Caption,代码行数:8,代码来源:Camera2BasicFragment.java


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