Android Studio won't display Drawer Layout - android

Honestly it is giving me this error for almost anything I try to do that isn't adding simple buttons or text. I have tried everything I could think of and find on the interwebs. My API is set to the right API (8). I have updated everything I could in SDK Manager. This is the error:
Oh I cut off the beginning of the error. It says:
Failed to configure parser for:
(Cannot post images without 10 rep)
Thank you

The problem is that you're probably using a lower minSdkVersion.
You can try set the minSdkVersion to 17 or higher(in the build.gradle)
minSdkVersion 17
targetSdkVersion 21

I think "Android Studio won't display Drawer Layout" means the Palette didn't display your DrawerLayout instantly. Actually, it's a normal behavior. After all, the Palette only displays static monolayer views while the DrawerLayout is a complicated ViewGroup and it has multilayers: the drawer and the content. Meanwhile, DrawerLayout is a dynamic View whose effects only could be seen on a device or a simulator. So, feel free to run your Activity which loads this layout, and you will see the effect of your layout which contains your DrawerLayout.

Related

Android OnApplyWindowInsetsListener / isAppearanceLightStatusBars / shared element transition bug on API 28

We have an app that currently uses systemUiVisibility to toggle the SYSTEM_UI_FLAG_LIGHT_STATUS_BAR settings. As this is deprecated we want to move to using the new WindowCompat.setDecorFitsSystemWindows and windowInsetsControllerCompat.isAppearanceLightStatusBars instead. But we’ve hit a weird issue which seems to be a bug on API 28 — on API 29 we don't see the problem.
The app also has an OnApplyWindowInsetsListener on the root of our Activity layout to adjust for the IME being displayed, and between two of our Fragments we use shared element transitions. Putting all of these together seems somehow to break layout, such that the Fragment’s root view gets set to width/height of 0.
It’s the kind of thing that's easier to demonstrate than to explain, so I’ve made a very simple sample app to reproduce the issue, and put it on github.
Here’s an animation of what happens — when we should see the second fragment again, we see nothing:

Android Studio 2.1.2 Rendering problems. VectorDrawable_Delegate.nDraw

When attempting to view a preview of your app you may encounter the following...
Rendering Problems Exception
raised during rendering:
android.graphics.drawable.VectorDrawable_Delegate.nDraw(JJJLandroid/graphics/Rect;ZZ)I
Issue is resolved by de-selecting the API 23 preview as shown below, select the non Preview option.
I think I am a bit late to answer, but the solutions provided above did not work for me.
The rendering error sure does go away, but the rendering displayed finally after selecting API 23 is incomplete or wrong.
In my case, the action bar custom theme color and everything vanished.
So, for everyone out there who has a custom theme in their app, here's a solution -
Check if in the XML preview pane, the rendering theme is selected as the one which is associated with your app in the manifest file.
Select your custom theme in the preview pane, the error will be gone and you will also be able to preview with the latest API (API 24)

I am getting rendering error in the latest android studio when trying to view the preview of an activity

Rendering Problems The following classes could not be instantiated:
android.support.v7.internal.widget.ActionBarOverlayLayout (Open
Class, Show Exception, Clear Cache)
What can be done to solve this? I can't get any preview for my XML coding.
I think it's not a final solution, but changing the Theme in design view from the base project theme to anything else allows it to build.
It happens to me too,
the only ways I found to fix this issue is:
at the top of Designer window
Change the theme.
OR
Change the API to 21 instead of 22.
the second choice is better because you will still able to see the same theme from API 22.
from xml view, check your right side, there was an option for for "Preview"

XML is showing OLD API UI ANDroid

I am developing an app and using spinners(Using eclipse). I am using Fragments and also using support-v4 library. I have set MinSdkVersion to 8 for backword compativility.
The problem is, in XML, when I drag and drop spinners, it is showing me the old UI for spinner which was there in API 8 or 9 and designing UI is becoming almost impossible.
(However in my Phone, it is showing the latest UI for Spinner, but I can't design it well in XML - eclipse.)
Also attaching the URL of snapshot (as I don't have enough reputation to post and image) of the XML view within the eclipse.
Link to Image : http://tinyurl.com/ErrorInUI
I tried changing MinSdkVersion to 17. It didn't work.
In your XML Graphical editor, you can change the appearance by selecting the rendering style in the API Level dropdown (there's the current API Level number with an arrow, near the little green robot):

How can I make stylish xml layout design when using Scrolling View for xml layout?

I'm using the library called simple-side-drawer
This enables `DrawerLayout' for any version which is supported only at API Level 18 or higher.
I downloaded demo from the page and tried to make stylish layout by customizing right_behind_menu_simple.xml
However, it always returns error and won't show stylish layout even if I copy and pasted example to it.
The error is always related to something about <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
I'd like to make Menu just like this. How can I?
Can anyone download demo and show me what to do with right_behind_menu_simple.xml and its style.xml?
It'll be appreciatable, if you could upload example project.
Thanks!
You should use Navigation Drawer instead of using third party library for api 18 or above, Use official doc for this : Navigation Drawer

Categories

Resources