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