Questions tagged [android-designer]
42 questions
35
votes
8 answers
How to resolve : unexpected error occured Initializing Android Designer" in VS 2015 with Xamarin
Bringing up a new PC with Xamarin and VS 2015 Pro I received the following error:
An unexpected error occurred trying to initialize Android Designer.
Please verify the Android SDK path and the Java Development Kit path
on…

MikeJ
- 14,430
- 21
- 71
- 87
5
votes
3 answers
Android designer render problem with TextInputLayout: java.lang.IllegalArgumentException: weight is out of range of [0, 1000]
Upon opening Android Studio today, I was greeted with a surprise - I could not see the preview of my layout:
I thought it would just be a simple fix of:
Reloading the designer
Cleaning and building the project
Invalidating caches and…

thebluepandabear
- 263
- 2
- 7
- 29
3
votes
2 answers
Android Studio not able to find drawable resource for ImageView
I am using Android Studio 3.0.1, I have a simple xml file with root ConstraintLayout, so when I do preview and drag and drop an ImageView from the Preview Palette, it is not able to find the new added png file, which I have copy/paste directly in…

Nongthonbam Tonthoi
- 12,667
- 7
- 37
- 64
2
votes
0 answers
Designer show Preview a bit (than disappear)
Not sure why, but when I open a *.xml file in the designer, it disappear after some seconds.
Some errors? I only see warnings.
Here's the whole:

markzzz
- 47,390
- 120
- 299
- 507
2
votes
0 answers
How to fix render problem java.lang.NoClassDefFoundError: sun/misc/Cleaner in newest version of Android studio?
My designer doesn't show any changes or content. it says it has a render problem:
java.lang.NoClassDefFoundError: sun/misc/Cleaner at
…

MFox
- 43
- 6
2
votes
2 answers
EditText disappears when user press on and keyboard appear
I have 3 forms in EditText and I need to readjust the position automatically when the user click in form and keyboard appear, in my manifest.xml I added this line:
" android:windowSoftInputMode="stateHidden|adjustResize" "
This is my XML Code of The…

luke cross
- 321
- 1
- 2
- 19
1
vote
3 answers
Image have margin from top in constraintlayout
I have a scrolled content, so I put a constraint layout inside a scrollview, I have a problem when put an image inside a constraint layout, but the image show a space from top such as in screenshot below, how can I remove that space?

Ali A. Jalil
- 873
- 11
- 25
1
vote
1 answer
Design Showing Perfectly in Android Studio Preview but Not in Real Device
I am working on an Android Application and I am trying to implement Design Layout in Android Studio like Image in Android Studio Preview
But When I run It on Real Device It is showing layout like Design In Real Device.
In the Android Studio I used…

Usman Ali
- 425
- 1
- 9
- 31
1
vote
1 answer
button with shadow animation or with bouncing background
How can I design a bouncing background animation in Android? I want to this animation without any event raise.
Any help is appreciated.

Ajinkya Rajput
- 21
- 5
1
vote
2 answers
how to add a selector to a shape?
How to add beloved different xml file in one file.
first file is:
-

Pratik Sanyaja
- 131
- 11
1
vote
2 answers
Cursor starting issue in Android layout activity
I know it maybe looks a simple question but it really annoying me, I have an Activity contains 3 "EditText", and when I lunch that activity it the cursor start in second one "EditText", what I want is starting the cursor on the "EditText" I choose…

Ahmed Said
- 71
- 2
- 10
1
vote
2 answers
Webview contents getting cropped from bottom [ANDROID]
In my app i a displaying a webpage in webview, using url of webpage. The url loads fine but the issue is that some content of web page is cropped from bottom. How this issue can be fixed? Any help will be appreciated.
Here is my code
xml…

User
- 692
- 2
- 11
- 29
1
vote
0 answers
Android : Design a vertical slider with 2 Handle between 18 to 80
I am working on a project where I need to design two vertical sliders as shown in the image below
I had developed code which working fine in a range of 0 to 100.
But I am not sure of how to convert it to 18 to 80
Here I am adding my class and view…

Nej
- 127
- 3
- 13
1
vote
2 answers
Android UI compatibility issue
I'm a beginner in Android. Currently, working on a self-project. Built one user profile page which is rendering fine on Nexus 5 Emulator but not on Nexus 4 Emulator.
Here are the Screenshots from both the Emulator.
From Nexus5 Emulator
From Nexus4…

Suresh
- 5,687
- 12
- 51
- 80
0
votes
0 answers
Landscape view can't select the proper device
I'm trying to display my landscape view for a Pixel 6 Pro.
I use the following menu:
But no matter what I do, selecting the appropriate device causes Android Studio instead opens my portrait view.
No matter what I do, landscape view will NOT…

Mark Puchala II
- 634
- 2
- 8
- 25