Android 教學【開發 Android App 手機應用程式:使用 kotlin 程式語言】ConstraintLayout Circular positioning 圓形定位

 

【開發 Android APP 手機應用程式:使用 kotlin 程式語言】
線上教學課程目錄:http://bit.ly/3gH1Gjw
Youtube 課程播放清單:https://bit.ly/433Offj

課程摘要

本課程學習如何使用 ConstraintLayout 約束佈局中的 Circular positioning 圓形定位。

教學影片

若您無法順利觀看教學影片,請先登入您的 YouTube 帳號,然後點擊以下連結加入我們的頻道會員:

  • 一般會員:成為一般會員後,您將能夠觀看我們所提供的一般會員專屬線上課程。
  • 精實會員:成為精實會員後,您將能夠觀看我們所提供的精實會員專屬線上課程。

程式碼範例

範例名稱:ConstraintLayout Circular positioning 圓形定位
作者:HKT (侯光燦)
授權範圍:使用時必須註明出處且不得為商業目的之使用
範例下載點:點我下載

activity_main.xml

<androidx.constraintlayout.widget.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/centerButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="中心"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintBottom_toBottomOf="parent" />


    <Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="按鈕1"
        app:layout_constraintCircle="@id/centerButton"
        app:layout_constraintCircleAngle="45"
        app:layout_constraintCircleRadius="100dp" />

</androidx.constraintlayout.widget.ConstraintLayout>****

那這次的課程就介紹到這邊囉~

順帶一提,KT 線上教室,臉書粉絲團,會不定期發佈相關資訊,不想錯過最新資訊,不要忘記來按讚,加追蹤喔!也歡迎大家將這套課程分享給更多人喔。

我們下次再見囉!!!掰掰~

這個網誌中的熱門文章

2023 最新入門零基礎 Kotlin教學【從零開始學 Kotlin 程式設計】Kotlin 教學課程目錄 (Android Kotlin, IntelliJ IDEA, Android Studio, Android APP 開發教學)

nano 文字編輯器

Android Studio 歷代版本下載點

16天記下7000單字

最新入門零基礎 Java 教學【從零開始學 Java 程式設計】Java教學課程目錄 (IntelliJ IDEA 開發教學)