This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Podfile.local中添加这个依赖进去 | |
pod 'LookinServer', :configurations => ['Debug'], :git => 'https://github.com/QMUI/LookinServer', :tag => '1.0.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --------------------------------------- | |
echo "shell定义字典" | |
#必须先声明 | |
declare -A dic | |
dic=([key1]="value1" [key2]="value2" [key3]="value3") | |
#打印指定key的value | |
echo ${dic["key1"]} | |
#打印所有key值 | |
echo ${!dic[*]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static int getStatusBarHeight(Context context){ | |
Class<?> c = null; | |
Object obj = null; | |
Field field = null; | |
int x = 0, statusBarHeight = 0; | |
try { | |
c = Class.forName("com.android.internal.R$dimen"); | |
obj = c.newInstance(); | |
field = c.getField("status_bar_height"); | |
x = Integer.parseInt(field.get(obj).toString()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="200dp" | |
android:orientation="horizontal" | |
tools:context="com.lugeek.dividertest.MainActivity"> |