–>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>