- 博客(5)
- 收藏
- 关注
原创 Android如何判断网络状态是否良好
public class Tools { public static boolean isNetworkAvailable(Context context){ //获得网络状态管理器 ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService
2017-05-30 18:10:57 2142
原创 android中利用handler改变textView的内容
先写一个TextView 和ButtonTextView android:text="TextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/textView" />Button android:id=
2017-05-24 18:19:42 6121 3
原创 广播中的提示方式NotificationManager
public class MyBroadcastReveiver extends BroadcastReceiver { private NotificationManager manager; public void onReceive(Context context, Intent intent){ manager = (NotificationManager)
2017-05-17 19:28:45 601 1
原创 android中的BroadcastReceiver简单用法
在xml文件中注册一个按钮Button android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="发送广播"/> 给按钮添加事件: button = (Button)findViewBy
2017-05-17 18:05:51 364 1
原创 android中ListView的简单用法
安卓中ListView控件是一个非常重要、有用的控件。 首先ListView需要数据源,一般我们在实际的项目中会与数据库结合起来使用。但是做一个小的测试就没有必要使用数据库中的数据了,我们使用集合类List存放数据。 集合的定义如下: public List getScore(){ List list = new ArrayList(); for(int i
2017-05-12 18:01:22 1094 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人