开发者

how to make edittext and alertdialog has same width?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜