- 博客(10)
- 资源 (1)
- 收藏
- 关注
原创 The application's PagerAdapter changed the adapter's contents without calling Pagapter
今天学习的时候爆出了这样一个关于ViewPager的错误: The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged! 找了好长时间发现是我将数据源的初始化放在了加载适配器之后: private void
2015-12-28 16:12:51
731
转载 ImageView等比例缩小
android:scaleType可控制图片的缩放方式,示例代码如下: [html] view plaincopyprint? ImageView android:id="@+id/img" android:src="@drawable/logo" android:scaleType="centerInside"
2015-11-20 15:49:08
703
原创 TextView和SpannableString实现图文混排的效果
使用SpannableString和TextView可以实现一个图文混排的效果 实现代码: Activity_Main.xml <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" a
2015-11-18 22:35:32
342
转载 SpannableString属性详解
1、BackgroundColorSpan 背景色 2、ClickableSpan 文本可点击,有点击事件 3、ForegroundColorSpan 文本颜色(前景色) 4、MaskFilterSpan 修饰效果,如模糊(BlurMaskFilter)、浮雕(EmbossMaskFilter) 5、MetricAffectingSpan 父类
2015-11-18 21:33:24
221
原创 error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCom
error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'. 今天学习的时候出现了这样一个错误,经过在网上一番搜索,发现是V7包没有导入,导入V7包以后就对了!!!
2015-11-18 19:54:23
331
原创 使用popupwindow将布局文件以对话框的形式弹出
使用popupwindow可以将布局文件以对话框的形式弹出 PopupWindow的位置按照有无偏移分,可以分为偏移和无偏移两种;按照参照物的不同,可以分为相对于某个控件(Anchor锚)和相对于父控件。具体如下 showAsDropDown(View anchor):相对某个控件的位置(正左下方),无偏移showAsDropDown(View anchor, int xoff,
2015-11-18 15:59:52
400
转载 apk反编译
在学习Android开发的过程你,你往往会去借鉴别人的应用是怎么开发的,那些漂亮的动画和精致的布局可能会让你爱不释手,作为一个开发者,你可能会很想知道这些效果界面是怎么去实现的,这时,你便可以对改应用的APK进行反编译查看。下面是我参考了一些文章后简单的教程详解。 (注:反编译不是让各位开发者去对一个应用破解搞重装什么的,主要目的是为了促进开发者学习,借鉴好的代码,提升自我开发水平。)
2015-11-18 15:22:38
203
原创 does not specify a android.test.InstrumentationTestRunner instrumentation or does not declare uses-l
单击“Android JUnit Test”运行后会,出现如下警告: does not specify a android.test.InstrumentationTestRunner instrumentation or does not declare uses-library android.test.runner in its AndroidManifest.xml 在网上查到
2015-10-30 13:43:35
777
转载 ActivityManager: Error: Activity class {..} does not exist.
在有Eclipse开发Android应用的过程中如果我们手动修改内容或配置时,容易报出如下错误 ActivityManager: Error: Activity class {..} does not exist. 原因分析: 修改的内容没有及时更新,例如:之前的类名为DBSharedActivity,改成SQLiteActivity,运行时提示找不到“SQLiteA
2015-10-30 13:42:01
466
转载 Navicat 2003-can't connect to MYSQL server on 'localhost'(10061)
*********************文章为转,亲试有用*********************************** 这是篇解决问题的文章,就得按照解决问题的方式来进行。 发现问题:问题的出现是这样的-----我打开Navicat,点击某个主机名/IP为localhost的连接,然后报错如下。 分析问题:这句话的意思是“不能够连接到主机
2015-09-09 08:05:55
276
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人