当前位置: 首页>>代码示例>>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;未经允许,请勿转载。