今天朋友要我帮忙注册个域名,我就打开我的godaddy账号给帮忙注册了。后来说要转到他名下,麻烦事情,还不如刚刚开始的时候他自己注册了,或者新建一个账号。。。
当然了,域名本来就是个私有的物品,这个所有权可以控制网站的访问,对于网站而言,至关重要,要体谅所有权这个问题。
在godaddy里转换域名所有权也不难,就是感觉多折腾了,参考如下说明:
1 Push Domain From One Account to Another on GoDaddy
2 Moving a Domain Name out of Your Account
3 domain transfer @ godaddy
当然了,域名本来就是个私有的物品,这个所有权可以控制网站的访问,对于网站而言,至关重要,要体谅所有权这个问题。
在godaddy里转换域名所有权也不难,就是感觉多折腾了,参考如下说明:
1 Push Domain From One Account to Another on GoDaddy
2 Moving a Domain Name out of Your Account
3 domain transfer @ godaddy
朋友手机有问题,遂导出通讯录备份,可不知道怎么样可以转换别的格式。
今天找了一些资料,发现此dbk文件仅仅只是个zip文件,我汗。。 害我还到处找软件。。
改为zip文件,然后解压出通讯录文件contacts.vcf即可,可以直接导入gmail通讯录,很棒~
另外,linux下的file命令是很强大的,不知道什么文件,那可以用它看看:
从资料介绍《Open DBK File》有知道:
今天找了一些资料,发现此dbk文件仅仅只是个zip文件,我汗。。 害我还到处找软件。。
改为zip文件,然后解压出通讯录文件contacts.vcf即可,可以直接导入gmail通讯录,很棒~
另外,linux下的file命令是很强大的,不知道什么文件,那可以用它看看:
[root@gx tmp]# file U100.dbk
U100.dbk: Zip archive data, at least v2.0 to extract
U100.dbk: Zip archive data, at least v2.0 to extract
从资料介绍《Open DBK File》有知道:
引用
How do I open and read a DBK file? The file is the back up of phonebook contacts I saved from a Sony Ericsson phone. I need to read the contact information; please help me. Susan Keenan
What Are DBK Files?
Files with the DBK extension are created using PC Suite by Sony Ericsson. They are used to back up phone settings and/or data. Typically, this type of file is considered a container file since it holds data. The data in a DBK file is in compressed format, so it needs a special program to open it.
Open DBK File: Use PC Suite
If you still have access to your phone, you can use the PC Suite program to restore these phone files so that you can access them on your phone.
Open DBK File: Unzip the File
The DBK files are saved in formats similar to ZIP files. Therefore, you should be able to open them by unzipping them. Several applications can be used to unzip files including WinZip, WinRAR, and ZigZag. If you don’t have one of these applications installed, search for them online and choose one to install so that you can use it to open the DBK files holding your phonebook contacts.
I advise you to make a backup of the DBK file before attempting to open it this way. Change the file extension from .dbk to .zip on the Sony phone file if it does not automatically open using one of these applications.
What Are DBK Files?
Files with the DBK extension are created using PC Suite by Sony Ericsson. They are used to back up phone settings and/or data. Typically, this type of file is considered a container file since it holds data. The data in a DBK file is in compressed format, so it needs a special program to open it.
Open DBK File: Use PC Suite
If you still have access to your phone, you can use the PC Suite program to restore these phone files so that you can access them on your phone.
Open DBK File: Unzip the File
The DBK files are saved in formats similar to ZIP files. Therefore, you should be able to open them by unzipping them. Several applications can be used to unzip files including WinZip, WinRAR, and ZigZag. If you don’t have one of these applications installed, search for them online and choose one to install so that you can use it to open the DBK files holding your phonebook contacts.
I advise you to make a backup of the DBK file before attempting to open it this way. Change the file extension from .dbk to .zip on the Sony phone file if it does not automatically open using one of these applications.
以前做1.5版本的程序,没有这个问题,2.2的版本用同样的代码一直写不了,纳闷。。
想起看程序权限时,都有写入文件的权限,所以估计是需要明确的权限。
引用一些别人的问题:
You're right that the SD Card directory is /sdcard but you shouldn't be hard coding it. Instead, make a call to Environment.getExternalStorageDirectory() to get the directory:
If you haven't done so already, you will need to give you app the correct permission to write to the SD Card by adding this to your Manifest:
from: http://stackoverflow.com/questions/2121833/permission-to-write-to-the-sd-card
想起看程序权限时,都有写入文件的权限,所以估计是需要明确的权限。
引用一些别人的问题:
You're right that the SD Card directory is /sdcard but you shouldn't be hard coding it. Instead, make a call to Environment.getExternalStorageDirectory() to get the directory:
File sdDir = Environment.getExternalStorageDirectory();
If you haven't done so already, you will need to give you app the correct permission to write to the SD Card by adding this to your Manifest:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
from: http://stackoverflow.com/questions/2121833/permission-to-write-to-the-sd-card
不加任何旋转屏幕的处理代码的时候,旋转屏幕将会导致系统把当前activity关闭,重新打开。
如果只是简单的界面调整,我们可以阻止此问题的发生,屏幕旋转而自己调整屏幕的元素重构。
首先我们需要修改AndroidManifest.xml文件:
这样是让程序能够响应旋转屏幕的事件。
然后重写onConfigurationChanged方法:
这个就可以自己决定是否重写处理布局了。
如果只是简单的界面调整,我们可以阻止此问题的发生,屏幕旋转而自己调整屏幕的元素重构。
首先我们需要修改AndroidManifest.xml文件:
<activity android:name=".Magazine">
</activity>
//修改为:
<activity android:name=".Magazine"
android:configChanges="orientation|keyboard">
</activity>
</activity>
//修改为:
<activity android:name=".Magazine"
android:configChanges="orientation|keyboard">
</activity>
这样是让程序能够响应旋转屏幕的事件。
然后重写onConfigurationChanged方法:
@Override
public void onConfigurationChanged(Configuration newConfig) {
// TODO Auto-generated method stub
super.onConfigurationChanged(newConfig);
Log.v(" == onConfigurationChanged");
processLayout();
}
public void onConfigurationChanged(Configuration newConfig) {
// TODO Auto-generated method stub
super.onConfigurationChanged(newConfig);
Log.v(" == onConfigurationChanged");
processLayout();
}
这个就可以自己决定是否重写处理布局了。
1. 什么是density
引用
1) density
density表示每英寸有多少个显示点(逻辑值),它的单位是dpi:dot per inch,通常屏幕大时,density就大,屏幕小时,density就小,通常
屏幕实际分辨率为240px*400px时,density=120
屏幕实际分辨率为320px*533px,density=160
屏幕实际分辨率为480px*800px,density=240
2) 分辨率
是整个屏是多少点,比如800x480,它是软件的显示单位
3) 从Android1.6版本开始支持density(对应API Level 4)
用于解决应用在屏幕大小不同的硬件上正常显示的问题
density表示每英寸有多少个显示点(逻辑值),它的单位是dpi:dot per inch,通常屏幕大时,density就大,屏幕小时,density就小,通常
屏幕实际分辨率为240px*400px时,density=120
屏幕实际分辨率为320px*533px,density=160
屏幕实际分辨率为480px*800px,density=240
2) 分辨率
是整个屏是多少点,比如800x480,它是软件的显示单位
3) 从Android1.6版本开始支持density(对应API Level 4)
用于解决应用在屏幕大小不同的硬件上正常显示的问题
普通方法弹出alert后,取消标题还会有小部分高度,这个倒会好些:
先定义一个样式 res/values/styles.xml
弹出alert时稍微修改一下:
你可以弹出一个窗体,也和alert类似的效果。
首先修改一下窗体的属性:
修改AndroidManifest.xml 文件:
这是声明样式,下面是打开activity后,oncreate时加点参数:
这样会出现背景模糊的效果。
先定义一个样式 res/values/styles.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="FullHeightDialog"
parent="android:style/Theme.Dialog">
<item name="android:windowNoTitle">true</item>
</style>
</resources>
<resources>
<style name="FullHeightDialog"
parent="android:style/Theme.Dialog">
<item name="android:windowNoTitle">true</item>
</style>
</resources>
弹出alert时稍微修改一下:
Dialog dialog = new Dialog(this, R.style.FullHeightDialog);
dialog.setContentView(R.layout.article_comment);
dialog.show();
dialog.setContentView(R.layout.article_comment);
dialog.show();
你可以弹出一个窗体,也和alert类似的效果。
首先修改一下窗体的属性:
修改AndroidManifest.xml 文件:
<activity android:name=".Test"
android:theme="@android:style/Theme.Dialog">
</activity>
android:theme="@android:style/Theme.Dialog">
</activity>
这是声明样式,下面是打开activity后,oncreate时加点参数:
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND,
WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
this.setContentView(R.layout.article_comment);
}
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND,
WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
this.setContentView(R.layout.article_comment);
}
这样会出现背景模糊的效果。
程序如何把自身进行一次截图?或者对某个view对象截图?

由左至右,分别是 bt4 iv iv2 iv3
iv是屏幕截图,上半部分是黑色,下面是bt4的图
iv2填充的是未显示过的一个按钮,截取不到,呈黑色
iv3是复制bt4,跟bt4一样
上述代码包含了bitmap转换为drawable的方式
推荐阅读:
1 How-to convert a View to a Bitmap Image in our Android Application
2 Android之代码实现的截图方式
3 Android Bitmap和Canvas
4 android 保存图片 合成图片
5 Android图片总结 图片缩放和添加文字
6 Drawable、Bitmap、byte[]之间的转换
ImageView iv = (ImageView) findViewById(R.id.ImageView01);
ImageView iv2 = (ImageView) findViewById(R.id.ImageView02);
ImageView iv3 = (ImageView) findViewById(R.id.ImageView03);
//draw的方式对整屏截取,但信息栏为黑色
View cv = getWindow().getDecorView();
Bitmap b = Bitmap.createBitmap(200, 200, Bitmap.Config.RGB_565);
cv.draw(new Canvas(b));
iv.setImageBitmap(b);
//对隐藏的未画过的对象,截出的是黑色
Bitmap image = Bitmap.createBitmap(200, 200, Bitmap.Config.RGB_565);
bt3.draw(new Canvas(image));
iv2.setImageBitmap(image);
//get drawable cache , bitmap to drawable
bt4.setDrawingCacheEnabled(true);
Bitmap bitmap = bt4.getDrawingCache();
Drawable drawable = (Drawable) new BitmapDrawable(bitmap);
iv3.setBackgroundDrawable(drawable);
ImageView iv2 = (ImageView) findViewById(R.id.ImageView02);
ImageView iv3 = (ImageView) findViewById(R.id.ImageView03);
//draw的方式对整屏截取,但信息栏为黑色
View cv = getWindow().getDecorView();
Bitmap b = Bitmap.createBitmap(200, 200, Bitmap.Config.RGB_565);
cv.draw(new Canvas(b));
iv.setImageBitmap(b);
//对隐藏的未画过的对象,截出的是黑色
Bitmap image = Bitmap.createBitmap(200, 200, Bitmap.Config.RGB_565);
bt3.draw(new Canvas(image));
iv2.setImageBitmap(image);
//get drawable cache , bitmap to drawable
bt4.setDrawingCacheEnabled(true);
Bitmap bitmap = bt4.getDrawingCache();
Drawable drawable = (Drawable) new BitmapDrawable(bitmap);
iv3.setBackgroundDrawable(drawable);

由左至右,分别是 bt4 iv iv2 iv3
iv是屏幕截图,上半部分是黑色,下面是bt4的图
iv2填充的是未显示过的一个按钮,截取不到,呈黑色
iv3是复制bt4,跟bt4一样
上述代码包含了bitmap转换为drawable的方式
推荐阅读:
1 How-to convert a View to a Bitmap Image in our Android Application
2 Android之代码实现的截图方式
3 Android Bitmap和Canvas
4 android 保存图片 合成图片
5 Android图片总结 图片缩放和添加文字
6 Drawable、Bitmap、byte[]之间的转换






