`
chenguandong
  • 浏览: 16195 次
社区版块
存档分类
最新评论
文章列表
LayoutInflater作用是将layout的xml布局文件实例化为View类对象。 获取LayoutInflater的方法有如下三种: ? LayoutInflater inflater=(LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); View layout = inflater.inflate(R.layout.main, null); LayoutInflater inflater = LayoutInflater.from(cont ...
0 PPI是英文Pixels per inch的缩写,意思就是每英寸所拥有的像素(Pixel)数目,人眼所能看到的极限300ppi。PPI值越高,表示显示屏显示越清晰和细腻。
/** * 从网络上获取图片资源 * @param url * @return */ public static Bitmap getHttpBitmap(String url){ URL myFileURL; Bitmap bitmap=null; try{ myFileURL = new URL(url); //获得连接 HttpURLConnection conn=(HttpURLConnection)myFileURL.openConnection(); // ...
button1.setFocusableInTouchMode(true); button1.requestFocus();
MainActivity.java //主入口类 package com.myviewgroup.chen; import android.app.Activity; import android.os.Bundle; import android.view.KeyEvent; import android.view.View; import android.widget.LinearLayout; public class MainActivity extends Activity {private MyViewGroup viewGroup;private PageCont ...
package com.forcetech.android.hotel; import java.net.URL; import android.app.Activity; import android.content.Intent; import android.media.AudioManager; import android.media.MediaPlayer; import android.media.MediaPlayer.OnPreparedListener; import android.net.Uri; import android.os.Bundle; im ...
我们选择的是jdk1.6.0_30版本。安装文件名为jdk-6u30-linux-i586.bin. 1、复制jdk到安装目录 (1)假设jdk安装文件在桌面,我们指定的安装目录是:/usr/local/java 。可是系统安装后在/usr/local下并没有java目录,这需要我们去创建一个java ...
Linux下Tomcat的安装 1.下载Tomcat 在下面的地址下载Tomcat的二进制版 http://mirrors.ccs.neu.edu/Apache/dist/jakarta/tomcat-4/binaries/ 即下载文件 tomcat-4.1.18.tar.gz 2. 安装 首先解压缩 gunzip tomcat-4.1.18.tar.gz tar -zxvf tomcat-4.1.18.tar 得到Tomcat的所有文件.然后把它拷贝到你要安装的位置,如 /opt/tomcat-4.1.18/ ...
10 个免费的 C/C++ 集成开发环境 113人收藏此新闻,我要收藏|新闻投递oschina发布于: 2012年05月23日 (50评) 集
By default Ubuntu Desktop OS comes with ssh clientpackage. It does not include ssh server package which is needed to access this machine. To install SSH on the newly installed Ubuntu 12.04 run following commands sudo apt-get update sudo apt-get install ssh sudo /etc/init.d/ssh restart ...
public static void getMyToast(Context context , int imageResource , String content , int time){Toast toast = new Toast(context);toast.setDuration(time);//设置时间toast.setGravity(Gravity.CENTER, 0,25 ); // 设置出现的位置//自定义布局LinearLayout linearLayout = new LinearLayout(context);linearLayout.setOrientation(Lin ...
WindowManager manager=getWindowManager(); int hight =manager.getDefaultDisplay().getHeight(); //屏幕的高度 int width=manager.getDefaultDisplay().getWidth(); //屏幕宽 Log.i("TAG","hight :"+hight+" width :"+width);
<?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping package="com.google.bean"><class name=" ...
<?xml version='1.0' encoding='utf-8'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory>&l ...
package com.google.dto; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hibernate.cfg.Configuration; public class HibernateSessionFactory { private static String CONFIG_FILE_LOCATION = "/hibernate.cfg.xml";private static final ThreadLocal<Session& ...
Global site tag (gtag.js) - Google Analytics