美文网首页
# Android程序开发 入门笔记2

# Android程序开发 入门笔记2

作者: 懒生活 | 来源:发表于2021-09-10 07:22 被阅读0次

Android程序设计学习笔记

Exercise: create a temperature converter

  1. create new project
  2. create new attributes, like color, string and so on. xml position is res/values/XXX.xml
  3. create the layout. Remove the old layout. Afterwards add a LinearLayout with one EditText as child, afterwards add a RadioGroup with two radio buttons and a button to your layout.
  4. we can use attributes we add at step 2 to decorate the views.
  5. set android:onClick property for button.
    有三种方法可以添加按钮的按钮事件和响应,一种就是通过xml, 一种通过设置监听的方法。还有一种还不理解。

安卓是怎么适配不同的资源的,比如手机分辨率不一样,如何适配正确的图片资源等?

相关文章

网友评论

      本文标题:# Android程序开发 入门笔记2

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