美文网首页GoogleStudyJams
SJ64 拿起工具(Android Studio)开始造轮子(贺

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

作者: Clixin | 来源:发表于2016-04-18 22:42 被阅读57次

    工具安装

    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

    相关文章

      网友评论

        本文标题:SJ64 拿起工具(Android Studio)开始造轮子(贺

        本文链接:https://www.haomeiwen.com/subject/jimalttx.html