John,
Two suggestions:
1 - When your app "suspends" like this, it means it's crashing, but
hasn't quite crashed all the way yet, which is why there is no logcat
output at that point.
Click 'resume execution' in Eclipse, and again if necessary. You only
get logcat output (and the close dialog on the device) once the
exception has propagated to the top-level exception handler.
2 - Logcat window in Eclipse is very nice (filtering, color
highlighting), but just too small.
Run "adb logcat" in a command line window, make the window large, and
set a nice ample scrollback value in properties - with this, you'll much
more.
-- Kostya
27.12.2010 6:44, John Lussmyer пишет:
I'm attempting a not-that-complex layout using RelativeLayout, and
getting a weird problem.
When I set things up in a way that seems correct, I get:
Thread [<3> main] (Suspended (exception IllegalStateException))
RelativeLayout$DependencyGraph.getSortedViews(View[], int...) line: 1260
RelativeLayout.sortChildren() line: 281
RelativeLayout.onMeasure(int, int) line: 299
RelativeLayout(View).measure(int, int) line: 7964
....
The full layout is at the bottom of this msg.
If I delete just one line,
android:layout_toRightOf="@id/Spin"
from the 3rd widget (ImageButton), the layout then sort-of works.
(well, at least it doesn't crash)
The 1st NumberPicker (SpinMeasure) is at the top of the screen - but
is the full screen width.
The BtnRun is at the top right corner, overlapping SpinMeasure.
BtnMute and CenterLayout appear correct.
SpinRate isn't visible. It's either not there, or is under SpinMeasure.
Any suggestions on what I'm doing wrong?
----- landscape layout -----
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/WholeScreen"
>
<com.casadelgato.widgets.NumberPicker
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
plusminus_width="50"
vertical="false"
minValue="0"
defaultValue="4"
maxValue="16"
android:id="@+id/SpinMeasure" />
<com.casadelgato.widgets.NumberPicker
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="@id/SpinMeasure"
android:layout_toLeftOf="@+id/BtnRun"
minValue="20"
defaultValue="60"
maxValue="240"
repeatAcceleration = "10"
vertical="false"
android:id="@id/SpinRate"/>
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_toRightOf="@id/SpinRate"
android:src="@drawable/ic_menu_play_clip"
android:id="@id/BtnRun" />
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_toLeftOf="@+id/BtnMute"
android:layout_below="@id/SpinRate"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:id="@+id/CenterLayout" />
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignLeft="@id/BtnRun"
android:src="@drawable/ic_jog_dial_sound_off"
android:id="@id/BtnMute" />
</RelativeLayout>
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en