I am using a custom dialog that includes text fields, an image and a button text may contain HTML Occasionally when the dialogue is too long, then it is cut down below the dialogue. How can I prevent this? I want to determine the size of the Android communication but it does not seem that I need a diagram size in this case?
This is the layout ...
& lt; LinearLayout xmlns: android = "http: // schemas android: id =" @ + id / alert_root_accorrect "style =" @ style / alertDialogTheme "Android: background =" @draubable / rounded_artart "Android: orientation =" vertical "android: layout_width Android: layout_height = "fill_parent" android: padding = "10dp"> LinearLayout Android: orientation = "vertical" android: layout_width = "fill_parent" Android: layout_height = "fill_parent" Android: background = "@drawable / rounded_artart" & gt; TableLayout Android: Stretch Column = "0" Android: Orientation = "Horizontal" Android: layout_width = "fill_parent" Andrew D: layout_height = "wrap_content"> TableRow> TextView android: layout_width = "fill_parent" android: layout_height = "wrap_content" android: gravity = "left" Android: textStyle = "bold" android : Text = "Sorry, this is wrong!" Android: TextCaller = "@color / gray_dark" /> Android: Android: layout_height = "wrap_content" Android: layout_gravity = "right" Android: layout_margin right = "Android : Android: 10 DP "/> & Lt; / TableRow & gt; & Lt; / TableLayout & gt; & Lt; Android: Android: Android: Android: Android: layout_width = "failparent" Android: layout_heat = "wrap-content" Android: alipsus = "none" Android: text = "Actually, this is where the explanation will go. How is some related to this subject in "Android: textColor =" # 000000 "/> Android: Android: Android: Android: Android: Android: Android: Android: Android: Android: Android: Android: Android: Layout_Width = Rounded_alert_button "android: text =" OK "Android: TextColver =" @ Color / White "Android: Text Size =" 20sp "/>
And here is the code that I I'm using to load ...
if (null == layout) {this.layout = inflater.inflate (aa Layout. Alert_Inconstruct, find ViviIID (RID.lert_roth_uncommitted);} TextView Message = (TextView) Layout.FindVibeID (RID Alert_text); message.setText (Html.fromHtml (card.getConclusion ()) (Button) layout.findvibiid (rd_y_button). Setonclicklister (new view .onlineList () {click on public zero (see vi) (disorganization); next question ();}}); layout .requestLayout (); Dialog = New Dialog (it r. Style. Altrdaylogthym); DialogksetContentView (layout); Dialog.setCancelable (incorrect); Return dialog;
And here's a picture of what I mean ..
This is not correct, but I did not see it as the default display Setting the layout of relative dialogue is correct.
dialog = new dialog (this, R. style, alteradiology); Dialog.setContentView (layout); Window window = dialog.getWindow (); Window .callout ((int) (window.getWindowManager). GetDefaultDisplay (). GetWidth () * .90), (int) (window.getWindowManager). GetDefaultDisplay () GetHeight () * .90)); Dialog.setCancelable (incorrect);
Just press ".90" values until it looks right.
Comments
Post a Comment