前提・実現したいこと
xamarinでConstraintLayoutを使いたい
発生している問題・エラーメッセージ
配置したボタンの位置が左上固定になってします
tools:layout_editor_absoluteX
及び
tools:layout_editor_absoluteY
で指定した位置にならない
ソースをみると
'http://schemas.android.com/tools:layout_editor_absoluteX'属性が宣言されていません
'http://schemas.android.com/tools:layout_editor_absoluteY'属性が宣言されていません
という青波線があるので、これが原因と思われるが、解消方法が分からない
該当のソースコード
レイアウトのソースは以下の通りです
<?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="match_parent"
android:background="@drawable/background">
<Button
android:id="@+id/myButton"
android:layout_width="400dp"
android:layout_height="100dp"
android:text="@string/hello"
tools:layout_editor_absoluteX="150dp"
tools:layout_editor_absoluteY="250dp" />
<Button
android:id="@+id/myButton2"
android:layout_width="300dp"
android:layout_height="150dp"
android:text="@string/hello"/>
</android.support.constraint.ConstraintLayout>
試したこと
クリーンのあとにリビルド
入力ミスがないかチェック
補足情報(FW/ツールのバージョンなど)
Visual Studio 2017
xamarin.Android
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/07/27 08:18