62 questions
1
vote
1
answer
62
views
ConstraintLayout v 2.2.1 not filling screen
Yet another SO question about ConstraintLayout and positioning. I have been having trouble with a particular layout, so I decided to go back to the basics and see what I'm not understanding.
Copied ...
2
votes
0
answers
110
views
ImageView adjustViewBounds=true attribute is not rendered correctly in layout preview
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:...
0
votes
1
answer
33
views
If I put the "compileSdk" value above 32, attributes disappear from the layout editor
I booted up Android Studio today to start a new project. I chose an empty template etc. I checked out the layout editor and noticed it was missing some basic attributes like "background."
my ...
0
votes
1
answer
136
views
Android Studio switching position of TextView and Plain Text input
I'm working on an Android application, and admittedly I'm a bit of a newbie. I'm working on a very simple input of some information, and found something very odd. Whenever I run the application in a ...
0
votes
4
answers
2k
views
Android XML layout preview not working in Android Studio Dolphin 2021.3.1 Patch 1
Can anyone help how to resolve the preview issue for XML layout file?
5
votes
1
answer
2k
views
After updating Android Studio to Dolphin update it does not show layout preview
I have updated my Android studio to new Dolphin, 2021.3.1 version. But after updating the Android studio layout preview is not working. it showing blank screen.
If anyone solve this issue please help ...
104
votes
33
answers
30k
views
Android Studio (Dolphin | 2021.3.1) & (Electric Eel | 2022.1.1) does not show layout preview
I'm using Android Studio Dolphin | 2021.3.1 & Electric Eel | 2022.1.1
After updating Android studio chipmunk | 2021.2.1 to Android studio Dolphin | 2021.3.1 my all project design preview and ...
2
votes
4
answers
171
views
Why does the height of my Constraintlayout increase when I place it in a Scrollview?
I have a ConstraintLayout which shows all items on my smartphone without the need to scroll. Nevertheless I want to surround the ConstraintLayout with a ScrollView that a user with smaller phones can ...
0
votes
2
answers
560
views
No Layout Editor in the latest Android Studio
I have got this weird problem while upgraded to the latest Android Studio. It has no Layout Editor, no Design Tab or Preview Tab. Has anyone faced similar problem? Please help me out.
Image 1
Image 2
...
1
vote
3
answers
314
views
Android Studio layout designer creates numbers in Persian
When I manually design layouts using the Android Studio layout designer, the margin numbers are created in Persian format and the designer does not work properly.
This has been happening since I ...
2
votes
1
answer
587
views
Render problem due to Collapsing Toolbar in Android Studio
My Layout editor doesn't render this layout with collapsing toolbar, other layouts render just fine. I have tried refreshing, invalidate cache/restart, gradle implementations to stable versions, set ...
0
votes
2
answers
124
views
how can I add button in Textview-android studio layout editor
button"start" is in Textview
How can I do that?
3
votes
0
answers
789
views
How to show a fragment layout within a FrameLayout in Android Studio's Layout Editor / Preview?
I have an empty FrameLayout in an Activity's xml file. I add a Fragment to it programmatically in the Activity onCreate(), and everything is working fine.
However, I want to be able to see a fragment ...
0
votes
1
answer
60
views
Android How to increase the Layout editor hint display time
screenshot of attributes keeping cursor on an attibute name for a while, make the contestual help to be displayed;
Problem: it desappears to early, sometimes before Ican fully read the tip.
How is ...
0
votes
0
answers
578
views
How do I blur a gradient background?
Lest say I have a gradient background like this right
Example:
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:angle="90"
...
1
vote
1
answer
273
views
Android studio layout editor doesn't render
I have been working on a little project in Android Studio and I ran into a problem. In my layouts I've been using fabs and constraint layout yet when I try to open the editor I see a black screen, the ...
2
votes
1
answer
2k
views
Toolbar not showing in the layout editor of Android Studio 3.6.1
After updating android studio to 3.6.1 Toolbar not showing in the layout editor.
It's showing like this..
But it should be like this.
Number 3 Option not showing in my case.
-1
votes
3
answers
509
views
Android studio layout editor. Waiting for build to finish
Android studio layout preview is stuck in waiting for build to finish even though there is no build happening. I have invalidate and restarted android studio. I have uninstalled and reinstalled. It is ...
4
votes
3
answers
857
views
Android studio layout editor always landscape?
My app is going to be just landscape. But each time I need to set the xml layout editor to landscape mode when I start editing a layout. How can I have my xml layout editor always stay in landscape ...
1
vote
1
answer
270
views
Displaying html string preview in the Layout Editor
I have this html string in the strings.xml file in my Android project
Registrandoti confermi di accettare i
<a href="https://www.google.com/">
<font color="#FF7860">...
3
votes
0
answers
140
views
How can i change content font size inside of the layout editor preview?
I want to simulate font size changing from the device settings to be sure everything displays OK on each font size. How can I change the text font size in the layout editor preview from normal to ...
0
votes
1
answer
94
views
Align ImageButton right inside Tablerow
I want my imagebutton to be aligned right but as you can see its left aligned even when the gravity="right". This is my file:
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:...
0
votes
3
answers
64
views
2 Navigationbars (top and bottom) in android
So I need two navigationbars (one at the bottom and one on the top). But as you can already see on the picture above there is no room for the navigation bar on the bottom because of the map (the ...
1
vote
1
answer
102
views
How can I locate two text blocks in one item in RecyclerView?
I already created RecyclerView with view holder and with one list. But I need one textView on start and the second on the end. How can I do it?
I created layout with two TextViews, there are already ...
7
votes
1
answer
571
views
Android Layout Preview Editor - Layout not visible: java.lang.IllegalArgumentException: object is not an instance of declaring class
My Android Studio Layout Editor is not working as expected. The preview always disappers and turns into a completely white screen or freezes (i cannot select any element and changes i make to the xml ...
3
votes
2
answers
708
views
Layout editor rendering error (Not rendering)
I have been trying to create a collapsing toolbar using AppBarLayout and collapsing toolbar.
Once the AppBarLayout component is being added to the project the layout editor doesn't render, I have ...
1
vote
2
answers
2k
views
RecyclerView is displayed as a grey box with it's name in the center. Same for an implemented audio Visualizer view
Here an image to better show the problem I'm having...
Around a week ago I implemented a music Viusalizer from here.
I noticed that it didn't display correctly as it showed up as a grey window (see ...
5
votes
2
answers
2k
views
Android Studio Open Wrong File When Trying to Open XML layout file [duplicate]
I am using android studio 3.3, my project is using kotlin 1.3.20 with build gradle 3.3.0
however when i try to open xml file, it open different file with the right file name and the right file path:
...
0
votes
1
answer
281
views
How to avoid overlapping widgets in Android with 'auto-resize.'
On smaller screens; the editText should let shrink the listView verticaly so it never interferes content-wise.
Otherwise, when there is a long list of items, the listView should never go over the ...
12
votes
9
answers
18k
views
Android Studio Can't Zoom in/out in Layout Editor
It used to work from time to time, but now the ability to zoom in/out on the layout design page is completely gone for me. The layout view always stays at 10% zoomed in and doesn't change no matter ...
0
votes
1
answer
34
views
Effect with margins?
The design is a Linearlayout with a cardivew inside and a background color, that simple.
By clicking on any view (View 1, View 2 ...) other layouts are added dynamically. These new layouts "push" the ...
4
votes
2
answers
3k
views
What does a greyed out view in the Android Layout Inspector mean?
In Android Studio, Tools -> Layout Inspector, what does a greyed out(subdued, dim) view in the View Tree mean? The layer still has VISIBLE properties
I don't see any explanation in the docs, https://...
0
votes
1
answer
285
views
Android Studio Layout Editor incorrect display
I am using the latest version of android studio (stable) as of date, 3.2.1, freshly in stalled. However, when I'm opening a project, the layout editor does not display the attributes like what it ...
-1
votes
2
answers
1k
views
The widgets in Android Studio v 3.1.4 does not appear in Design Mode
I am new to Android Studio and I was working on v3.1.4. When I was dragging any of the widgets and put it in the design, it does not appear. It gives me an error message that the widget is not ...
1
vote
1
answer
333
views
Android equivalent of Nibs?
I am an iOS developer who is new to Android dev.
I'm wondering if there is an equivalent to nibs in Android dev.
For example:
I subclass Button to programmatically define behaviors like having the ...
0
votes
1
answer
122
views
Is there any way to see the Custom Layout applied to the Action Bar in the Android Studio Layout Editor?
Assuming you did not modify any properties in style.xml, the Layout Editor in Android Studio displays the Action Bar as:
By adjusting the style of the action bar, I can do things like adjust the ...
0
votes
1
answer
30
views
Why Is My UI Not Showing When I Drop Items Into It From The Editor?
So I just downloaded Android Studio onto this compute. When the Layout Editor interface loads and I try to drag the XML items onto the screen, they do show up in the constraintView but not in the ...
1
vote
3
answers
670
views
Android Layout Editor: How do I add a simple view?
The Layout Editor's palette doesn't seem to have a blank view that I can drag in (unless my eyes are crazy).
Is there a way to drag a blank view from the palette in the Android Layout Editor onto the ...
2
votes
3
answers
1k
views
Align vertical center of two view in Android
How can I align vertical center of two views align in LinearLayout or RelativeLayout (iOS equivallent of view1.centerY = view2.centerY)?
I am trying to achieve below layout. How can I make the all ...
0
votes
1
answer
203
views
What is the difference between the name attribute and context attribute in android XML?
I am beginner in android and was wondering what the difference is between the
tools:context and android:name attributes?
1. android:name=".fragments.DataFragment"
2. tools:context=".activities....
1
vote
2
answers
2k
views
Android Studio Layout changes on real device
I have a problem with the layout on the Android Studio. The Editor (XML file) and Emulator (Nexus 10) shows the layout right. But if I run the app on my Huawei Mediaped M5, the layout changes and ...
0
votes
0
answers
114
views
layout editor render issue
I'm new to Android Studio and started using it just 2 days ago. I downloaded the latest version and everything should be updated. Upon following the 'Build your first app' tutorial in the android ...
14
votes
6
answers
9k
views
Failed to find style 'coordinatorLayoutStyle' in current theme In Android Studio 3.1
The Android Studio 3.1 layout preview fails to find style 'coordinatorLayoutStyle' in the current theme.
Failed to instantiated one or more classes.
Exception shown are :-
java.lang....
3
votes
1
answer
327
views
Data binding in Design view
Does the Android Studio layout designer support data binding? Specifically, does the UI support code completion for data binding attributes like it does for resources. I have been manually adding data ...
5
votes
2
answers
13k
views
How to use a custom resolution in Android Studio's layout editor?
Sometimes I'm editing the layout resource for a list item or similar small UI component. This is nice, but the available screen resolutions in the layout editor in Android Studio are all way too big ...
0
votes
1
answer
337
views
Fab button with an icon showing shadow in ics (Android 4.1)
I have created this layout it works fine on Android 6.0 but in android 4.1 I am getting this weird shadow (black shadows around fab button in the picture).Following is my layout.
Following is the ...
0
votes
0
answers
95
views
Why are changes I make to my layout not happening?
I'm building a layout with ConstraintLayout in Android Studio 3.0 using the Layout Editor. Any changes I make are not being reflected when I run the app on the emulator. I don't think the problem is ...
0
votes
1
answer
507
views
Running on real device shows different UI then in layout editor
I have built an alert cardview that pops up to prompt a response from the user. I am using constraint layout, and the view looks correct in the layout editor. I have even tested in on multiple ...
2
votes
1
answer
870
views
How can I set a "layout_marginLeft(/Right)" from Constraint Layout Editor?
I have a app with minSdk=15.
I am trying to migration to ConstraintLayout.
almost ok. but when I change the value of margin_left from layout editor, layout_marginLeft/Right attrubute is removed.
...
1
vote
2
answers
1k
views
Constraint Layout. Render problems. Layout Editor
I am everyday facing with very frustrating issue of ConstraintLayout in my project.
Project gradle file:
buildscript {
ext.support_library_version = '27.0.2'
ext.play_services_version = '11....