`
sdkongkong
  • 浏览: 39175 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论
文章列表
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest As the idea of the Android evolved, Android has received wide attention and deployed on a very wide range of devices. Android UI had to move and make developers' life easier: AbsoluteLayout got deprecated. It is very logical becau ...
I just want to add yet another method of attaching sources for the support library. It requires ADT in version 20 or later. Supposedly this method works for all JARs for which setting source/javadoc location is disabled by the container. Here's what you need to do:     The android-support-v4.jar li ...
package com.example.keda; import java.io.UnsupportedEncodingException; import android.app.Activity; import android.os.Bundle; import android.os.Environment; import android.text.TextUtils; import android.util.Log; import android.view.Menu; import android.view.View; import android.view.View.OnClickLi ...
package com.gome.ecmall.util; import android.app.Activity; import android.content.Context; import android.text.TextUtils; import com.gome.ecmall.app.AppConfig; import com.gome.ecmall.bean.GlobalConfig; import com.gome.eshopnew.R; import com.omniture.AppMeasurement; /** * 数据统计--工具类 获取一个统计实例 ,并初始化常 ...
服务器端: private byte[] compress(byte[] data) throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); // 压缩 GZIPOutputStream gos = new GZIPOutputStream(baos); gos.write(data, 0, data.length); gos.finish(); byte[] output = baos.toByteArray(); baos.flush(); baos.close( ...
the issue you're having is that you're overwriting the entries reference and it's not getting changed on the adapter. Here's how you can fix this @Override public void onResume() {     super.onResume();     entries.clear();     entries.addAll(contactStorage.getContactListNames());     adapter.notif ...
中文乱码在java中URLEncoder.encode方法要调用两次解决   因为在jsp中对中文进行了编码的时候用的是UTF-8的编码方式,而在servlet中调用request.getParameter();方法的时候使用服务器指定的编码格式自动解码一次,所以前台编码一次后台解码一次而解码和编码的方式不用所以造成了乱码的出现, 这就类似于以下代码:            String name=java.net.URLEncoder.encode("测试", "UTF-8"); System.out.println(name); System ...
String args[] = {uploadedStatus,"2013-01-01",date}; String sql = "select * from TPersonalTaskResult where isUploaded=? and Date(substr(timeStamp,1,10)) between Date(?) and Date(?)"; 其中substr是指从第几个字符串起截取几个 , 注意从0开始, 不是从1开始
package com.nancal.pdaclient.util; import java.io.File; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.net.wifi.WifiInfo; import android.net.wifi.WifiManager; import android.os.BatteryManager; import android.os.Environment; import ...
1 报错: java.security.KeyStoreException: java.security.NoSuchAlgorithmException: KeyStore jks implementation not found 原因:  需要SASL验证,取消掉此验证。代码: [java] view plaincopy       configuration.setReconnectionAllowed(true);                configuration.setSecurityMode(ConnectionConfiguration.SecurityMode.di ...
删除workspace目录下的metadata文件夹,然后重新倒入项目。
昨天准备把2个activity通过fragment继承到一个里面, 左边的fragment是一个listview,右边的是左边某个项目的详细信息。 遇到的问题是当点击昨天某一个listview的时候把背景设置成高亮或者改变背景颜色, google提供的fragment例子上是有个这个功能的。但是当我移植到自己的项目里时,该功能一直不起作用。上网查了一下,实现方法跟我的一样,就是使用setItemChecked. 于是我就重新阅读了google的示例代码,发现他使用的是ArrayAdapter,我用的是BaseAdapter,查了资料发现这2个类区别不大,就是多一个filter接口 , 于是把 ...
屏幕大小不同 1:使用wrap_content 和 match_parent ,少用硬编码 2:使用RelativeLayout, 少用Linerlayout 3:使用多个pane, 例如fragment 4: 使用samll-width标志,例如res/layout-sw600dp/main.xml 5: 使用layout的别名 6: 7:使用9-patch图片 屏幕密度不同 1 使用dp,sp , 不用px 2 为xhdpi , 2.0 hdpi , mdpi 1.0 , ldpi 0.75 制作不同像素的图片
public View getView(int position, View convertView, ViewGroup parent) { ViewHolder viewHolder; if (convertView == null) { viewHolder = new ViewHolder(); convertView = LayoutInflater.from(mContext).inflate( R.layout.regular_safecheck_notuploaded_item, null); viewHolder.tvContent = (T ...
ListView list = getListView(); int start = list.getFirstVisiblePosition(); for(int i=start, j=list.getLastVisiblePosition();i<=j;i++)     if(target==list.getItemAtPosition(i)){         View view = list.getChildAt(i-start);         list.getAdapter().getView(i, view, list);         break;     }
Global site tag (gtag.js) - Google Analytics