android-constraintlayout

Why doesn't the layout design preview get displayed on my Android Studio?

为君一笑 提交于 2020-01-06 07:10:37
问题 I don't know if it's me or something but I can't place a simple text or a button in design mode in Android Studio If it helps, this is the code: <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <Button android:id="@+id/button2" style="

layout_constraintWidth_default=“wrap” is deprecated any alternative?

时光总嘲笑我的痴心妄想 提交于 2020-01-05 08:05:28
问题 I was using this layout_constraintWidth_default="wrap" in textview to keep the textview content wrapped(to right of it there is imageview), as the text in textview increases textview area will grow which moves the imageview to right. layout_constraintWidth_default="wrap" As it is deprecated any alternatives? Logcat 回答1: As the documentation says in this link from Android Developers : In versions before 1.1 they will be treated as a literal dimension -- meaning, constraints will not limit the

layout_constraintWidth_default=“wrap” is deprecated any alternative?

…衆ロ難τιáo~ 提交于 2020-01-05 08:04:19
问题 I was using this layout_constraintWidth_default="wrap" in textview to keep the textview content wrapped(to right of it there is imageview), as the text in textview increases textview area will grow which moves the imageview to right. layout_constraintWidth_default="wrap" As it is deprecated any alternatives? Logcat 回答1: As the documentation says in this link from Android Developers : In versions before 1.1 they will be treated as a literal dimension -- meaning, constraints will not limit the

ConstraintLayout 1.0.2 shows nothing

痴心易碎 提交于 2020-01-05 05:58:07
问题 I'm still having this weird problem. ConstraintLayout only works when it's on 'alpha-7', when I change it to '1.0.2' the latest version it shows nothing Desired layout should look like this: However, I'm getting this: "on a real HTC one M9 - CM 12.1.1" ** 'Show layout bounds' is On just so you can see that there are nothing on drawn on the device. ** I also tried with 'Show layout update' and it shows nothing as well In the Layout Inspector the Username field, Password field and Login Button

Why latest version constraintLayout doesn't work in nestedScrollView with CoordinatorLayout

余生长醉 提交于 2020-01-05 05:42:24
问题 i have using coordinatorlayout with collapsingToolbar for parallax effect when scroll and content view (text about page) bottom of collapsingToolbar in nestedScrollView. my problem is constraint layout seems incomplete inside nestedScrollView if i use LinearLayout in nestedScrollView content view everything is showing. but i using ConstraintLayout in nestedScrollView content view is seems incomplete as you can see below code content view made with constraint layout <androidx.constraintlayout

How to tie a BottomSheet at the bottom view of the layout

梦想的初衷 提交于 2020-01-03 19:22:15
问题 Through ConstraintLayout, I am using a BottomSheet to show content of a map detail. My idea is the same used in GoogleMaps, but without the image carousel at the top. I need to find some property to tie the BottomSheet in the bottom, using only the size from its layout, not the whole window, as below: Here is my XML from parent view: <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app=

Align ConstraintLayout item to be at the end of two items

自闭症网瘾萝莉.ら 提交于 2020-01-01 04:27:04
问题 I have a ConstraintLayout with two views A and B that are stacked vertically. I have a third view C which needs to be to the end of both A and B horizontally. At any given point, A may be wider than B or vice versa, so the constraint cannot only be based on one view. Is there a way of defining this constraint through view C? Currently, I can define A and B so that app:layout_constraintEnd_toStartOf="C" This does work, but since there is no start constraint in C, the design preview will not

View is pushed out of its constraints in ConstraintLayout

邮差的信 提交于 2019-12-31 02:08:09
问题 I have a ConstraintLayout with an ImageView and 3 chained TextViews with a spread_inside chain style: <android.support.design.card.MaterialCardView android:layout_width="match_parent" android:layout_height="wrap_content"> <android.support.constraint.ConstraintLayout android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/space_normal" android:paddingEnd="@dimen/space_normal" android:paddingStart="@dimen/space_normal" android:paddingTop="@dimen

Android - ConstraintLayout - ellipsize end for large text

一曲冷凌霜 提交于 2019-12-30 06:01:30
问题 I need some help regarding an Android layout. I have the following code: <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content"> <android.support.constraint.Guideline android:id="@+id/guideline" android:layout_width="wrap_content"

Android - ConstraintLayout - ellipsize end for large text

谁说我不能喝 提交于 2019-12-30 06:01:03
问题 I need some help regarding an Android layout. I have the following code: <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content"> <android.support.constraint.Guideline android:id="@+id/guideline" android:layout_width="wrap_content"