日常筆記(不定時更新)

–>photoview依賴
compile ‘com.github.chrisbanes.photoview:library:+’
compile ‘com.github.chrisbanes:PhotoView:2.1.3’
在整個項目的gradle添加 maven {url “https://jitpack.io“}

–>安裝apk
http://gdown.baidu.com/data/wisegame/f98d235e39e29031/baiduxinwen.apk
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
intent.setDataAndType(Uri.fromFile(file), “application/vnd.android.package-archive”);
startActivity(intent);

–>頻道管理
1. 在app的gradle裏面
compile ‘com.github.andyoom:draggrid:v1.0.1’

2.在項目的build.gradle中添加
    maven {url "https://jitpack.io"}

3.權限
    <!-- 在SDCard中創建與刪除文件權限 -->
    <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
    <!-- 往SDCard寫入數據權限 -->
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <!-- 震動權限 -->
    <uses-permission android:name="android.permission.VIBRATE"/>

4.在Manifest中配置<activity android:name="com.andy.library.ChannelActivity" />

–>城市列表
1. 在app的gradle裏面
compile ‘com.github.andyoom:citypicker:v1.0.4’
2.在項目的build.gradle中添加
maven {url “https://jitpack.io“}
CityListActivity.startCityActivityForResult(this);

–>textview設置最大行數 和省略號
android:maxLines=”3”
android:ellipsize=”end”
–>在AndroidManifest.xml中設置activity中的android:screenOrientation屬性值來實現。
豎屏:android:screenOrientation=”portrait”
橫屏:android:screenOrientation=”landscape”

<color name="background">#252a2e</color>
<color name="unablebtn">#dcdcdc</color>
<color name="dark_bg">#505050</color>
<color name="light">#ECECEC</color>
<color name="white">#FFFFFF</color>
<color name="black">#000000</color>
<color name="green">#05D992</color>
<color name="zise">#E5004F</color>
<color name="dark_bg1">#414141</color>
<color name="pink">#FF5877</color>
<color name="yellow">#FFFF00</color>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章