安卓总结

学习了一个月的android课程 感觉学会很多的东西
首先我对android的学习态度不像上学期对JAVA那样的枯燥 我感觉自己对android的兴趣还是蛮大的
我们先是对android的界面进行了学习 知道有以下几个基本控件

<TextView用于文本信息的构建   <ImageView用于图片的加入   <EditText用于文本框的构建   <RadioGroup用于单选按钮组   <RadioButton用于单选按钮  <CheckBox用于复选框   <Button用于普通按钮

<TextView
        android:id="@+id/messi"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:singleLine="true"
        android:focusable="true"
        android:focusableInTouchMode="true"
        android:text=" 谁是你最爱的球星 "
        android:gravity="center"
        android:textColor="#a6ff00"
        android:marqueeRepeatLimit="marquee_forever"
        android:ellipsize="marquee"
        android:textSize="50sp" />

还有对功能的实现 要对对象进行声明 也就是id之后的后缀名

public class chooseActivity extends AppCompatActivity {
    private TextView messi;
    private ImageView picture;
    private RadioGroup radio1;
    private RadioButton cluo;
    private RadioButton meixi;
    private RadioButton neymar;
    private RadioGroup radio2;
    private RadioButton suya;
    private RadioButton gezi;
    private RadioButton xiaoluo;

然后就是让每一个组件和自己写的id连接起来 还有加入自己的图片的话就要将图片粘贴在drawable
在drawable中进行图片的添加

 <?xml version="1.0" encoding="utf-8"?>
    <selector xmlns:android="http://schemas.android.com/apk/res/android">
        <item
            android:drawable="@drawable/cluo" />
        <item
            android:drawable="@drawable/gezi" />
        <item
            android:drawable="@drawable/meixi" />
        <item
            android:drawable="@drawable/neymar" />
        <item
            android:drawable="@drawable/suya" />
        <item
            android:drawable="@drawable/xiaoluo"/>
    </selector>

将后面的id与之前的相对应

对于自己的问题啊
就是上课太跳了 有时候老师讲的都没有听到
然后就是比较懒哦 对android的一些改写内容自己还不是很清楚 自己也很希望把这些小问题去解决了
页面布局的基本还是知道 但有时又写代码也总是马马虎虎的
希望在后面的学习中我都能好好的克服这些小毛病 努力的把android学好

posted on 2017-03-28 21:07  敬芯铜  阅读(110)  评论(0)    收藏  举报

导航