當前位置: 首頁>>代碼示例>>Java>>正文


Java EditText.setHorizontallyScrolling方法代碼示例

本文整理匯總了Java中android.widget.EditText.setHorizontallyScrolling方法的典型用法代碼示例。如果您正苦於以下問題:Java EditText.setHorizontallyScrolling方法的具體用法?Java EditText.setHorizontallyScrolling怎麽用?Java EditText.setHorizontallyScrolling使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.widget.EditText的用法示例。


在下文中一共展示了EditText.setHorizontallyScrolling方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setupEditNoteDialog

import android.widget.EditText; //導入方法依賴的package包/類
private void setupEditNoteDialog() {
        AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(PopupActivity.this);
        LayoutInflater inflater = PopupActivity.this.getLayoutInflater();
        final View dialogView = inflater.inflate(R.layout.dialog_edit_note, null);
        dialogBuilder.setView(dialogView);

        final EditText edt = (EditText) dialogView.findViewById(R.id.edit_note);
        edt.setHorizontallyScrolling(false);
        edt.setMaxLines(4);
        edt.setText(mNoteEditedByUser);
        edt.setSelection(mNoteEditedByUser.length());
        dialogBuilder.setTitle(R.string.dialog_note);
        //dialogBuilder.setMessage("輸入筆記");
        dialogBuilder.setPositiveButton(R.string.dialog_ok, new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int whichButton) {
                mNoteEditedByUser = edt.getText().toString();
            }
        });
//                        dialogBuilder.setNegativeButton("取消", new DialogInterface.OnClickListener() {
//                            public void onClick(DialogInterface dialog, int whichButton) {
//                                //pass
//                            }
//                        });
        AlertDialog b = dialogBuilder.create();
        b.show();
    }
 
開發者ID:mmjang,項目名稱:ankihelper,代碼行數:27,代碼來源:PopupActivity.java

示例2: onCreateView

import android.widget.EditText; //導入方法依賴的package包/類
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_repo_directory, container, false);

    directoryInputLayout = (TextInputLayout) view.findViewById(R.id.fragment_repo_directory_input_layout);

    mUriView = (EditText) view.findViewById(R.id.fragment_repo_directory);

    // Not working when done in XML
    mUriView.setHorizontallyScrolling(false);
    mUriView.setMaxLines(3);

    mUriView.setOnEditorActionListener(new TextView.OnEditorActionListener() {
        @Override
        public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
            save();
            return true;
        }
    });

    MiscUtils.clearErrorOnTextChange(mUriView, directoryInputLayout);

    view.findViewById(R.id.fragment_repo_directory_browse_button)
            .setOnClickListener(v -> onOpenBrowser());

    if (savedInstanceState == null && TextUtils.isEmpty(mUriView.getText()) && mSelectedUri == null) {
        setFromArgument();
    }

    return view;
}
 
開發者ID:orgzly,項目名稱:orgzly-android,代碼行數:32,代碼來源:DirectoryRepoFragment.java

示例3: initView

import android.widget.EditText; //導入方法依賴的package包/類
private void initView() {
    clearBtn = (Button) findViewById(R.id.btn_clear);
    clearBtn.setOnClickListener(this);
    serviceBtn = (Button) findViewById(R.id.btn_service);
    serviceBtn.setOnClickListener(this);
    bindAliasBtn = (Button) findViewById(R.id.btn_bind_alias);
    bindAliasBtn.setOnClickListener(this);
    unbindAliasBtn = (Button) findViewById(R.id.btn_unbind_alias);
    unbindAliasBtn.setOnClickListener(this);

    btnAddTag = (Button) findViewById(R.id.btnAddTag);
    btnAddTag.setOnClickListener(this);
    btnVersion = (Button) findViewById(R.id.btnVersion);
    btnVersion.setOnClickListener(this);
    btnSilentime = (Button) findViewById(R.id.btnSilentime);
    btnSilentime.setOnClickListener(this);
    btnGetCid = (Button) findViewById(R.id.btnGetCid);
    btnGetCid.setOnClickListener(this);

    tView = (TextView) findViewById(R.id.tvclientid);
    appKeyView = (TextView) findViewById(R.id.tvappkey);
    appSecretView = (TextView) findViewById(R.id.tvappsecret);
    masterSecretView = (TextView) findViewById(R.id.tvmastersecret);
    appIdView = (TextView) findViewById(R.id.tvappid);
    tLogView = (EditText) findViewById(R.id.tvlog);
    tLogView.setInputType(InputType.TYPE_NULL);
    tLogView.setSingleLine(false);
    tLogView.setHorizontallyScrolling(false);
    transmissionBtn = (Button) findViewById(R.id.btn_pmsg);
    transmissionBtn.setOnClickListener(this);
    notifactionBtn = (Button) findViewById(R.id.btn_psmsg);
    notifactionBtn.setOnClickListener(this);
}
 
開發者ID:wuhighway,項目名稱:DailyStudy,代碼行數:34,代碼來源:GetuiSdkDemoActivity.java

示例4: onCreate

import android.widget.EditText; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState)
{
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_contact);

	Preferences.makeAppFullscreen(this, Color.TRANSPARENT);
	
	root = (RelativeLayout)findViewById(R.id.id_root);
	toolbar = (Toolbar)findViewById(R.id.ma_toolbar);
	avatar = (CircularImageView)findViewById(R.id.id_avatar);
	edit = (EditText)findViewById(R.id.id_recipient);
	more = (ImageView)findViewById(R.id.id_more);
	more_fonction = (LinearLayout)findViewById(R.id.id_more_fonction);
	dismiss_more = (RelativeLayout)findViewById(R.id.id_dismiss_more_fonction);
	clear = (TextView)findViewById(R.id.id_clear);
	send = (TextView)findViewById(R.id.id_send);
	balise = (TextView)findViewById(R.id.id_balise);
	balise_fonction = (LinearLayout)findViewById(R.id.id_balise_fonction);
	question = (TextView)findViewById(R.id.id_question);
	suggestion = (TextView)findViewById(R.id.id_suggestion);
	bogue = (TextView)findViewById(R.id.id_bogue);

	setSupportActionBar(toolbar);
	getSupportActionBar().setDisplayShowTitleEnabled(false);
	
	Glide.with(this)
		 .load("https://avatars1.githubusercontent.com/u/19941384?v=3&s=400")
	     .into(avatar);
	
	toolbar.setNavigationIcon(R.drawable.ic_action_close_semi_black_24dp);
	toolbar.setNavigationOnClickListener(new View.OnClickListener()
	{
		@Override
		public void onClick(View view)
		{
			finishAfterTransition();
		}
	});
	edit.setHorizontallyScrolling(false);
	edit.setAutoLinkMask(Linkify.ALL);
	edit.addTextChangedListener(textChanged);
	more.setOnClickListener(this);
	dismiss_more.setOnClickListener(this);
	clear.setOnClickListener(this);
	send.setOnClickListener(this);
	balise.setOnClickListener(this);
	question.setOnClickListener(this);
	suggestion.setOnClickListener(this);
	bogue.setOnClickListener(this);
}
 
開發者ID:MSay2,項目名稱:Mire,代碼行數:52,代碼來源:ActivityContact.java


注:本文中的android.widget.EditText.setHorizontallyScrolling方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。