- 博客(5)
- 收藏
- 关注
转载 eclipse连接github cannot open git-upload-pack(git-receive-pack)
转载自:https://blog.csdn.net/royal__moon/article/details/794274311、在eclipse-window-preferences-team-git-configuration中add entry,设置key为http.sslVerify,值为false2、打开eclipse安装目录下的eclipse.ini添加一句:-Dhttps.protoc...
2018-05-28 17:53:29 297
原创 Fragment not attached to Activity 异常
出现该异常,是因为Fragment的还没有Attach到Activity时,调用了如getResource()等,需要上下文Content的函数。解决方法,就是在调用 getResources().getString(R.string.app_name)之前增加一个判断isAdded()。例如:if (isAdded()) { holder.mTitleTv.setTextColor(getRes...
2018-05-23 14:38:52 180
原创 改变状态栏字体颜色或者背景颜色
public class SystemUtils { public static void setStatusBarFont(Activity activity, boolean lightStatusBar) { Window window = activity.getWindow(); View decor = window.getDecorView(); window.addFlag...
2018-05-17 18:15:05 229
原创 ViewPager中间大两边小效果的实现
效果图如下:代码实现:xml <android.support.v4.view.ViewPager android:id="@+id/mViewPager" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout...
2018-05-15 11:52:35 3938 1
转载 Fragment not attached to Activity异常
转载自:https://blog.csdn.net/u012939909/article/details/53355836问题:关于Fragment not attached to Activity 异常,是因为Fragment的还没有Attach到Activity时,调用了如getResource()、getString()等,需要上下文Content的函数。往往这种问题发生在线程中,尤其是网络...
2018-05-11 10:29:04 2800
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人