Android 学习 (持续添加与更新)

N、GitHub 最受欢迎的开源项目

  http://www.csdn.net/article/2013-05-03/2815127-Android-open-source-projects

 

六、android docs 内部访问google服务器, 导致打开api很慢的问题

#!/bin/bash

dis(){
  for a in $*; do
    font=`echo $a | sed 's/\/[^\/]\{1,\}/\/../g' | sed 's/\.\.$/font.css/g'`
    js=`echo $a | sed 's/\/[^\/]\{1,\}/\/../g' | sed 's/\.\.$/jsapi.js/g'`
#    echo $a
#    echo $font
    pa="s#http://fonts.googleapis.com/css?family=Roboto:regular,medium,thin,italic,mediumitalic,bold#$font#g"
    sed -i $pa $a
    pa="s#http://www.google.com/jsapi#$js#g"
    sed -i $pa $a
  done
}
all=`find . -name "*.html"`
dis $all
2:font.css的内容
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 100;
  src: local('Roboto Thin'), local('Roboto-Thin'), url(./woff/vzIUHo9z-oJ4WgkpPOtg1_esZW2xOQ-xsNqO47m55DA.woff) format('woff');
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  src: local('Roboto Regular'), local('Roboto-Regular'), url(./woff/2UX7WLTfW3W8TclTUvlFyQ.woff) format('woff');
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 500;
  src: local('Roboto Medium'), local('Roboto-Medium'), url(./woff/RxZJdnzeo3R5zSexge8UUT8E0i7KZn-EPnyo3HZu7kw.woff) format('woff');
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  src: local('Roboto Bold'), local('Roboto-Bold'), url(./woff/d-6IYplOFocCacKzxwXSOD8E0i7KZn-EPnyo3HZu7kw.woff) format('woff');
}
@font-face {
  font-family: 'Roboto';
  font-style: italic;
  font-weight: 400;
  src: local('Roboto Italic'), local('Roboto-Italic'), url(./woff/1pO9eUAp8pSF8VnRTP3xnvesZW2xOQ-xsNqO47m55DA.woff) format('woff');
}
@font-face {
  font-family: 'Roboto';
  font-style: italic;
  font-weight: 500;
  src: local('Roboto Medium Italic'), local('Roboto-MediumItalic'), url(./woff/OLffGBTaF0XFOW1gnuHF0YbN6UDyHWBl620a-IRfuBk.woff) format('woff');
}

 

 

五、ADB 启动异常 ADB server didn't ACK,adb无法正常启动

  http://blog.csdn.net/fengye810130/article/details/12495249

  http://blog.csdn.net/feixue1232/article/details/8460919

 

 

四、smart image view

  https://github.com/loopj/android-smart-image-view   学习别人的设计、面向对象的思维、封装。

 

三、TextView 添加Onclick 无效

给TextView添加Onclick事件还需要配置android:clickable="true",否则点击无效
android:clickable="true"
android:onClick="installedSoftTab"

 

二、设置当TextView中的文字超过TextView的容量时,用省略号代替

只需要下边的设置:
textview.setSingleLine(); 
textview.setEllipsiz(TextUtils.TruncateAt.valueOf("END"));
 
在xml中设置如下:
android:singleLine="true"
android:ellipsize="end"

 

一、ImageView圆角图片

  http://www.open-open.com/lib/view/open1391690691535.html

posted on 2014-07-25 17:35  hzm_frank  阅读(243)  评论(0编辑  收藏  举报

导航