File tree Expand file tree Collapse file tree 3 files changed +9
-11
lines changed
src/main/java/com/zhy/autolayout/widget
widgetsample/src/main/java/com/zhy/autolayout/test/widgets Expand file tree Collapse file tree 3 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ dependencies {
23
23
compile ' com.android.support:appcompat-v7:23.1.0'
24
24
compile project(' :autolayout' )
25
25
compile ' com.android.support:support-v4:23.1.0'
26
- compile ' com.android.support:design:23.1.0 '
26
+ compile ' com.android.support:design:23.0.1 '
27
27
compile ' com.android.support:gridlayout-v7:23.1.0'
28
28
compile ' com.android.support:cardview-v7:23.1.0'
29
29
}
Original file line number Diff line number Diff line change @@ -90,18 +90,22 @@ private void setUpTabTextSize(Tab tab)
90
90
ViewGroup tabContainer = (ViewGroup ) tabGroup .getChildAt (tab .getPosition ());
91
91
TextView textView = (TextView ) tabContainer .getChildAt (1 );
92
92
93
+
93
94
if (AutoUtils .autoed (textView ))
94
95
{
95
96
return ;
96
97
}
98
+ int autoTextSize = 0 ;
97
99
if (mTextSizeBaseWidth )
98
100
{
99
- mTextSize = AutoUtils .getPercentWidthSize (mTextSize );
101
+ autoTextSize = AutoUtils .getPercentWidthSize (mTextSize );
100
102
} else
101
103
{
102
- mTextSize = AutoUtils .getPercentHeightSize (mTextSize );
104
+ autoTextSize = AutoUtils .getPercentHeightSize (mTextSize );
103
105
}
104
- textView .setTextSize (TypedValue .COMPLEX_UNIT_PX , mTextSize );
106
+
107
+
108
+ textView .setTextSize (TypedValue .COMPLEX_UNIT_PX , autoTextSize );
105
109
}
106
110
107
111
Original file line number Diff line number Diff line change 5
5
import android .support .v4 .app .Fragment ;
6
6
import android .support .v4 .app .FragmentPagerAdapter ;
7
7
import android .support .v4 .view .ViewPager ;
8
- import android .support .v7 .app .AppCompatActivity ;
9
- import android .util .Log ;
10
8
import android .view .Menu ;
11
9
import android .view .MenuItem ;
12
- import android .view .View ;
13
- import android .view .ViewGroup ;
14
10
15
11
import com .zhy .autolayout .AutoLayoutActivity ;
16
12
import com .zhy .autolayout .test .widgets .fragments .SimpleFragment ;
17
13
18
- import java .util .List ;
19
-
20
14
public class MainActivity extends AutoLayoutActivity
21
15
{
22
16
private TabLayout mTabLayout ;
@@ -42,7 +36,7 @@ public Fragment getItem(int position)
42
36
@ Override
43
37
public int getCount ()
44
38
{
45
- return 3 ;
39
+ return 2 ;
46
40
}
47
41
48
42
@ Override
You can’t perform that action at this time.
0 commit comments