Android集训第一天

上午

老师也没有讲什么好东西,无非就是给我们吹吹牛,讲讲Android的历史,讲了Android的基本框架(那个东西算作是框架吧)由底层向用户一一介绍,然后讲了一堆没用的东西balabala,后面老师用Android studio一步一步的讲解,虽然大致内容我都是知道的,然后开始了第一个代码helloworld,然后就下课了

下午

介绍TextView以及Android studio 左边工具区

<TextView
   android:id="@+id/textview1"
   android:layout_width="wrap_content"
   android:layout_height="wrap_content"
   android:text="@string/app_name"
   android:textColor="@color/red" />

然后讲解了RGB(虽然感觉没用),然后利用res/values/strings.xml与TextView相匹配,主要讲解了TextView中的autoLink

none   0x00
web    0x01
email  0x02
phone  0x04
map    0x08
all    0x0f

eg:
在布局res/中定义,只需要tv.setText(“www.baidu.com”);
如果不在 布局 res/中定义,则需要在java/中调用setAutoLinkMsak()方法

tv = (TextView) super.findViewById(R.id.textview1);
tv.setAutoLinkMask(Linkify.ALL);
tv.setText("www.baidu.com");