Skip to content

Commit cc8889a

Browse files
author
hongyangAndroid
committed
完成代码的重构
1 parent ff2d74b commit cc8889a

36 files changed

+1216
-674
lines changed

README.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -121,21 +121,14 @@ dependencies {
121121
* padding,paddingLeft,paddingTop,paddingRight,paddingBottom
122122
* textSize.
123123

124-
### 2、将状态栏区域作为内容区域
125-
126-
如果某个Activity需要将状态栏区域作为实际的内容区域时,那么可用高度会变大,你所要做的只有一件事:让这个Activity实现`UseStatusBar`接口(仅仅作为标识左右,不需要实现任何方法),当然你肯定要自己开启`windowTranslucentStatus`或者设置`FLAG_TRANSLUCENT_STATUS`
127-
128-
注意:仅仅是改变状态栏颜色,并不需要实现此接口,因为并没有实际上增加可用高度。
129-
130-
131-
### 3、TextView的高度问题
124+
### 2、TextView的高度问题
132125

133126
设计稿一般只会标识一个字体的大小,比如你设置textSize="20px",实际上TextView所占据的高度肯定大于20px,字的上下都会有一定的建议,所以一定要灵活去写字体的高度,比如对于text上下的margin可以选择尽可能小一点。或者选择别的约束条件去定位(比如上例,选择了marginBottom)
134127

128+
##TODO
135129

136-
137-
138-
130+
* 增加单个Activity横屏布局的支持(设计图必须是横屏的)
131+
* 完善demo(复杂的,简单的,ListView的各种)
139132

140133
## 其他信息
141134

autolayout/src/main/java/com/zhy/autolayout/AutoFrameLayout.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@
1717
package com.zhy.autolayout;
1818

1919
import android.content.Context;
20-
import android.content.res.TypedArray;
2120
import android.util.AttributeSet;
2221
import android.view.ViewGroup;
2322
import android.widget.FrameLayout;
2423

24+
import com.zhy.autolayout.utils.AutoLayoutHelper;
25+
2526
public class AutoFrameLayout extends FrameLayout
2627
{
2728
private final AutoLayoutHelper mHelper = new AutoLayoutHelper(this);
@@ -64,7 +65,7 @@ protected void onLayout(boolean changed, int left, int top, int right, int botto
6465
public static class LayoutParams extends FrameLayout.LayoutParams
6566
implements AutoLayoutHelper.AutoLayoutParams
6667
{
67-
private AutoLayoutHelper.AutoLayoutInfo mAutoLayoutInfo;
68+
private AutoLayoutInfo mAutoLayoutInfo;
6869

6970
public LayoutParams(Context c, AttributeSet attrs)
7071
{
@@ -105,7 +106,7 @@ public LayoutParams(LayoutParams source)
105106
}
106107

107108
@Override
108-
public AutoLayoutHelper.AutoLayoutInfo getPercentLayoutInfo()
109+
public AutoLayoutInfo getAutoLayoutInfo()
109110
{
110111
return mAutoLayoutInfo;
111112
}

autolayout/src/main/java/com/zhy/autolayout/AutoLayoutConifg.java

Lines changed: 0 additions & 154 deletions
This file was deleted.

0 commit comments

Comments
 (0)