android-constraintlayout

Bottom of ScrollView clipped when using ConstraintLayout

旧街凉风 提交于 2019-12-12 10:44:36
问题 I have an issue using a ScrollView inside ConstraintLayout ( constraint-layout:1.0.0-beta3 ) The content of my ScrollView isn't showed entirely. Here is my layout: <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/activity_test" android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:id="@+id/header" android:layout_width="match

Android - ConstraintLayout percentage using dimens

Deadly 提交于 2019-12-12 10:36:23
问题 There is a question How to make ConstraintLayout work with percentage values? and its answers show how to use the percentages: <android.support.constraint.Guideline android:id="@+id/guideline" android:layout_width="1dp" android:layout_height="wrap_content" android:orientation="vertical" app:layout_constraintGuide_percent="0.5"/> But if you don't want to hardcode the percentage but use a dimen resource it does not work. <!-- inside the layout --> <android.support.constraint.Guideline android

How to half overlap images in android constraint layout

China☆狼群 提交于 2019-12-12 08:36:31
问题 Is there any way to place an images half is on top of another image using only constraint layout. I know it can be done using relative and frame layouts but in the case of constraint layout is there anyway? prefer ways which do not require any hardcoding of heights/widths the requirement will look like this 回答1: you can set layout using only constraint layout like below : <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android

java.lang.ClassCastException: android.support.v7.widget.ActivityChooserView$InnerLayout cannot be cast to android.support.v7.widget.LinearLayoutCompat

丶灬走出姿态 提交于 2019-12-12 08:33:51
问题 Switching from LinearLayout to ConstraintLayout throwing this error java.lang.ClassCastException: android.support.v7.widget.ActivityChooserView$InnerLayout cannot be cast to android.support.v7.widget.LinearLayoutCompat The error occurs when i try to inflate the menu in onCreateOptionsMenu() in my fragment. My menu which I inflate :- <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <item

How do margins in chains work in ConstraintLayout 1.1.0 (beta)

半腔热情 提交于 2019-12-12 08:25:59
问题 I have had a couple of my layouts blow up since changing over to ConstraintLayout version 1.1.0-beta4. Before I make any changes, I want to get a better understanding of how margins work in ConstraintLayout chains. In the following, I compare a layout in ConstraintLayout version 1.0.2 to version 1.1.0-beta4, but I believe that the issue first arose in 1.1.0-beta2. My goal is to have some text views stretch across the screen with gaps between the 1st and 2nd text views and the 2nd and 3rd text

converting match_parent to “0dp”

我只是一个虾纸丫 提交于 2019-12-12 04:29:57
问题 When I use android:layout_height="match_parent" or android:layout_width="match_parent" as height/width of children in Constraint Layout and build the Gradle file it automatically changes to android:layout_height="0dp" or android:layout_widtht="0dp" respectively. Technically there is a huge difference between 0dp and match_parent . Most of the time it doesn't effect my layout but sometimes this thing completely destroy my Constraint Layout. I don't know why this happens. Please guide me. 回答1:

failed to install constraintlayout for android 1.0.2

我是研究僧i 提交于 2019-12-11 18:51:27
问题 I am new to AndroidStudio and android programing please help me to solve my problem when I create new project on AndroidStudio v3.1.4 frist time build is started to sync after 20 seconds build sync failed and show me this error : Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.android.support.constraint:constraint-layout:1.1.3. and error: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.android.support.test

ConstraintLayout weird attributes behavior when constraining 2 views

会有一股神秘感。 提交于 2019-12-11 17:38:51
问题 Let's say that I want to connect one view to another with app:layout_constraintTop_toTopOf (it can be any other constraint). If I will do it manually from the XML display it will be something like this: app:layout_constraintTop_toTopOf="@id/something" But - If I will do the same thing with the design option and not the XML option I will get extra + (auto generated) char for some reason and it will look like this : //notice the extra + in @+id app:layout_constraintTop_toTopOf="@+id/something"`

How to create tree layout using constraint layout in kotlin programatically?

这一生的挚爱 提交于 2019-12-11 15:46:23
问题 I want to create a tree layout dynamically using constraint layout. Something like this: With tree child nodes retrieved at runtime. Specifications: 1. All nodes can have a maximum of three child nodes. 2. The whole layout must be created programmatically. 3. Null is passed in data if a node does not have a child. What I tried: override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) createTree(treeNode) } private fun createTree

Error: missing android-support-constraint-layout in AOSP but prebuilts/sdk/current/extras has it

走远了吗. 提交于 2019-12-11 08:32:22
问题 My Android source repo already has two jar files android-support-constraint-layout.jar and android-support-constraint-layout-solver.jar respectively at prebuilts/sdk/current/extras/constraint-layout/libs/ and prebuilts/sdk/current/extras/constraint-layout-solver/ . Now, I have an app in packages/app, where I have an app/src/main/Android.mk : LOCAL_STATIC_ANDROID_LIBRARIES := \ ... android-support-constraint-layout \ android-support-constraint-layout-solver Still, I get the following error