一.你要打开一个网页你可以自己写一个webview,在自己的程序中就可以打开.wv = (WebView) findViewById(R.id.webView1);wv.getSettings().setJavaScriptEnabled(true);wv.setScrollBarStyle(0);...
分类:
移动开发 时间:
2015-05-26 20:58:40
阅读次数:
119
新建android工程,在/layout/activity_main.xml文件中,新建了一个Button,但是,该ID资源person却没有在MainActivity中调用出来,person=(Button)this.findViewById(R.id.person);查看/R.java文件也没有...
分类:
其他好文 时间:
2015-05-24 15:26:39
阅读次数:
684
初步实现了相机的调用,做了简单界面,并没有实现核心功能Button button = (Button) findViewById(R.id.sao); button.setOnClickListener(new OnClickListener() { ...
分类:
其他好文 时间:
2015-05-23 22:34:51
阅读次数:
154
LinearLayout linearLayout = (LinearLayout) findViewById(R.id.main_container); OnClickListener listener = new NewClickListener(); Logger.Logger_d("li.....
分类:
移动开发 时间:
2015-05-23 01:17:14
阅读次数:
732
Drawable Animation
ImageView rocketImage = (ImageView) findViewById(R.id.rocket_image);
rocketImage.setBackgroundResource(R.drawable.rocket_thrust);
rocketAnimation = (AnimationDrawable) rocketImage.getBackground();
rocketAnimation .start();...
分类:
其他好文 时间:
2015-05-22 19:14:20
阅读次数:
124
本的getView写法Java代码public View getView(int position, View convertView, ViewGroup parent) {View view = new View();//通过inflate等找到布局 然后findViewById等 设置各个显示...
分类:
移动开发 时间:
2015-05-22 13:14:58
阅读次数:
130
listview添加headview后的点击事件
1、头部view:设置view的点击时间,用于屏蔽listview的item的点击事件
View headerView = getLayoutInflater().inflate(R.layout.listhead, null);
Button btn = (Button) headerView.findViewById(R.id.bu...
分类:
移动开发 时间:
2015-05-21 14:12:08
阅读次数:
192
介绍
一个实现了数据绑定 Presentation Model(MVVM) 模式的Android开源框架。 在没有性能损失的前提下(使用源代码生成来替代Java反射),RoboBinding 帮助你编写更可读,易于测试与维护的UI代码。通过绑定移除 - 大量不必要的代码(如addXXListener(),findViewById()等) 。
将 - 难于测试的Android代码以及运行过久且不切...
分类:
其他好文 时间:
2015-05-21 00:04:59
阅读次数:
232
ButterKnife -- 项目地址:https://github.com/JakeWharton/butterknife都说程序员都是比较懒的,什么事情都想着让程序自动化帮忙减轻工作量,这个开源库可以让我们从大量的findViewById()和setonclicktListener()解放出来。...
分类:
移动开发 时间:
2015-05-20 18:05:26
阅读次数:
150