`
WilliamLiu
  • 浏览: 26135 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论
文章列表
//滚动条滚动速度,数字越大速度越快 JScrollPane.getVerticalScrollBar().setUnitIncrement(20);  
<resultMap id="GroupUserMap" type="com.incito.interclass.entity.Group" > <id column="id" property="id"/> <result column="name" property="name"/> <result column="logo" property="logo"/ ...
当手机转屏时,Activity的onDestroy和onCreate方法会被调用,为了避免Activity在转屏时销毁:需要修改AndroidManifest.xml,在activity属性中加入:   android:configChanges=”orientation|keyboardHidden” android:configChanges,这个方法主要是负责列出清单,当清单上用户指定的设置改变时,Activity会自己处理这些变化。 orientation,屏幕界面旋转(可能是用户手动旋转的),【注意:如果你的开发API等级等于或高于13,你还需要设置screenSize,因 ...
1、下载JRE: http://www.java.com/en/download/manual.jsp   2、解压 sudo tar -zxvf jre-7u67-linux-x64.gz   3、修改环境变量 编辑/etc/environment文件,修改如下配置 export JAVA_HOME="/mnt/jre1.7.0_51" export CLASSPATH="$JAVA_HOME/lib" PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin: ...
GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY "root"; FLUSH PRIVILEGES;  某些Linux下,还需要修改/etc/mysql/my.cnf这个文件,将bind-address  = 127.0.0.1注释掉
FileOutputStream fos = new FileOutputStream(filePath); Writer writer = new BufferedWriter(new OutputStreamWriter(fos, "UTF-8")); fos.write(new byte[]{(byte)0xEF, (byte)0xBB, (byte)0xBF}); writer.append(fileContent); writer.close();  
1、在工程 pom文件中加入以下内容: <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.0</version> <configuration> <url>http://localhost:8080/manager/text</url&g ...
一、Web.xml配置 <servlet-mapping> <servlet-name>DispatcherServlet</servlet-name> <url-pattern>/index</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>DispatcherServlet</servlet-name> <url-pattern>/</url-pattern> ...
管理类对象只初始化一次,建议在Application里生成BMapManager对象并初使化,在程序退出时调用destory,在需要使用sdk功能的activity的onCreate里调用start, onDestroy调用stop,或者onResume/onPause分别调用start和stop。
     android 自动检测版本在这里就不用说了,今天想和大家一起分享的是如何将下载更新文件最小化到任务栏下载,替代掉丑陋的对话框提示下载,对话框提示下载的用户体验相当不好,我们把它修改成为后台下载这样可以改善用户的使用体验。     废话就不多说了,直接贴代码。首先要创建一个Service来执行下载更新文件的任务: public class UpdateService extends Service{ private NotificationManager nm; private Notification notif ...
package com.yarin.android.Examples_04_23; import android.app.Activity; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Intent; import android.os.Bundle; import android.view.View; import android. ...
Android布局大致可以分为5类: RelativeLayout,   LinearLayout, FrameLayout, TableLayout, AbsoluteLayout. 所以把自己的积累的点滴记录下来.首先从相对布局(RelativeLayout)开始.   RelativeLayout子控件的一些属性:      //相对于同级控件对齐方式 android:layout_alignBaseline将该控件的baseline与给定ID的baseline对齐; android:layout_alignTop 将该控件的顶部边缘与给定ID的顶部边缘对齐; a ...
Why ListView? ListView 如果仅仅出于功能上的需求ListView可能没有存在的必要,ListView能作的事情基本上ScrollView也能胜任。ListView存在的最根本的原因在于它的高效(如何实现的?).ListView通过对象的复用从而减少内存的消耗,也减少了对象的创建从而也减少的cpu的消耗(在Androidk中创建View对象经常伴随着解析xml)。ListView的本质是一张bitmap(当然所有的控件文字等在屏幕上看到的最终都会变成bitmap),ListView会按照需求,根据Adapter提供的信息把需要的Item画出来显示在屏幕上,当屏幕滚动的时候 ...
今天调试android的时候发现一个诡异的问题 C:\Users\xxxx>adb start-server adb server is out of date. killing... ADB server didn't ACK * failed to start daemon *  究其源就是adb server没启动 到stackoverflow上查了一下 经过分析整理如下: C:\Users\xxxx>adb nodaemon server cannot bind 'tcp:5037'  原来adb server 端口绑定失败 继续查看到底是哪个端口给 ...
      Java Servlet是与平台无关的服务器端组件,运行于Servlet容器中(如Tomcat),Servlet容器负责Servlet和客户端的通信以及调用Servlet的方法,Servlet和客户端的通信采用“请求/响应”的模式。Servlet可完成以下功能: 1、创建并返回基于客户请求的动态HTML页面。 2、创建可以嵌入到现有HTML页面中的HTML片段。 3、与其它服务器资源(如数据库或基于Java的应用程
Global site tag (gtag.js) - Google Analytics