![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
安卓开发
文章平均质量分 78
michelle0716
一只打代码的妹纸萌
展开
-
android跳转到另一个Activity三种方法
记性不好的妹纸萌,只能靠学习记录整理了。一个Intent对象,用于携带将跳转至下一个界面中使用的数据,使用putExtra(key,values)方法,此处存储的数据类型特别多,常用类型都支持。方法一、显式启动Intent内部直接声明要启动的activity所对应的class。Intent intent=new Intent(MainActivi转载 2017-12-09 15:29:16 · 91122 阅读 · 7 评论 -
android开发实现下载网页图片到本地并显示
直接加载服务端返回的图片地址,耗时较多。做开屏广告时,展示不及时。开发思路,第一次不加载广告,把服务端数据存在SharePreferences,但存的仅是地址。并没有实现下载,再次读取仍然需要联网。特此粘出代码。在我们应用的类里SaveImageActivity.javapublic class SaveImageActivity extends AppCompatActivity转载 2017-12-09 17:17:27 · 3709 阅读 · 0 评论 -
安卓 控件的AttributeSet
在接触控件中,常常可以看到AttributeSet attrs这个参数。例: TextView(Context context, AttributeSet attrs, int defStyleAttr) 举例: android:layout_height="wrap_content" android:text="@string/hello"原创 2017-12-21 23:03:45 · 6187 阅读 · 0 评论 -
继承TextView来写一个BadgeView(数字提醒)
需求情景; 功能项里加数字提醒:新消息数之类控件类如下** * A simple text label view that can be applied as a "badge" to any given {@link View}. * This class is intended to be instantiated at runtime rathe原创 2017-12-22 01:09:00 · 423 阅读 · 0 评论