SJ64 拿起工具(Android Studio)开始造轮子(贺卡App)

工具安装

  1. 安装 JDK(Java Development Kit)
  2. 安装Android Studio

贺卡App

遇到的错误代码

Error running app: Instant Run requires 'Tools | Android | Enable ADB integration' to be enabled.

解决方法:菜单栏>Tools>Android> Enable ADB integration 打勾

三步走:

  1. 选择view

  2. 放置view的位置

  3. 定义view的样式

    <?xmlversion="1.0"encoding="utf-8"?>
    <RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.example.clixin.happybirthday.MainActivity">
    
        <ImageView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:src="@drawable/pic"
            android:scaleType="center"/>
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textSize="80sp"
            android:textColor="#FFF"
            android:paddingLeft="10dp"
            android:paddingTop="10dp"
            android:text="HapppyBirthday!"/>
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_alignParentRight="true"
            android:textSize="30sp"
            android:textColor="#FFF"
            android:paddingBottom="10dp"
            android:paddingRight="10dp"
            android:text="From鑫子"/>
    </RelativeLayout>
    
Demo.png
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容