Closed Bigli closed 11 years ago
Do you run in to the same problem when you run the example app?
In the future please put three back ticks (```) before and after your code segments, it makes it easier to read
Excuse me, in the future I will put ``, the code I have works fine, and the application starts, but the designer swears. I just downloaded the example and opened the idea
So is this an error that is coming from your IDE when you're working on the xml? That's what it looks like based on the stack trace.
at org.jetbrains.android.uipreview.RenderService.createRenderSession (RenderService.java: 127)
at org.jetbrains.android.uipreview.RenderUtil.renderLayout (RenderUtil.java: 151)
at com.intellij.openapi.application.impl.ApplicationImpl $ 6.run (ApplicationImpl.java: 465)
This is a bug in my idea of 12, when I switch to the design.
So is IntelliJ crashing or just spitting out this error?
Failure idea
I don't usually work in IntelliJ, but I just cloned the project and opened it and opened example.xml and everything works fine. You might want to reclone the project and try opening it again.
You work in a eclips?
I do, but I tried to replicate your error in IntelliJ and it opened the layout no problem.
This error can be caused by some sort of dll?
It's most likely a configuration issue. You might want to try upgrading, the current version is 12.1
I'm using 2.0.4, and when I import the project, it is an error "No frameworks detected."
Make sure it's finding your Android SDK and properly detecting the project as an Android project. You may also want to read some of JetBrain's documentation on using their software.
Forgot to mention about the mistake "colorfilter: Lighting Color Filters are not supported" perhaps because of her mistake? I re-downloaded, but it did not help.
I also have been a mistake in the code (""layout.setBackground(context.getResources().getDrawable(R.drawable.list_selector_holo_light));) I had to comment. Class ExamplePagedDragDropGridAdapter.
That line is used for onClick background selectors and is optional.
Sorry, but this area is for issues with the library which this is clearly not. Good luck solving your problem.
Thank you very much for your response.
The question remains open, downloaded all the sdk, all else fails, try a eclips, did not help, somebody help me.
You may want to try something like StackOverflow as this is only for issues with the library, not your IDE or computer
I'm just wondering why you have it working, but I have not.
If you use the version of eclipse that comes with the sdk that will eliminate any configuration problems you may have. You should be able to update the sdk and then import the library and it'll work. It's that simple.
I use exactly the sdk on the link you gave, I installed all the updates as well, I put the version 4.2, but the problem still exists.
What is the problem exactly?
In xml does not open in Design Editor, But the program works fine.
The problem you are seeing is because eclipse is trying to create the view for the designer, but the view depends on the adapter. You cannot use the gui designer for the layout that uses this widget.
It looks like it could be solved using the answer to this question
Basically surround the code that cannot be run without the adapter with
if(!isInEditMode()){
//...
}
Thank you so much, it helped me!
Good day, I have a problem in the constructor, exemple.xml, when I connect (``ca.laplanete.mobile.pageddragdropgrid.PagedDragDropGrid vylitaet error in xml, at com.Projects.libs.gridView.DragDropGrid.onMeasure (DragDropGrid.java: 696) at android.view.View.measure (View.java: 12723) at android.widget.HorizontalScrollView.measureChildWithMargins (HorizontalScrollView . Java: 1159) at android.widget.FrameLayout.onMeasure (FrameLayout.java: 293) at android.widget.HorizontalScrollView.onMeasure (HorizontalScrollView.java: 303) at android.view.View.measure (View.java: 12723) at android.view.ViewGroup.measureChildWithMargins (ViewGroup.java: 4698) at android.widget.FrameLayout.onMeasure (FrameLayout.java: 293) at android.view.View.measure (View.java: 12723) at android.view.ViewGroup.measureChildWithMargins (ViewGroup.java: 4698) at android.widget.LinearLayout.measureChildBeforeLayout (LinearLayout.java: 1369) at android.widget.LinearLayout.measureVertical (LinearLayout.java: 660) at android.widget.LinearLayout.onMeasure (LinearLayout.java: 553) at android.view.View.measure (View.java: 12723) at android.view.ViewGroup.measureChildWithMargins (ViewGroup.java: 4698) at android.widget.LinearLayout.measureChildBeforeLayout (LinearLayout.java: 1369) at android.widget.LinearLayout.measureVertical (LinearLayout.java: 660) at android.widget.LinearLayout.onMeasure (LinearLayout.java: 553) at android.view.View.measure (View.java: 12723) at com.android.layoutlib.bridge.impl.RenderSessionImpl.measureView (RenderSessionImp l.java: 542) at com.android.layoutlib.bridge.impl.RenderSessionImpl.render (RenderSessionImpl.jav a: 444) at com.android.layoutlib.bridge.Bridge.createSession (Bridge.java: 326) at com.android.ide.common.rendering.LayoutLibrary.createSession (LayoutLibrary.java: 325) at org.jetbrains.android.uipreview.RenderService.createRenderSession (RenderService. java: 127) at org.jetbrains.android.uipreview.RenderUtil.renderLayout (RenderUtil.java: 151) at at com.intellij.openapi.application.impl.ApplicationImpl $ 6.run (ApplicationImpl.java: 465) at java.util.concurrent.Executors $ RunnableAdapter.call (Executors.java: 471) at java.util.concurrent.FutureTask $ Sync.innerRun (FutureTask.java: 334) at java.util.concurrent.FutureTask.run (FutureTask.java: 166) at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java: 1110) at java.util.concurrent.ThreadPoolExecutor $ Worker.run (ThreadPoolExecutor.java: 603) at java.lang.Thread.run (Thread.java: 722) at com.intellij.openapi.application.impl.ApplicationImpl $ 1 $ 1.run (ApplicationImpl.java: 153)
Line 696 Display display = wm.getDefaultDisplay ();
@ Override protected void onMeasure (int widthMeasureSpec, int heightMeasureSpec) { int widthMode = MeasureSpec.getMode (widthMeasureSpec); int heightMode = MeasureSpec.getMode (heightMeasureSpec); int widthSize = MeasureSpec.getSize (widthMeasureSpec); int heightSize = MeasureSpec.getSize (heightMeasureSpec);
WindowManager wm = (WindowManager) getContext (). GetSystemService (Context.WINDOW_SERVICE);
Display display = wm.getDefaultDisplay ();
widthSize = acknowledgeWidthSize (widthMode, widthSize, display); heightSize = acknowledgeHeightSize (heightMode, heightSize, display);
adaptChildrenMeasuresToViewSize (widthSize, heightSize); searchBiggestChildMeasures (); computeGridMatrixSize (widthSize, heightSize); computeColumnsAndRowsSizes (widthSize, heightSize);
measureChild (deleteZone, MeasureSpec.makeMeasureSpec (gridPageWidth, MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec ((int) getPixelFromDip (40), MeasureSpec.EXACTLY));
setMeasuredDimension (widthSize * adapter.pageCount (), heightSize); }`)
Please help me, and I apologize for the bad English, in the code I have not changed anything.