I saw the layout of this source in the I tried it ID that TextView to the "message" of: This works fine. Then I think LinearLayout that this id is "body" tried this way: But eclipse shows this error: This is the snippet code: Why is this error and how can I access the "body"? Actually, you can not access all of the resource platform AlertDialog res \ layout Folder of Android SDK in the form:
& lt; FrameLayout xmlns: android = "http://schemas.android.com/apk/res/android" Android: layout_width = "match_parent" Android: layout_height = "wrap_content" & gt; & Lt; LinearLayout android: id = "@ + id / body" android: orientation = "horizontal" android: Layout_width = "Match_parent" Android: Layout_height = "Match_parent" Android: baselineAligned = "false" Android: paddingLeft = "8dip" Android: PaddingTop = "10dip" Android: paddingRight = "8dip" Android: paddingBottom = "10dip" & gt; & Lt; ProgressBar android: id = "@ android: id / progress" style = "@ android: style / WidgetkProgressBar" Android: Layout_width = "Wrap_content" Android: Layout_height = "Wrap_content" Android: max = "10000" Android: Layout_marginRight = "12dip" /> & Lt; TextView android: id = "@ + id / message" Android: layout_width = "match_parent" Android: layout_height = "wrap_content" Android: layout_gravity = "center_vertical" / & gt; & Lt; / LinearLayout & gt; & Lt; / FrameLayout & gt;
TextView tvMessage = (TextView) dialog.findViewById (android .R. id.message);
LinearLayout body = (LinearLayout) dialog.findViewById (android.R.id.body);
body can not be solved or there is no field
progress dialog = new progress DIOO (WriteOperinactivity.This); Dialog.setMessage ("some text"); Dialog.show (); TextView tvMessage = (TextView) dialog.findViewById (android.R.id.message); LinearLayout body = (LinearLayout) dialog.findViewById (android.R.id.body);
res Are there.
No comments:
Post a Comment