自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(18)
  • 收藏
  • 关注

原创 Fragment切换之间的生命周期

刚刚进入程序时生命周期如下:04-11 10:55:32.968 32125-32125/lv.gx.com.fragmentlifecycle I/test: Fragment1---onAttach04-11 10:55:32.969 32125-32125/lv.gx.com.fragmentlifecycle I/test: Fragment1---onCreate04-11 10:55

2017-04-11 11:01:14 1812

原创 java 冒泡排序算法

int[]arr = new int[]{0,3,1,4,6,7,10};int temp;for(int i = 0;i < arr.length - 1;i++){ for(int j = 0;j < arr.length - 1 -i;j++){ if(arr[j]>arr[j+1]){ temp = arr[j+1];

2017-03-31 09:34:18 374

原创 Activity组件生命周期

Activity生命周期:当app启动运行时执行顺序如下:03-30 22:47:31.776 7305-7305/lv.gx.com.test I/test: onCreate03-30 22:47:31.776 7305-7305/lv.gx.com.test I/test: onStart03-30 22:47:31.784 7305-7305/lv.gx.com.test I/test:

2017-03-30 23:00:17 429

原创 android studio运行项目时运行不了报错Error running sample: This version of Android Studio is incompatible with t

报错原因: Error running sample: This version of Android Studio is incompatible with the Gradle Plugin used. Try disabling Instant Run (or updating either the IDE or the Gradle plugin to the latest version

2017-03-29 09:45:05 1470

原创 Android Studio 设置里面git没了怎么弄出来

设置里面的git 没了解决的办法: File->Setting->Plugins————找到Git Integration 和 GitHub 都打勾, 之后Apply(应用)再点!击OK,之后弹出对话框需要重启一次即可,

2017-02-17 10:45:44 5321

原创 一些设计模式

https://link.zhihu.com/?target=http%3A//www.cnblogs.com/qianxudetianxia/category/312863.html

2016-10-31 15:02:01 329

原创 servlet保存路径

public class UploadFileServlet extends HttpServlet { public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

2016-10-29 11:30:21 653

原创 屏幕适配

横屏.android 中 values-800x1280 和 values-1280x800是同样的意思,如果建两个编译直接报重复。可以用values-land-800x1280和原先的进行区分。land表示横屏。

2016-10-29 09:41:45 333

原创 FragMent和RadioButton 使用hide、show数据更新

Fragment和RadioButton进行页面切换,当fragment隐藏后又显示无法更新数据,需要在fragment类中重写onHiddenChanged方法。/** * 在fragment隐藏后再show时调用这个方法更新数据 * */ @Override public void onHiddenChanged(boolean hidden) {

2016-10-28 18:01:08 435

转载 上传本地项目到github

链接地址http://xfenglin.com/a/12007901260.html

2016-10-19 11:42:06 280

原创 Http状态码

HTTP状态码(HTTP Status Code)是用以表示网页服务器HTTP响应状态的3位数字代码。

2016-10-18 17:28:25 222

原创 HttpUrlConnection的setDoInput(),setDoOutput()

今天头脑有点蒙。做一个listview图文混排的例子,用AsyncTaskconn.setDoInput(true);conn.setDoOutput(true);然后运行后报错。 public Bitmap downLoadImage() { Bitmap bitmap = null; HttpURLConnection conn = null

2016-10-18 17:20:27 1672

原创 popuwindows

弹窗功能:private void showPopuWindows() { View contentView; contentView = LayoutInflater.from(this).inflate(R.layout.popuwindowsview, null); pop = new PopupWindow(contentView, ViewG

2016-10-11 11:09:56 568

原创 按返回键退出、发送广播、通知

按两次返回键退出程序public class MainActivity extends Activity { private Button but; private static boolean isExit = false; private static Handler handler = new Handler() { public void handle

2016-10-08 14:59:00 402

原创 SQLite

1、创建数据库MyOpenHelper 继承SQLiteOpenHelperpublic class MyOpenHelper extends SQLiteOpenHelper { public static final String sql = "create table User(" +"id integer primary key autoincrement,"

2016-09-19 17:25:02 254

原创 将数据保存到文件中

1、首先由openFileOutput()方法得到FileOutputStream对象; 由FileOutputStream创建OutputStreamWrite对象;由OutputStreamWrite创建BuffereWrite对象。大概的流程如下:public void saveFile(){ FileOutputStream fos = openFileOutput("文件名",M

2016-09-19 16:54:58 772

原创 BroadcastReceiver

1、注册广播有两种方式:静态注册和动态注册。 2、进行网络状态的监听,首先在activity中创建IntentFilter实例。intentFilter.addAction(“android.net.conn.CONNECTIVITY_CHANGE”);给实例添加一个action值,然后registerRecevice(BroadcastReceiver,intentFilter);public

2016-09-19 13:09:06 274

原创 回顾简单的知识-ProgressDialog、SharedPreferences

1、ProgressDialog对话框进度条,它和AlertDialog类似。 ProgressDialog paDialog = new ProgressDialog(context); paDialog.setTitle("正在登陆"); paDialog.setMessage("Loding......");

2016-09-19 12:01:23 252

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除