安卓系统软件开发标有new是什么软件

后使用快捷导航没有帐号?
只需一步,快速开始
查看: 1026|回复: 5
在线时间4 小时经验值48 最后登录注册时间帖子阅读权限20UID
小学生, 积分 48, 距离下一级还需 2 积分
TA的每日心情难过 14:58签到天数: 6 天[LV.2]偶尔看看I
G币11 最后登录注册时间
马上注册,结交更多机友,下载更多应用,让你轻松玩转手机。
已有帐号?   下载游戏和软件,请【】进入机锋市场!
motox2的图标跟谷歌亲儿子的5.0系统比起来感觉太大了,占屏幕太多了。我想这个能改成原生安卓5.0的那种吗?
我觉得可能是用Google now的事情,这个谷歌即时能关闭不用吗,反正也用不起来啊。
在线时间4 小时经验值48 最后登录注册时间帖子阅读权限20UID
小学生, 积分 48, 距离下一级还需 2 积分
TA的每日心情难过 14:58签到天数: 6 天[LV.2]偶尔看看I
G币11 最后登录注册时间
看来用MOTOX2的人很少啊,早知道买谷歌6了,可是那么难买
在线时间2 小时经验值244 最后登录注册时间帖子阅读权限50UID
大学专科, 积分 244, 距离下一级还需 156 积分
TA的每日心情奋斗 23:21签到天数: 62 天[LV.6]常住居民II
G币296 最后登录注册时间
wbq2003 发表于
看来用MOTOX2的人很少啊,早知道买谷歌6了,可是那么难买
nexus 6太大了不好放身上,老X那种尺寸还更好
在线时间193 小时经验值2289 最后登录注册时间帖子阅读权限90UID
硕士, 积分 2289, 距离下一级还需 211 积分
该用户从未签到
G币0 最后登录注册时间
太大了真心不方便...
在线时间465 小时经验值465 最后登录注册时间帖子阅读权限60UID59426
大学本科, 积分 465, 距离下一级还需 235 积分
TA的每日心情无聊 15:47签到天数: 4 天[LV.2]偶尔看看I
G币98 最后登录注册时间
用的人更少,换个启动器。
在线时间2 小时经验值49 最后登录注册时间帖子阅读权限20UID
小学生, 积分 49, 距离下一级还需 1 积分
该用户从未签到
G币4 最后登录注册时间
wbq2003 发表于
看来用MOTOX2的人很少啊,早知道买谷歌6了,可是那么难买
换个启动器就行了
谷歌市场里找多得很
有可以自己调图标大小 名称的启动器
搜launcher
评分4以上的都很不错
Powered by程序写累了,就来玩玩酷跑小游戏吧,嘿嘿。
雨松MOMO送你一首歌曲,嘿嘿。
Android研究院之应用程序系统控件界面(三)
Android研究院之应用程序系统控件界面(三)
围观225553次
编辑日期: 字体:
雨松MOMO带大家盘点Android 开发中的一些常用系统控件的简单用法今天我用自己写的一个Demo 和大家详细介绍一个Android开发中遇到的一些常用系统控件的使用技巧。1.文本框TextViewTextView的作用是用来显示一个文本框,下面我用两种方式为大家呈现TextView, 第一种是通过xml布局文件呈现 ,第二种是通过代码来呈现,由此可见Android 的界面开发真的是非常灵活。&
public class TextViewActivity extends Activity {@Overrideprotected void onCreate(Bundle savedInstanceState) {setContentView(R.layout.textview);LinearLayout ll = (LinearLayout) findViewById(R.id.textviewll);TextView textView = new TextView(this);//设置显示文字textView.setText("从代码中添加一个TextView");//设置显示颜色textView.setTextColor(Color.WHITE);//设置显示字体大小textView.setTextSize(18);//设置显示背景颜色textView.setBackgroundColor(Color.BLUE);//设置锚点位置textView.setGravity(Gravity.CENTER_VERTICAL?Gravity.CENTER_HORIZONTAL);//把这个view加入到布局当中ll.addView(textView);super.onCreate(savedInstanceState);}}
&?xml version="1.0" encoding="utf-8"?&&LinearLayout xmlns:android="/apk/res/android" android:id="@+id/textviewll" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"& &TextView android:id="@+id/textView0" &&&&&&&&&&android:layout_width="fill_parent"
&&android:layout_height="wrap_content"
&&android:textColor="#000000"
&&android:textSize="18dip"
&&android:background="#00FF00"
&&&&&&android:text="@string/textView"
&&&&&&android:gravity="center_vertical?center_horizontal"
&&&&&&/&&/LinearLayout&
&&2.网页框WebViewWebView可以实现 类似web的网页 的系统控件 最主要的是可以使用html代码,如访问网页等。
public class WebViewActivity extends Activity {&&&&WebView webView = null;&&&&static final String MIME_TYPE = "text/html";&&&&static final String ENCODING = "utf-8";&&&&@Override&&&&protected void onCreate(Bundle savedInstanceState) { setContentView(R.layout.webview); webView = (WebView) findViewById(R.id.webview); webView.loadDataWithBaseURL(null,"&a href='http://blog.csdn.net/xys'&欢迎访问雨松MOMO的博客&/a&", MIME_TYPE, ENCODING, null); super.onCreate(savedInstanceState);&&&&}}
&?xml version="1.0" encoding="utf-8"?&&LinearLayout xmlns:android="/apk/res/android" android:id="@+id/textviewll" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"&
&TextView android:layout_width="fill_parent"
&&android:layout_height="wrap_content"
&&android:textColor="#000000"
&&android:textSize="18dip"
&&android:background="#00FF00"
&&&&&&android:text="网页框WebView测试"
&&&&&&android:gravity="center_vertical?center_horizontal"
&&&&&&/& &WebView android:id="@+id/webview"&&&&&&&&&& &&android:layout_height="wrap_content"&&&&&&&&&& &&android:layout_width="fill_parent"/&&/LinearLayout&
3.Menu菜单Menu菜单在android系统控件中真的很具有特色 点击以后会悬浮出一个菜单在次点击菜单则会消失,今天我只是简单的介绍一下系统的Menu菜单, 其实Menu菜单可以做出非常好看的效果,比如半透明 自定义按钮图片等等,后面我会详细的介绍menu菜单。
public class MenuActivity extends Activity {@Overrideprotected void onCreate(Bundle savedInstanceState) {setContentView(R.layout.menuview);super.onCreate(savedInstanceState);}@Overridepublic boolean onCreateOptionsMenu(Menu menu) {menu.add(0, 0, Menu.NONE, "菜单1").setIcon(R.drawable.icon);menu.add(0, 1, Menu.NONE, "菜单2").setIcon(R.drawable.icon);menu.add(0, 2, Menu.NONE, "菜单3").setIcon(R.drawable.icon);menu.add(0, 3, Menu.NONE, "菜单4").setIcon(R.drawable.icon);menu.add(0, 4, Menu.NONE, "菜单5").setIcon(R.drawable.icon);menu.add(0, 5, Menu.NONE, "菜单6").setIcon(R.drawable.icon);return super.onCreateOptionsMenu(menu);}@Overridepublic boolean onOptionsItemSelected(MenuItem item) {Dialog(item.getItemId());return super.onOptionsItemSelected(item);}private void Dialog(int message) {new AlertDialog.Builder(this).setMessage("您单击第【" + message + "】项Menu菜单项.").show();}}
&?xml version="1.0" encoding="utf-8"?&&LinearLayout xmlns:android="/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"& &TextView android:layout_width="fill_parent"
&&android:layout_height="wrap_content"
&&android:textColor="#000000"
&&android:textSize="18dip"
&&android:background="#00FF00"
&&&&&&android:text="Menu菜单测试"
&&&&&&android:gravity="center_vertical?center_horizontal"
&&&&&&/&&/LinearLayout&
4.按钮Button第一个是绘制系统字的button, 第二个是带图片的button 。
public class ButtonActivity extends Activity {&&&&Context mContext = null;&&&&@Override&&&&protected void onCreate(Bundle savedInstanceState) { setContentView(R.layout.buttonview); mContext = this; //普通按钮 Button button0 = (Button)findViewById(R.id.buttonview0); //设置按钮文字颜色 button0.setTextColor(Color.BLUE); //设置按钮文字大小 button0.setTextSize(30); //设置按钮监听 点击事件 button0.setOnClickListener(new OnClickListener() { &&&&@Override &&&&public void onClick(View arg0) {
Toast.makeText(ButtonActivity.this, "您点击了‘这是一个按钮’", Toast.LENGTH_LONG).show(); &&&&} }); //带图片的按钮 ImageButton button1 = (ImageButton)findViewById(R.id.buttonview1); //设置按钮监听 点击事件 button1.setOnClickListener(new OnClickListener() { &&&&@Override &&&&public void onClick(View arg0) {
Toast.makeText(ButtonActivity.this, "您点击了一个带图片的按钮", Toast.LENGTH_LONG).show(); &&&&} }); super.onCreate(savedInstanceState);&&&&}}
&?xml version="1.0" encoding="utf-8"?&&LinearLayout xmlns:android="/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"& &TextView android:layout_width="fill_parent"
&&android:layout_height="wrap_content"
&&android:textColor="#000000"
&&android:textSize="18dip"
&&android:background="#00FF00"
&&&&&&android:text="Button按钮测试"
&&&&&&android:gravity="center_vertical?center_horizontal"
&&&&&&/&&&&&&&&Button&&&&
android:id="@+id/buttonview0"&&&&
&&&& android:layout_width="fill_parent"
android:layout_height="wrap_content"&&&&
android:text="这是一个按钮"&&&&
/&&&&&&& &ImageButton&&&&
android:id="@+id/buttonview1"&&&&
&&&& android:layout_width="fill_parent"
android:layout_height="wrap_content"&&&&
android:src="@drawable/icon"&&&&
/&&/LinearLayout&
5.编辑框EditView编辑框在实际开发中用到的非常普遍 比如登录 输入账号 密码 等等。
public class EditTextActivity extends Activity {Context mContext = null;@Overrideprotected void onCreate(Bundle savedInstanceState) {setContentView(R.layout.editview);mContext = this;//帐号final EditText editText0 = (EditText)findViewById(R.id.editview0);//密码final EditText editText1 = (EditText)findViewById(R.id.editview1);//确认按钮Button button = (Button)findViewById(R.id.editbutton0);button.setOnClickListener(new OnClickListener() {@Overridepublic void onClick(View arg0) {String username = editText0.getText().toString();String password = editText1.getText().toString();Toast.makeText(EditTextActivity.this, "用户名:"+username +"密码:"+ password, Toast.LENGTH_LONG).show();}});super.onCreate(savedInstanceState);}}
&?xml version="1.0" encoding="utf-8"?&&LinearLayout xmlns:android="/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"& &TextView android:layout_width="fill_parent"
&&android:layout_height="wrap_content"
&&android:textColor="#000000"
&&android:textSize="18dip"
&&android:background="#00FF00"
&&&&&&android:text="EditText编辑框测试"
&&&&&&android:gravity="center_vertical?center_horizontal"
&&&&&&/&&&&&&&&EditText&&&&
android:id="@+id/editview0"&&&&
&&&& android:layout_width="fill_parent"
android:layout_height="wrap_content"&&&&&&&&&&&& android:hint="请输入帐号"&&&&&&&&&&&& android:phoneNumber="true"&&&&
/&&&&&&&&EditText&&&&
android:id="@+id/editview1"&&&&
&&&& android:layout_width="fill_parent"
android:layout_height="wrap_content"&&&&&&&&&&&& android:hint="请输入密码"&&&&&&&&&&&& android:password="true"&&&&
/&&&&&&&&Button&&&&
android:id="@+id/editbutton0"&&&&
&&&& android:layout_width="fill_parent"
android:layout_height="wrap_content"&&&&
android:text="确定"&&&&
/&&/LinearLayout&
6.单项选择使用RadioGroup 包住若干个RadioButton 来实现单项选择。监听每一个RadioGroup 就可以知道那个单选组中的第一个ID被按下。&
public class RadioActivity extends Activity {Context mContext = null;@Overrideprotected void onCreate(Bundle savedInstanceState) {setContentView(R.layout.radioview);mContext = this;//单选组(只有在一个组中的按钮可以单选)RadioGroup radioGroup = (RadioGroup)findViewById(R.id.radion0);//单选按钮(第一组)final RadioButton radioButton0 = (RadioButton)findViewById(R.id.radionButton0);final RadioButton radioButton1 = (RadioButton)findViewById(R.id.radionButton1);final RadioButton radioButton2 = (RadioButton)findViewById(R.id.radionButton2);radioGroup.setOnCheckedChangeListener(new OnCheckedChangeListener() {@Overridepublic void onCheckedChanged(RadioGroup arg0, int checkID) {if(radioButton0.getId() == checkID) {Toast.makeText(RadioActivity.this, "您选中了第一组" + radioButton0.getText(), Toast.LENGTH_LONG).show();}else if(radioButton1.getId() == checkID) {Toast.makeText(RadioActivity.this, "您选中了第一组" + radioButton1.getText(), Toast.LENGTH_LONG).show();}else if(radioButton2.getId() == checkID) {Toast.makeText(RadioActivity.this, "您选中了第一组" + radioButton2.getText(), Toast.LENGTH_LONG).show();}}});RadioGroup radioGroup0 = (RadioGroup)findViewById(R.id.radion1);//单选按钮(第二组)final RadioButton radioButton3 = (RadioButton)findViewById(R.id.radionButton3);final RadioButton radioButton4 = (RadioButton)findViewById(R.id.radionButton4);final RadioButton radioButton5 = (RadioButton)findViewById(R.id.radionButton5);radioGroup0.setOnCheckedChangeListener(new OnCheckedChangeListener() {@Overridepublic void onCheckedChanged(RadioGroup arg0, int checkID) {if(radioButton3.getId() == checkID) {Toast.makeText(RadioActivity.this, "您选中了第二组" + radioButton3.getText(), Toast.LENGTH_LONG).show();}else if(radioButton4.getId() == checkID) {Toast.makeText(RadioActivity.this, "您选中了第二组" + radioButton4.getText(), Toast.LENGTH_LONG).show();}else if(radioButton5.getId() == checkID) {Toast.makeText(RadioActivity.this, "您选中了第二组" + radioButton5.getText(), Toast.LENGTH_LONG).show();}}});super.onCreate(savedInstanceState);}}
&?xml version="1.0" encoding="utf-8"?&&LinearLayout xmlns:android="/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"& &TextView android:layout_width="fill_parent"
&&android:layout_height="wrap_content"
&&android:textColor="#000000"
&&android:textSize="18dip"
&&android:background="#00FF00"
&&&&&&android:text="单项选择测试第一组"
&&&&&&android:gravity="center_vertical?center_horizontal"
&&&&&&/&&&&&&RadioGroup&&&&&&&&&&&&&&android:id="@+id/radion0"
&&android:layout_width="fill_parent"
&&android:layout_height="wrap_content" &&&&&&RadioButton&&
&&android:id="@+id/radionButton0"
&&android:layout_width="fill_parent"
&&android:layout_height="wrap_content"
&&android:text="item0"&&&&/&&&&& &RadioButton&&
&&android:id="@+id/radionButton1"
&&android:layout_width="fill_parent"
&&android:layout_height="wrap_content"
&&android:text="item1"&&&&/&&&&& &RadioButton&&
&&android:id="@+id/radionButton2"
&&android:layout_width="fill_parent"
&&android:layout_height="wrap_content"
&&android:text="item2"&&&&/&&&&&&/RadioGroup& &TextView android:layout_width="fill_parent"
&&android:layout_height="wrap_content"
&&android:textColor="#000000"
&&android:textSize="18dip"
&&android:background="#00FF00"
&&&&&&android:text="单项选择测试第二组"
&&&&&&android:gravity="center_vertical?center_horizontal"
&&&&&&/&&&&&&RadioGroup&&&&&&&&&&&&&&android:id="@+id/radion1"
&&android:layout_width="fill_parent"
&&android:layout_height="wrap_content" &&&&&&RadioButton&&
&&android:id="@+id/radionButton3"
&&android:layout_width="fill_parent"
&&android:layout_height="wrap_content"
&&android:text="item3"&&&&/&&&&& &RadioButton&&
&&android:id="@+id/radionButton4"
&&android:layout_width="fill_parent"
&&android:layout_height="wrap_content"
&&android:text="item4"&&&&/&&&&& &RadioButton&&
&&android:id="@+id/radionButton5"
&&android:layout_width="fill_parent"
&&android:layout_height="wrap_content"
&&android:text="item5"&&&&/&&&&&&/RadioGroup&&/LinearLayout&
&&7.多项选择使用系统控件Checkbox 监听每一个checkbox 的点击事件就可以确定那几个选项被选择了。
public class CheckboxActivity extends Activity {//用来储存选中的内容ArrayListitem = new ArrayList();@Overrideprotected void onCreate(Bundle savedInstanceState) {setContentView(R.layout.checkboxview);CheckBox checkbox0 = (CheckBox)findViewById(R.id.checkboxview0);CheckBox checkbox1 = (CheckBox)findViewById(R.id.checkboxview1);CheckBox checkbox2 = (CheckBox)findViewById(R.id.checkboxview2);CheckBox checkbox3 = (CheckBox)findViewById(R.id.checkboxview3);Button button = (Button)findViewById(R.id.checkboxbutton);//对checkbox进行监听checkbox0.setOnCheckedChangeListener(new OnCheckedChangeListener() {@Overridepublic void onCheckedChanged(CompoundButton button, boolean arg1) {String str = button.getText().toString();if (button.isChecked()) {item.add(str);} else {item.remove(str);}}});checkbox1.setOnCheckedChangeListener(new OnCheckedChangeListener() {@Overridepublic void onCheckedChanged(CompoundButton button, boolean arg1) {String str = button.getText().toString();if (button.isChecked()) {item.add(str);} else {item.remove(str);}}});checkbox2.setOnCheckedChangeListener(new OnCheckedChangeListener() {@Overridepublic void onCheckedChanged(CompoundButton button, boolean arg1) {String str = button.getText().toString();if (button.isChecked()) {item.add(str);} else {item.remove(str);}}});checkbox3.setOnCheckedChangeListener(new OnCheckedChangeListener() {@Overridepublic void onCheckedChanged(CompoundButton button, boolean arg1) {String str = button.getText().toString();if (button.isChecked()) {item.add(str);} else {item.remove(str);}}});button.setOnClickListener(new OnClickListener() {@Overridepublic void onClick(View arg0) {String str = item.toString();Toast.makeText(CheckboxActivity.this, "您选中了" + str, Toast.LENGTH_LONG).show();}});super.onCreate(savedInstanceState);}}
&?xml version="1.0" encoding="utf-8"?&&LinearLayout xmlns:android="/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"& &TextView android:layout_width="fill_parent"
&&android:layout_height="wrap_content"
&&android:textColor="#000000"
&&android:textSize="18dip"
&&android:background="#00FF00"
&&&&&&android:text="多项选择测试"
&&&&&&android:gravity="center_vertical?center_horizontal"
&&&&&&/&&&&&&&&CheckBox&&&&
android:id="@+id/checkboxview0"&&&&
&&&& android:layout_width="fill_parent"
android:layout_height="wrap_content"&&&&
android:text="item0"&&&&
/&&&&&&&&CheckBox&&&&
android:id="@+id/checkboxview1"&&&&
&&&& android:layout_width="fill_parent"
android:layout_height="wrap_content"&&&&
android:text="item1"&&&&
/&&&&&&&&CheckBox&&&&
android:id="@+id/checkboxview2"&&&&
&&&& android:layout_width="fill_parent"
android:layout_height="wrap_content"&&&&
android:text="item2"&&&&
/&&&&&&&&CheckBox&&&&
android:id="@+id/checkboxview3"&&&&
&&&& android:layout_width="fill_parent"
android:layout_height="wrap_content"&&&&
android:text="item3"&&&&
/&&&&&&&&Button&&&&
android:id="@+id/checkboxbutton"&&&&
&&&& android:layout_width="fill_parent"
android:layout_height="wrap_content"&&&&
android:text="确定"&&&&
/&&/LinearLayout&
最后如果你还是觉得我写的不够详细 看的不够爽 不要紧我把源代码的下载地址贴出来 欢迎大家一起讨论学习雨松MOMO希望可以和大家一起进步。下载地址:
本文固定链接:
转载请注明:
MOMO与MO嫂提醒您:亲,如果您觉得本文不错,快快将这篇文章分享出去吧 。另外请点击网站顶部彩色广告或者捐赠支持本站发展,谢谢!
作者:雨松MOMO
专注移动互联网,Unity3D游戏开发
如果您愿意花10块钱请我喝一杯咖啡的话,请用手机扫描二维码即可通过支付宝直接向我捐款哦。
您可能还会对这些文章感兴趣!您的位置: &
一款学习英语的软件-Touch Word
人气:12031
大小:24KB
授权:免费软件
语言:简体中文
系统要求:Android 1.5 以上
管理手机内容
免费下载资源
全面支持 Android 手机
可以单个字和整句话都进行翻译,便于理解,
生活休闲1140516次下载
系统安全528929次下载
聊天社交301941次下载
系统安全201708次下载
等热门软件和游戏下载.
资源统计:无插件软件:93624个 无病毒软件:93918个 昨日已处理149个带插件、病毒的软件
本站总软件:93918个 软件总下载次数:23.23亿次
软件教程文章:91126篇 总浏览次数:2.838亿次android中 new创建对象和 findviewbyid有什么不同_百度知道
android中 new创建对象和 findviewbyid有什么不同
ew 是创建一个类的对象
findviewbyid 主要是通过ID来查找布局文件VIEW上的子控件. If this view has the given id, return this view,它返回的是一个VIEW对象 Look for a child view with the given id
其他类似问题
为您推荐:
其他1条回答
安卓中new 对象是生成一个类的实例对象,可以动态的从XML文件中读取相关VIEW的属性去生成一个对象,因为安卓开始就设计好了的,而用findViewById方法则是系统自动生成的R类里面的ID子类里面根据所给的ID去从已有的xml布局文件中提取已经写好的View对象,也就是这个对象之前不存在
android的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁

我要回帖

更多关于 安卓系统软件开发 的文章

 

随机推荐