android-constraintlayout

    0熱度

    2回答

    我學習如何使用ConstraintLayout構建響應式UI,方法是遵循此article。但是我的Android項目中看不到ConstraintLayout選項。 的build.gradle apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23

    0熱度

    1回答

    我使用android.support.constraint.ConstraintLayout與四個EditText和一個Button。當點擊第一個Edittext時,SoftInput Keyboard可見,然後EditText和Button隱藏。 我試着在ManiFeast.xml android:windowSoftInputMode="adjustResize" android:window

    2熱度

    3回答

    好的,這裏是我的活動的XML。 <?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.c

    0熱度

    1回答

    我想創建一個應用程序,可以動態地將視圖添加到ConstraintLayout而不需要數據庫。我把LayoutParams包裝在這裏,看看他們要去哪裏。我已經可以添加視圖,但我不知道他們爲什麼繼續前往屏幕的左側,即使我爲每個視圖使用了不同的LayoutParams,其大小也是一樣的。利潤率似乎也不如此。下面是我的代碼: ConstraintSet set = new ConstraintSet()

    0熱度

    2回答

    我試圖讓兩張卡片成爲相同的正方形,每邊都有8dp的邊距水平對齊。 事情是這樣的: 我一直在使用約束佈局和卡片的比例設置爲1的嘗試:1,卡對齊,併爲正方形,但他們是小得可笑和不匹配整個佈局。 這裏是我的佈局: <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent"

    0熱度

    1回答

    我正在使用RemoteViews顯示通知。當我使用ConstraintLayout時,會發生通貨膨脹錯誤。當我用RelativeLayout替換ConstraintLayout時,則錯誤得到解決。 爲什麼ConstraintLayout不會膨脹? 我在運行時遇到以下錯誤。 錯誤 Couldn't inflate view for notification com.inadev.datasync.e

    0熱度

    2回答

    我無法實現這個。 我想讓viewB跟隨viewA的開始。 然後,我想創建一個約束,從viewA的開始到它的父節點有一個空間。 。 代碼我想: <android.support.constraint.ConstraintLayout android:layout_width="match_parent" android:layout_height="wrap_content"

    4熱度

    1回答

    下面的視圖需要是正方形的。我也希望將觀點限制在一定的範圍內。某種程度上,ConstraintLayout在與同一元素上的dimensionRatio結合使用時會忽略最大寬度/高度屬性。 <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" x

    0熱度

    2回答

    我使用約束佈局作爲根與3子視圖: 的TextView 按鈕 SurfaceView(View.Visibility =已刪除) 我想當我點擊Button時,SurfaceView出現(View.Visibility = Visible)from: Y = - SurfaceView.height 到: Y = 0 ,當我點擊第二個時間上的按鈕,SurfaceView消失(View.Visibili

    1熱度

    1回答

    由於新的約束佈局已經推出,它在默認情況下,只要你創建一個新的活動創建的,按照約定我已經換了約束佈局內其他視圖組(線性佈局,相對佈局等),在任何時候了吧? 或者可我只是刪除約束佈局,並繼續使用其他View組作爲根佈局? 我問,因爲我想澄清一下,如果谷歌將使其成爲常態有包裹約束佈局內的所有查看組或最終完全停止使用舊的視圖組。