1) Download Android source code
2) Modify the android.graphics.Path to support addRoundRect()
3) Test and deploy on your favorite device




On Mar 28, 6:22 pm, amfine <xyf_...@sina.com> wrote:
> Hello
> please help me .the trouble is:
> java.lang.UnsupportedOperationException
>         at android.graphics.Path.addRoundRect(Path.java:514)
>         at
> android.graphics.drawable.shapes.RoundRectShape.onResize(RoundRectShape.jav­a:
> 91)
>         at android.graphics.drawable.shapes.Shape.resize(Shape.java:74)
>         at
> android.graphics.drawable.ShapeDrawable.updateShape(ShapeDrawable.java:
> 338)
>         at
> android.graphics.drawable.ShapeDrawable.onBoundsChange(ShapeDrawable.java:
> 268)
>         at android.graphics.drawable.Drawable.setBounds(Drawable.java:131)
>         at
> android.graphics.drawable.LayerDrawable.onBoundsChange(LayerDrawable.java:
> 449)
>         at android.graphics.drawable.Drawable.setBounds(Drawable.java:131)
>         at android.widget.ProgressBar.onSizeChanged(ProgressBar.java:821)
>         at android.view.View.setFrame(View.java:7102)
>         at android.view.View.layout(View.java:7029)
>         at android.widget.RelativeLayout.onLayout(RelativeLayout.java:909)
>         at android.view.View.layout(View.java:7035)
>         at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
>         at android.view.View.layout(View.java:7035)
>         at com.android.layoutlib.bridge.Bridge.computeLayout(Bridge.java:447)
>         at
> com.android.ide.eclipse.adt.internal.editors.layout.gle1.GraphicalLayoutEdi­tor.computeLayout(Unknown
> Source)
>         at
> com.android.ide.eclipse.adt.internal.editors.layout.gle1.GraphicalLayoutEdi­tor.recomputeLayout(Unknown
> Source)
>         at
> com.android.ide.eclipse.adt.internal.editors.layout.gle1.GraphicalLayoutEdi­tor.activated(Unknown
> Source)
>         at
> com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor.pageChange­(Unknown
> Source)
>         at org.eclipse.ui.part.MultiPageEditorPart
> $2.widgetSelected(MultiPageEditorPart.java:291)
>         at
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:
> 228)
>         at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
>         at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
>         at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027)
>         at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012)
>         at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:770)
>         at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:
> 3256)
>         at org.eclipse.swt.custom.CTabFolder.destroyItem(CTabFolder.java:647)
>         at org.eclipse.swt.custom.CTabItem.dispose(CTabItem.java:165)
>         at
> org.eclipse.ui.part.MultiPageEditorPart.removePage(MultiPageEditorPart.java­:
> 1048)
>         at org.eclipse.ui.forms.editor.FormEditor.removePage(FormEditor.java:
> 362)
>         at
> com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor.showEditor­Input(Unknown
> Source)
>         at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.j­ava:
> 2841)
>         at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:
> 2762)
>         at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:
> 2754)
>         at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:
> 2705)
>         at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:
> 70)
>         at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:
> 2701)
>         at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:
> 2685)
>         at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:
> 2676)
>         at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
>         at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
>         at
> org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUti­lity.java:
> 361)
>         at
> org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUti­lity.java:
> 168)
>         at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:229)
>         at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:208)
>         at
> org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDis­patchAction.java:
> 274)
>         at
> org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAct­ion.java:
> 250)
>         at
> org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOp­en(PackageExplorerActionGroup.java:
> 373)
>         at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart
> $4.open(PackageExplorerPart.java:526)
>         at org.eclipse.ui.OpenAndLinkWithEditorHelper
> $InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
>         at org.eclipse.jface.viewers.StructuredViewer
> $2.run(StructuredViewer.java:842)
>         at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
>         at org.eclipse.core.runtime.Platform.run(Platform.java:888)
>         at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
>         at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
>         at
> org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:
> 840)
>         at
> org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java­:
> 1101)
>         at org.eclipse.jface.viewers.StructuredViewer
> $6.handleOpen(StructuredViewer.java:1205)
>         at
> org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:
> 264)
>         at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:
> 258)
>         at org.eclipse.jface.util.OpenStrategy
> $1.handleEvent(OpenStrategy.java:298)
>         at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
>         at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
>         at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:
> 3880)
>         at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)
>         at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:
> 2405)
>         at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
>         at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
>         at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
>         at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:
> 332)
>         at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:
> 493)
>         at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:
> 149)
>         at
> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication­.java:
> 113)
>         at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java­:
> 194)
>         at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication­(EclipseAppLauncher.java:
> 110)
>         at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseA­ppLauncher.java:
> 79)
>         at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
> 368)
>         at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
> 179)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>         at java.lang.reflect.Method.invoke(Unknown Source)
>         at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
>         at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
>         at org.eclipse.equinox.launcher.Main.run(Main.java:1311)

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to