I used setMaxLines () and setHeight, will not work, you come across someone Reply: Layout nothing special android: layout_width = "fill_parent" android: layout_height = "fill_parent" android: layout_weight = "1.0" android: autoText = "true" android: capitalize = "sentences" android: hint = "@ string / type_to_compose_text_enter_to_send" android: textCursorDrawable = "@ null" android: textColor = "@ android: color / black" android: maxLines = "4" android: nextFocusRight = "@ + id / send_button" android: gravity = "top" /> Reply: By LayoutParams set! Reply:
int newHeight = 200; / / Note that here, in the end is still using ViewGroup LinearLayout or FrameLayout, mainly to see you this EditTex / / Controls where the layout of the parent control is what, if LinearLayout, then here he will change LinearLayout.LayoutParams ViewGroup.LayoutParams lp = editText.getLayoutParams (); lp.height = newHeight; editText.setLayoutParams (lp);
Reply:
Ah, thank you, this can be set. . I would like to ask, is there a way to get the edittext display line, because the resolution of issues to consider cell phone may not set a fixed height. . If you can set the display line will feel a little better Reply:
Ah, thank you, this can be set. . I would like to ask, is there a way to get the edittext display line, because the resolution of issues to consider cell phone may not set a fixed height. . If you can set the display line will feel a little better Reply:
Before you call setMaxLines, first call setSingleLine (false);
int newHeight = 200; / / Note that here, in the end is still using ViewGroup LinearLayout or FrameLayout, mainly to see you this EditTex / / Controls where the layout of the parent control is what, if LinearLayout, then here he will change LinearLayout.LayoutParams ViewGroup.LayoutParams lp = editText.getLayoutParams (); lp.height = newHeight; editText.setLayoutParams (lp);
Ah, thank you, this can be set. . I would like to ask, is there a way to get the edittext display line, because the resolution of issues to consider cell phone may not set a fixed height. . If you can set the display line will feel a little better
Before you call setMaxLines, first call setSingleLine (false);
Ah did not respond, according to what you write. I do not know why online are generally written. . I put the entire parent layout posted android: id = "@ + id / bottom_panel" android: layout_width = "match_parent" android: layout_height = "wrap_content" android: orientation = "horizontal" android: paddingBottom = "2dip" android: paddingLeft = "5dip" android: paddingRight = "5dip" android: paddingTop = "5dip"> android: id = "@ + id / editor_with_counter" android: layout_width = "wrap_content" android: layout_height = "match_parent" android: layout_weight = "1.0" android: orientation = "horizontal">
int newHeight = 200; / / Note that here, in the end is still using ViewGroup LinearLayout or FrameLayout, mainly to see you this EditTex / / Controls where the layout of the parent control is what, if LinearLayout, then here he will change LinearLayout.LayoutParams ViewGroup.LayoutParams lp = editText.getLayoutParams (); lp.height = newHeight; editText.setLayoutParams (lp);
Ah, thank you, this can be set. . I would like to ask, is there a way to get the edittext display line, because the resolution of issues to consider cell phone may not set a fixed height. . If you can set the display line will feel a little better
Before you call setMaxLines, first call setSingleLine (false);
Ah did not respond, according to what you write. I do not know why online are generally written. . I put the entire parent layout posted android: id = "@ + id / bottom_panel" android: layout_width = "match_parent" android: layout_height = "wrap_content" android: orientation = "horizontal" android: paddingBottom = "2dip" android: paddingLeft = "5dip" android: paddingRight = "5dip" android: paddingTop = "5dip"> android: id = "@ + id / editor_with_counter" android: layout_width = "wrap_content" android: layout_height = "match_parent" android: layout_weight = "1.0" android: orientation = "horizontal">
Oh, right setSingleLine (false); to be placed in front of setText. Which is the last call to setText try again Reply: A great relationship with the calling sequence Reply:
No comments:
Post a Comment