A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

© 鲁枝权双元 中级黑马   /  2015-7-9 21:08  /  662 人查看  /  5 人回复  /   0 人收藏 转载请遵从CC协议 禁止商业使用本文

1》》Eclipse字体大小调整:

Window /  Preferences / General / Appearance / ColorsAnd Fonts ,在右边的对话框里选择Java - Java Editor Text Font,点击出现的编辑(Edit)按钮,可以设置显示在在主窗体中程序的字体大小,设置完之后点击右下角的应用(Apply),最后点击确定(OK)即可。



2》》Xml文件字体大小的调整:
window / preferences / General / appearance / colors and fonts / Basic /  "Text font " ,然后点击Edit,可以设置字体的大小。

3》》改代码中的名字:全部改。。。
1.ctrl+1,在选择Rename in workspace
2.在Outline视图下,点击所选的内容,点击右键,Refactor,Rename。。。。
3.直接快捷键 Alt+Shift+R

4.改字母的大小写形式。。。。。。。。。
Ctrl+shift+x   大写
Ctrl+shift+y   小写
5.快速导入getting和setting方法
Alt+shift+s进入选择项选择。。。。。。。。。。。。。
6.快速查找在同一类中的字母
ctrl+k
7.快速打开DOS命令的快捷键:
window+r+cmd+回车

8.显示桌面:window+D  打开我的电脑:window+E  快速锁屏:window+L


《《。。。。。。。。。。解决更换图像的代码。。。。。。。。。。。。。。。。。》》
Android示例HelloGallery中R.styleable unresolved的解决办法[Z] (2012-04-17 22:23:58)转载▼
标签: 杂谈        分类: Android
今天尝试编译Android SDK中APIDemos中的程序,调试到HelloGallery的时候,在下面这段代码中:
[java] view plaincopy
public ImageAdapter(Context c) {  
        mContext = c;  
        TypedArray a = obtainStyledAttributes(android.R.styleable.Theme);  
        mGalleryItemBackground = a.getResourceId(  
                android.R.styleable.Theme_galleryItemBackground, 0);  
        a.recycle();  
    }  

    编译出错,提示说android.R.styleable unresolved,在网上查了下,说R.styleable在SDK1.5中已经不再支持,所以会出现这个错误。解决方法如下:
1.在res/values目录下新建attrs.xml,在其中添加如下内容:
[xhtml] view plaincopy
<?xml version="1.0" encoding="utf-8"?>  
<resources>  
    <declare-styleable name="Gallery">  
        <attr name="android:galleryItemBackground">  
        </attr>  
    </declare-styleable>  
</resources>  
2.修改HelloGallery.java,将出错的那段代码:
[java] view plaincopy
public ImageAdapter(Context c) {  
        mContext = c;  
        TypedArray a = obtainStyledAttributes(android.R.styleable.Theme);  
        mGalleryItemBackground = a.getResourceId(  
                android.R.styleable.Theme_galleryItemBackground, 0);  
        a.recycle();  
    }  
修改为:
[java] view plaincopy
public ImageAdapter(Context c) {  
            mContext = c;  
            TypedArray a = obtainStyledAttributes(R.styleable.Gallery);  
            mGalleryItemBackground = a.getResourceId(  
                    R.styleable.Gallery_android_galleryItemBackground, 0);  
            a.recycle();  
        }  
3.重新运行就可以了
《《。。。。。。。。。。。。。。。。。。。。出现的问题。。。。。。。。。。。。。。。。。。》》
..........................
cd c:\windows\system32\ipconfig /all快速进入DOS命令下的system32。。。。。。。。。。。。。。
.................
修改类名可以左键后,然后同时按住alt+shift+r,弹出的里面进行修改。。。。。。。。。。。。。。。。。。






5 个回复

倒序浏览
挺不错收藏以后用
回复 使用道具 举报
点个赞,
回复 使用道具 举报
点赞.................................
回复 使用道具 举报
这个可以留下来,也许会用的到
回复 使用道具 举报
谢谢分享
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 加入黑马