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


Java Bundle.toString方法代码示例

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


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

示例1: toString

import android.os.Bundle; //导入方法依赖的package包/类
public static String toString(Bundle bundle){
	if(bundle==null)return null;
	if(Reflect.on(bundle).get("mParcelledData")!=null){
		Set<String> keys=bundle.keySet();
		StringBuilder stringBuilder=new StringBuilder("Bundle[");
		if(keys!=null) {
			for (String key : keys) {
				stringBuilder.append(key);
				stringBuilder.append("=");
				stringBuilder.append(bundle.get(key));
				stringBuilder.append(",");
			}
		}
		stringBuilder.append("]");
		return stringBuilder.toString();
	}
	return bundle.toString();
}
 
开发者ID:7763sea,项目名称:VirtualHook,代码行数:19,代码来源:VLog.java

示例2: toString

import android.os.Bundle; //导入方法依赖的package包/类
public static String toString(Bundle bundle) {
	if (bundle == null) return null;
	if (Reflect.on(bundle).get("mParcelledData") != null) {
		Set<String> keys = bundle.keySet();
		StringBuilder stringBuilder = new StringBuilder("Bundle[");
		if (keys != null) {
			for (String key : keys) {
				stringBuilder.append(key);
				stringBuilder.append("=");
				stringBuilder.append(bundle.get(key));
				stringBuilder.append(",");
			}
		}
		stringBuilder.append("]");
		return stringBuilder.toString();
	}
	return bundle.toString();
}
 
开发者ID:codehz,项目名称:container,代码行数:19,代码来源:VLog.java

示例3: toString

import android.os.Bundle; //导入方法依赖的package包/类
public static String toString(Bundle b) {
    if (b == null) {
        return "";
    }
    Bundle bundle = new Bundle();
    bundle.putAll(b);
    return bundle.toString();
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:9,代码来源:KVUtils.java

示例4: SafetyNetUtils

import android.os.Bundle; //导入方法依赖的package包/类
public SafetyNetUtils(Context ctx, Callback callback) {
    this.ctx = ctx;
    this.callback = callback;

    GoogleApiClient.OnConnectionFailedListener googleApiConnectionFailedListener = connectionResult -> Log.e(TAG, "onConnectionFailed:" + connectionResult.toString());
    GoogleApiClient.ConnectionCallbacks googleApiConnectionCallbacks = new GoogleApiClient.ConnectionCallbacks() {
        @Override
        public void onConnected(@Nullable Bundle bundle) {
            String logs = bundle == null ? "" : bundle.toString();
            callback.onResponse("GoogleApiClient onConnected " + logs);
        }

        @Override
        public void onConnectionSuspended(int i) {
            Log.d(TAG, "onConnectionSuspended" + i);
        }
    };


    Handler handler = new Handler(MyApplication.INSTANCE.safetyNetLooper.getLooper());
    googleApiClient = new GoogleApiClient.Builder(ctx)
            .addApi(SafetyNet.API)
            .addConnectionCallbacks(googleApiConnectionCallbacks)
            .addOnConnectionFailedListener(googleApiConnectionFailedListener)
            .setHandler(handler) //Run on a new thread
            .build();
    googleApiClient.connect();
    secureRandom = new SecureRandom();
}
 
开发者ID:Catherine22,项目名称:SecuritySample,代码行数:30,代码来源:SafetyNetUtils.java


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