开发者

how to make edittext and alertdialog has same width?

开发者 https://www.devze.com 2023-03-27 06:31 出处:网络
a alertdialog include a edittext how to make edittext\'s width same with the alertdialog\'s开发者_如何学Python (NO ABSOLUTE LAYOUT) ?You can create a custom alertDialog and use the following code:

a alertdialog include a edittext

how to make edittext's width same with the alertdialog's开发者_如何学Python (NO ABSOLUTE LAYOUT) ?


You can create a custom alertDialog and use the following code:

EditText myEditText = (EditText) activity.getViewById(R.id.myEditText);
myEditText.setLayoutParams(LayoutParams.MATCH_PARENT);

Give that a try.

0

精彩评论

暂无评论...
验证码 换一张
取 消