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


Java Bundle.putCharSequence方法代码示例

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


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

示例1: send

import android.os.Bundle; //导入方法依赖的package包/类
public static void send(String room, String message) throws IllegalArgumentException { // @author ManDongI
    Notification.Action session = null;

    for(Session i : sessions) {
        if(i.room.equals(room)) {
            session = i.session;

            break;
        }
    }

    if(session == null) {
        throw new IllegalArgumentException("Can't find the room");
    }

    Intent sendIntent = new Intent();
    Bundle msg = new Bundle();
    for (RemoteInput inputable : session.getRemoteInputs()) msg.putCharSequence(inputable.getResultKey(), message);
    RemoteInput.addResultsToIntent(session.getRemoteInputs(), sendIntent, msg);

    try {
        session.actionIntent.send(context, 0, sendIntent);
    } catch (PendingIntent.CanceledException e) {
        e.printStackTrace();
    }
}
 
开发者ID:Su-Yong,项目名称:KakaoBot,代码行数:27,代码来源:KakaoTalkListener.java

示例2: addResultsToIntent

import android.os.Bundle; //导入方法依赖的package包/类
static void addResultsToIntent(RemoteInput[] remoteInputs, Intent intent, Bundle results) {
    Bundle resultsBundle = new Bundle();
    for (RemoteInput remoteInput : remoteInputs) {
        Object result = results.get(remoteInput.getResultKey());
        if (result instanceof CharSequence) {
            resultsBundle.putCharSequence(remoteInput.getResultKey(), (CharSequence) result);
        }
    }
    Intent clipIntent = new Intent();
    clipIntent.putExtra("android.remoteinput.resultsData", resultsBundle);
    intent.setClipData(ClipData.newIntent("android.remoteinput.results", clipIntent));
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:13,代码来源:RemoteInputCompatJellybean.java

示例3: extend

import android.os.Bundle; //导入方法依赖的package包/类
public Builder extend(Builder builder) {
    Bundle wearableBundle = new Bundle();
    if (this.mFlags != 1) {
        wearableBundle.putInt(KEY_FLAGS, this.mFlags);
    }
    if (this.mInProgressLabel != null) {
        wearableBundle.putCharSequence(KEY_IN_PROGRESS_LABEL, this.mInProgressLabel);
    }
    if (this.mConfirmLabel != null) {
        wearableBundle.putCharSequence(KEY_CONFIRM_LABEL, this.mConfirmLabel);
    }
    if (this.mCancelLabel != null) {
        wearableBundle.putCharSequence(KEY_CANCEL_LABEL, this.mCancelLabel);
    }
    builder.getExtras().putBundle(EXTRA_WEARABLE_EXTENSIONS, wearableBundle);
    return builder;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:18,代码来源:NotificationCompat.java

示例4: findEditTextSend

import android.os.Bundle; //导入方法依赖的package包/类
private boolean findEditTextSend(AccessibilityNodeInfo rootNode, String edit,String content) {
    Log.e(TAG, "findEditTextSend: rootNode"+rootNode.toString() );
    List<AccessibilityNodeInfo> editInfo = rootNode.findAccessibilityNodeInfosByViewId(edit);

    if(editInfo!=null&&!editInfo.isEmpty()){
        Bundle arguments = new Bundle();
        arguments.putCharSequence(AccessibilityNodeInfo.ACTION_ARGUMENT_SET_TEXT_CHARSEQUENCE, content);
        editInfo.get(0).performAction(AccessibilityNodeInfo.ACTION_SET_TEXT, arguments);
        Log.e("xiaoxin", "findEditTextSend: true");
        return true;
    }else {
        Log.e("xiaoxin", "findEditTextSend: null");
    }
    Log.e("xiaoxin", "findEditTextSend: false"+editInfo.isEmpty() );
    return false;
}
 
开发者ID:xmlxin,项目名称:ReplyMessage,代码行数:17,代码来源:AutoReplyService.java

示例5: sendComment

import android.os.Bundle; //导入方法依赖的package包/类
private void sendComment() {
    try {
        AccessibilityNodeInfo outNode =
                getRootInActiveWindow().getChild(0).getChild(0);
        AccessibilityNodeInfo nodeToInput = outNode.getChild(outNode.getChildCount() - 1).getChild(0).getChild(1);

        if ("android.widget.EditText".equals(nodeToInput.getClassName())) {
            Bundle arguments = new Bundle();
            arguments.putCharSequence(AccessibilityNodeInfo
                    .ACTION_ARGUMENT_SET_TEXT_CHARSEQUENCE, signature.commentString);
            nodeToInput.performAction(AccessibilityNodeInfo.ACTION_SET_TEXT, arguments);
        }
    } catch (Exception e) {
        // Not supported
    }
}
 
开发者ID:KoreHuang,项目名称:WeChatLuckyMoney,代码行数:17,代码来源:HongbaoService.java

示例6: send

import android.os.Bundle; //导入方法依赖的package包/类
public static void send(String room, String message) throws IllegalArgumentException { // @author ManDongI
    Notification.Action session = null;

    for(KakaoData data : KakaoManager.getInstance().getDataList().toArray(new KakaoData[0])) {
        if(data.room.equals(room)) {
            session = data.session;

            break;
        }
    }

    if(session == null) {
        throw new IllegalArgumentException("Can't find the room");
    }

    Intent sendIntent = new Intent();
    Bundle msg = new Bundle();
    for (RemoteInput inputable : session.getRemoteInputs()) msg.putCharSequence(inputable.getResultKey(), message);
    RemoteInput.addResultsToIntent(session.getRemoteInputs(), sendIntent, msg);

    try {
        session.actionIntent.send(context, 0, sendIntent);

        Logger.Log log = new Logger.Log();
        log.type = Logger.Type.APP;
        log.title = "send message";
        log.index = "room: " + room +"\nmessage: " + message;

        Logger.getInstance().add(log);
    } catch (PendingIntent.CanceledException e) {
        e.printStackTrace();
    }
}
 
开发者ID:Su-Yong,项目名称:NewKakaoBot,代码行数:34,代码来源:KakaoTalkListener.java

示例7: onSaveInstanceState

import android.os.Bundle; //导入方法依赖的package包/类
/*********************************************************
 * Instance state
 *********************************************************/

@Override
protected void onSaveInstanceState(Bundle outState)
{
    if (storedFormula != null)
    {
        outState.putParcelable(STATE_STORED_FORMULA, storedFormula.onSaveInstanceState());
    }
    if (getWorksheetName() != null)
    {
        outState.putCharSequence(STATE_WORKSHEET_NAME, getWorksheetName());
    }
    super.onSaveInstanceState(outState);
}
 
开发者ID:mkulesh,项目名称:microMathematics,代码行数:18,代码来源:MainActivity.java

示例8: newInstance

import android.os.Bundle; //导入方法依赖的package包/类
public static DescriptionFragment newInstance(CharSequence title, CharSequence summary) {
    Bundle args = new Bundle();
    DescriptionFragment fragment = new DescriptionFragment();
    args.putCharSequence("title", title);
    args.putCharSequence("summary", summary);
    fragment.setArguments(args);
    return fragment;
}
 
开发者ID:AyushR1,项目名称:KernelAdiutor-Mod,代码行数:9,代码来源:DescriptionFragment.java

示例9: onSaveInstanceState

import android.os.Bundle; //导入方法依赖的package包/类
@Override
public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    // Save action bar title and menuArgs during an orientation change:
    outState.putCharSequence("title", getSupportActionBar().getTitle());
    outState.putParcelableArray("menuArgs", menuArgs);
}
 
开发者ID:brianjaustin,项目名称:permitlog-android,代码行数:8,代码来源:MainActivity.java

示例10: newInstance

import android.os.Bundle; //导入方法依赖的package包/类
@NonNull
public static TextFragment newInstance(@Nullable CharSequence text) {
	final TextFragment fragment = new TextFragment();
	final Bundle args = new Bundle();
	args.putCharSequence(Extras.EXTRA_TEXT, text);
	fragment.setArguments(args);
	return fragment;
}
 
开发者ID:universum-studios,项目名称:android_ui,代码行数:9,代码来源:TextFragment.java

示例11: onSaveInstanceState

import android.os.Bundle; //导入方法依赖的package包/类
@Override
protected void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    outState.putParcelable(KEY_PARCELABLE_USER, mUser);
    outState.putString(KEY_FOLDER_ID,mFolderId);

    if (mSearchView != null && mSearchView.isEnabled()) {
        outState.putCharSequence(KEY_CURRENT_QUERY, mSearchView.getQuery().toString());
        outState.putBoolean(KEY_FLAG_SEARCH_OPEN, mSearchView.isShown());

    }
}
 
开发者ID:victoraldir,项目名称:BuddyBook,代码行数:13,代码来源:MainActivity.java

示例12: onVisibilityChanged

import android.os.Bundle; //导入方法依赖的package包/类
@Override
public void onVisibilityChanged(boolean visible) {
    if (visible && getResources().getBoolean(R.bool.use_dual_panes)) {
        // That's far to be optimal we should consider uncomment tests for reusing fragment
        // if (autoCompleteFragment == null) {
        autoCompleteFragment = new DialerAutocompleteDetailsFragment();

        if (digits != null) {
            Bundle bundle = new Bundle();
            bundle.putCharSequence(DialerAutocompleteDetailsFragment.EXTRA_FILTER_CONSTRAINT,
                    digits.getText().toString());

            autoCompleteFragment.setArguments(bundle);

        }
        // }
        // if
        // (getFragmentManager().findFragmentByTag(TAG_AUTOCOMPLETE_SIDE_FRAG)
        // != autoCompleteFragment) {
        // Execute a transaction, replacing any existing fragment
        // with this one inside the frame.
        FragmentTransaction ft = getFragmentManager().beginTransaction();
        ft.replace(R.id.details, autoCompleteFragment, TAG_AUTOCOMPLETE_SIDE_FRAG);
        ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
        ft.commitAllowingStateLoss();
    
        // }
    }
}
 
开发者ID:treasure-lau,项目名称:CSipSimple,代码行数:30,代码来源:DialerFragment.java

示例13: onSaveInstanceState

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

    outState.putCharSequence(KEY_TITLE, mTitleText.getText());
    outState.putCharSequence(KEY_DESC, mTitleDesc.getText());
    outState.putCharSequence(KEY_TIME, mTimeText.getText());
    outState.putCharSequence(KEY_DATE, mDateText.getText());
    outState.putCharSequence(KEY_REPEAT, mRepeatText.getText());
    outState.putCharSequence(KEY_REPEAT_NO, mRepeatNoText.getText());
    outState.putCharSequence(KEY_REPEAT_TYPE, mRepeatTypeText.getText());
    outState.putCharSequence(KEY_ACTIVE, mActive);
}
 
开发者ID:attiqrehman1991,项目名称:Task-Reminder,代码行数:14,代码来源:ReminderAddActivity.java

示例14: instance

import android.os.Bundle; //导入方法依赖的package包/类
private static ExtendedPublicKeyFragment instance(final CharSequence xpub) {
    final ExtendedPublicKeyFragment fragment = new ExtendedPublicKeyFragment();

    final Bundle args = new Bundle();
    args.putCharSequence(KEY_XPUB, xpub);
    fragment.setArguments(args);

    return fragment;
}
 
开发者ID:guodroid,项目名称:okwallet,代码行数:10,代码来源:ExtendedPublicKeyFragment.java

示例15: putCharSequence

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


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