├── .gitignore
├── .idea
├── compiler.xml
├── copyright
│ └── profiles_settings.xml
├── encodings.xml
├── gradle.xml
├── inspectionProfiles
│ ├── Project_Default.xml
│ └── profiles_settings.xml
├── misc.xml
├── modules.xml
├── runConfigurations.xml
└── vcs.xml
├── README.md
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── lazy
│ │ └── autoandroidlayout
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── lazy
│ │ │ └── autoandroidlayout
│ │ │ ├── KbActivity.java
│ │ │ ├── LoginActivity.java
│ │ │ ├── MainActivity.java
│ │ │ └── myApplication.java
│ └── res
│ │ ├── drawable-xhdpi
│ │ ├── bg_changer.png
│ │ ├── bg_changer_question.png
│ │ ├── bg_kb.png
│ │ ├── bg_left.png
│ │ ├── bg_right.png
│ │ ├── bg_submit.png
│ │ ├── button.png
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_round.png
│ │ ├── login_background.png
│ │ ├── login_bg.png
│ │ ├── qq_click_default.png
│ │ ├── weibo_click_default.png
│ │ └── wx_click_default.png
│ │ ├── layout
│ │ ├── activity_kb.xml
│ │ ├── activity_longin.xml
│ │ └── activity_main.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ └── values
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── lazy
│ └── autoandroidlayout
│ └── ExampleUnitTest.java
├── autolayoutlibrary
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── lazy
│ │ └── autolayoutlibrary
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── lazy
│ │ │ └── autolayoutlibrary
│ │ │ └── LayoutUtil.java
│ └── res
│ │ └── values
│ │ └── strings.xml
│ └── test
│ └── java
│ └── com
│ └── lazy
│ └── autolayoutlibrary
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── image
├── hua_wei_a.jpg
├── hua_wei_b.jpg
├── mei_zu_a.jpg
├── mei_zu_b.jpg
├── san_xing_a.jpg
├── san_xing_b.jpg
├── xiao_mi_a.jpg
└── xiao_mi_b.jpg
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 | .externalNativeBuild
10 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
18 |
19 |
--------------------------------------------------------------------------------
/.idea/inspectionProfiles/Project_Default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/inspectionProfiles/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | C:\Users\Administrator\AppData\Roaming\Subversion
48 |
49 |
50 |
51 |
52 |
53 | 1.8
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # AutoAndroidLayout
2 | - 只需要填写UI给的切图就可以
3 |
4 |
5 | - 使用方法,先在`application` 初始化
6 |
7 |
8 | - 依赖方式
9 |
10 | ```java
11 | compile project(path: ':autolayoutlibrary')
12 |
13 | ```
14 |
15 |
16 | ```java
17 | LayoutUtil.initConfig(手机屏幕宽, 手机屏幕高, 切图高, 切图宽);
18 |
19 | ```
20 |
21 | - 第二步,在您的Activity中
22 |
23 | ```java
24 |
25 | LayoutUtil mlayoutUtil = LayoutUtil.getInstance();
26 | mlayoutUtil.xxxxxxx
27 |
28 | ```
29 |
30 |
31 | - [详情使用方法请看例子](https://github.com/l123456789jy/AutoAndroidLayout/blob/master/app/src/main/java/com/lazy/autoandroidlayout/MainActivity.java)
32 |
33 |
34 |
35 |
36 | - 华为手机效果:
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | 
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | - 魅族手机效果:
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | 
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 | - 三星手机效果:
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |  
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 | - 小米手机效果:
109 |
110 |
111 |
112 |
113 |
114 |
115 | 
116 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion "25.0.2"
6 | defaultConfig {
7 | applicationId "com.lazy.autoandroidlayout"
8 | minSdkVersion 16
9 | targetSdkVersion 25
10 | versionCode 1
11 | versionName "1.0"
12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 |
21 | allprojects {
22 | repositories {
23 | maven { url "https://jitpack.io" }
24 | }
25 | }
26 | }
27 |
28 | dependencies {
29 | compile fileTree(dir: 'libs', include: ['*.jar'])
30 | compile project(path: ':autolayoutlibrary')
31 | compile 'com.android.support:appcompat-v7:25.3.1'
32 | compile 'com.jakewharton:butterknife:5.1.1'
33 | compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha8'
34 | }
35 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in E:\androidsdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/lazy/autoandroidlayout/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.lazy.autoandroidlayout;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 |
20 | @Test
21 | public void useAppContext() throws Exception {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getTargetContext();
24 |
25 | assertEquals("com.lazy.autoandroidlayout", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/java/com/lazy/autoandroidlayout/KbActivity.java:
--------------------------------------------------------------------------------
1 | package com.lazy.autoandroidlayout;
2 |
3 | import android.os.Bundle;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.widget.ImageView;
6 | import android.widget.LinearLayout;
7 | import android.widget.RelativeLayout;
8 | import android.widget.TextView;
9 | import butterknife.ButterKnife;
10 | import butterknife.InjectView;
11 | import com.lazy.autolayoutlibrary.LayoutUtil;
12 |
13 |
14 | /**
15 | * 类描述:kb测试界面
16 | * 创建人:Lazy
17 | * 修改时间:2017/4/1
18 | * 修改备注:
19 | * 联系方式:906514731@qq.com
20 | */
21 | public class KbActivity extends AppCompatActivity {
22 |
23 | @InjectView(R.id.iv_changer_question)
24 | ImageView mIvChangerQuestion;//疑问
25 | @InjectView(R.id.tv_total_change)
26 | TextView mTvTotalChange;//用户目前的零钱
27 | @InjectView(R.id.rl_changer)
28 | RelativeLayout mRlChanger;//零钱的整体
29 | @InjectView(R.id.rl_earn_change)
30 | RelativeLayout mRlEarnChange;//零钱赚取的整体
31 | @InjectView(R.id.rl_earn_change_detail)
32 | RelativeLayout mRlEarnChangeDetail;
33 | //零钱赚取的整体
34 | @InjectView(R.id.tv_change)
35 | TextView tv_change;//零钱
36 | //K币
37 | @InjectView(R.id.tv_kb)
38 | TextView mTvKb;
39 | @InjectView(R.id.tv_total_kb)
40 | TextView mTvTotalKb;
41 | @InjectView(R.id.rl_kb)
42 | RelativeLayout mRlKb;
43 | @InjectView(R.id.rl_earn_kb)
44 | RelativeLayout mRlEarnKb;
45 | @InjectView(R.id.rl_earn_kb_jilu)
46 | RelativeLayout mRlEarnKbDetail;
47 | //布局lin
48 | @InjectView(R.id.rl_lin_kb_change)
49 | LinearLayout mLinKb;
50 | @InjectView(R.id.rl_lin_earn_change)
51 | LinearLayout mLinm;
52 | @Override
53 | protected void onCreate(Bundle savedInstanceState) {
54 | super.onCreate(savedInstanceState);
55 | setContentView(R.layout.activity_kb);
56 | ButterKnife.inject(this);
57 | initLocation();
58 | }
59 |
60 | private void initLocation() {
61 | LayoutUtil mlayoutUtil = LayoutUtil.getInstance();
62 |
63 | mlayoutUtil.drawViewlLayout(mRlChanger, 993f, 284f, 0f, 0f, 60f);
64 |
65 | mlayoutUtil.drawViewlLayout(tv_change, 0f, 0f, 29f, 0f, 29f);
66 |
67 | mlayoutUtil.drawViewRBLayout(mIvChangerQuestion, 59f, 60f, 0f, 20f, 14.9952f, 0f);
68 |
69 | mlayoutUtil.drawViewlLayout(mRlKb, 993f, 284f, 0f, 0f, 44f);
70 |
71 | mlayoutUtil.drawViewlLayout(mLinm, 995f, 153f, 0f, 0f, 0f);
72 |
73 | mlayoutUtil.drawViewlLayout(mLinKb, 995f, 153f, 0f, 0f, 0f);
74 |
75 | mlayoutUtil.drawViewlLayout(mTvKb, 0f, 0f, 29f, 0f, 30f);
76 |
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/app/src/main/java/com/lazy/autoandroidlayout/LoginActivity.java:
--------------------------------------------------------------------------------
1 | package com.lazy.autoandroidlayout;
2 |
3 | import android.os.Bundle;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.widget.Button;
6 | import android.widget.EditText;
7 | import android.widget.LinearLayout;
8 | import butterknife.ButterKnife;
9 | import butterknife.InjectView;
10 | import com.lazy.autolayoutlibrary.LayoutUtil;
11 |
12 | /**
13 | * 类描述:登陆界面
14 | * 创建人:Lazy
15 | * 修改时间:2017/4/1
16 | * 修改备注:
17 | * 联系方式:906514731@qq.com
18 | */
19 | public class LoginActivity extends AppCompatActivity {
20 |
21 | @InjectView(R.id.et_passport)
22 | EditText etPassport;
23 | @InjectView(R.id.et_password)
24 | EditText etPassword;
25 | @InjectView(R.id.btn_login)
26 | Button btnLogin;
27 | @InjectView(R.id.btn_rememberpwd)
28 | Button btnRememberpwd;
29 | @InjectView(R.id.ll_longin_bg)
30 | LinearLayout llLonginBg;
31 | @InjectView(R.id.ll_account)
32 | LinearLayout llAccount;
33 | @InjectView(R.id.ll_pas)
34 | LinearLayout llPas;
35 | @InjectView(R.id.ll_wei_bo)
36 | LinearLayout llWeiBo;
37 | @InjectView(R.id.btn_qq_login)
38 | Button btnQqLogin;
39 | @InjectView(R.id.ll_qq)
40 | LinearLayout llQq;
41 | @InjectView(R.id.ll_xin_lang)
42 | LinearLayout llXinLang;
43 | @InjectView(R.id.ll_bottom)
44 | LinearLayout llBottom;
45 | @InjectView(R.id.btn_web_chat_login)
46 | Button btnWebChatLogin;
47 | @InjectView(R.id.btn_wei_bo_login)
48 | Button btnWeiBoLogin;
49 |
50 | @Override
51 | protected void onCreate(Bundle savedInstanceState) {
52 | super.onCreate(savedInstanceState);
53 | setContentView(R.layout.activity_longin);
54 | ButterKnife.inject(this);
55 | initLocation();
56 | }
57 |
58 | private void initLocation() {
59 | LayoutUtil mlayoutUtil = LayoutUtil.getInstance();
60 | mlayoutUtil.drawViewLinearLayout(llLonginBg, 1000f, 396f, 0f, 60f);
61 | mlayoutUtil.drawViewLinearLayout(llAccount, 1000f, 190f, 40f, 0f);
62 | mlayoutUtil.drawViewLinearLayout(llPas, 1000f, 190f, 40f, 0f);
63 | mlayoutUtil.drawViewLinearLayout(btnLogin, 849f, 144f, 0f, 40f);
64 |
65 | mlayoutUtil.drawViewLinearLayout(llBottom, 0f, 0f, 0f, 50f);
66 | mlayoutUtil.drawViewLinearLayout(llWeiBo, 0f, 0f, 210f, 0f);
67 | mlayoutUtil.drawViewLinearLayout(llQq, 0f, 0f, 100f, 0f);
68 | mlayoutUtil.drawViewLinearLayout(llXinLang, 0f, 0f, 100f, 0f);
69 |
70 |
71 | mlayoutUtil.drawViewLinearLayout(btnQqLogin, 144f, 144f, 0f, 0f);
72 | mlayoutUtil.drawViewLinearLayout(btnWebChatLogin, 144f, 144f, 0f, 0f);
73 | mlayoutUtil.drawViewLinearLayout(btnWeiBoLogin, 144f, 144f, 0f, 0f);
74 |
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/app/src/main/java/com/lazy/autoandroidlayout/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.lazy.autoandroidlayout;
2 |
3 | import android.content.Intent;
4 | import android.os.Bundle;
5 | import android.support.v7.app.AppCompatActivity;
6 | import android.widget.Button;
7 | import android.widget.RelativeLayout;
8 | import butterknife.ButterKnife;
9 | import butterknife.InjectView;
10 | import butterknife.OnClick;
11 | import com.lazy.autolayoutlibrary.LayoutUtil;
12 |
13 |
14 | /**
15 | * 类描述:测试界面
16 | * 创建人:Lazy
17 | * 修改时间:2017/4/1
18 | * 修改备注:
19 | * 联系方式:906514731@qq.com
20 | */
21 | public class MainActivity extends AppCompatActivity {
22 |
23 |
24 | @InjectView(R.id.bt1)
25 | Button bt1;
26 | @InjectView(R.id.bt2)
27 | Button bt2;
28 | @InjectView(R.id.rl_changer)
29 | RelativeLayout rlChanger;
30 |
31 | @Override
32 | protected void onCreate(Bundle savedInstanceState) {
33 | super.onCreate(savedInstanceState);
34 | setContentView(R.layout.activity_main);
35 | ButterKnife.inject(this);
36 | initLocation();
37 | }
38 |
39 | private void initLocation() {
40 | LayoutUtil mlayoutUtil = LayoutUtil.getInstance();
41 | mlayoutUtil.drawViewlLayout(bt1, 331f, 91f, 0f, 0f, 0f);
42 | mlayoutUtil.drawViewlLayout(bt2, 331f, 91f, 0f, 0f, 50f);
43 | }
44 |
45 | @OnClick(R.id.bt1)
46 | public void openKbActivity() {
47 | startActivity(new Intent(this, KbActivity.class));
48 | }
49 |
50 | @OnClick(R.id.bt2)
51 | public void openLonginActivity() {
52 | startActivity(new Intent(this, LoginActivity.class));
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/app/src/main/java/com/lazy/autoandroidlayout/myApplication.java:
--------------------------------------------------------------------------------
1 | package com.lazy.autoandroidlayout;
2 |
3 | import android.app.Application;
4 | import android.content.Context;
5 | import android.view.WindowManager;
6 | import com.lazy.autolayoutlibrary.LayoutUtil;
7 |
8 |
9 | /**
10 | * 项目名称:AndroidAutoLayout
11 | * 类描述:
12 | * 创建人:Administrator
13 | * 创建时间:2017/3/31 19:02
14 | * 修改人:Administrator
15 | * 修改时间:2017/3/31 19:02
16 | * 修改备注:
17 | * 联系方式:906514731@qq.com
18 | */
19 | public class myApplication extends Application {
20 |
21 | /**
22 | * 屏幕的宽
23 | */
24 | public static int screenWidth;
25 | /**
26 | * 屏幕的高
27 | */
28 | public static int screenHeight;
29 |
30 | @Override
31 | public void onCreate() {
32 | super.onCreate();
33 | // 获取屏幕尺寸大小,使程序能在不同大小的手机上有更好的兼容性
34 | WindowManager wm = (WindowManager) getSystemService(Context.WINDOW_SERVICE);
35 | screenWidth = wm.getDefaultDisplay().getWidth();
36 | screenHeight = wm.getDefaultDisplay().getHeight();
37 | LayoutUtil.initConfig(screenWidth, screenHeight, 1080f, 1920f);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/bg_changer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/app/src/main/res/drawable-xhdpi/bg_changer.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/bg_changer_question.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/app/src/main/res/drawable-xhdpi/bg_changer_question.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/bg_kb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/app/src/main/res/drawable-xhdpi/bg_kb.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/bg_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/app/src/main/res/drawable-xhdpi/bg_left.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/bg_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/app/src/main/res/drawable-xhdpi/bg_right.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/bg_submit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/app/src/main/res/drawable-xhdpi/bg_submit.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/app/src/main/res/drawable-xhdpi/button.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/app/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/app/src/main/res/drawable-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/login_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/app/src/main/res/drawable-xhdpi/login_background.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/login_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/app/src/main/res/drawable-xhdpi/login_bg.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/qq_click_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/app/src/main/res/drawable-xhdpi/qq_click_default.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/weibo_click_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/app/src/main/res/drawable-xhdpi/weibo_click_default.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/wx_click_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/app/src/main/res/drawable-xhdpi/wx_click_default.png
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_kb.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
14 |
18 |
19 |
26 |
27 |
33 |
34 |
41 |
42 |
43 |
49 |
50 |
54 |
55 |
62 |
63 |
70 |
71 |
72 |
80 |
81 |
87 |
88 |
96 |
97 |
98 |
104 |
105 |
113 |
114 |
115 |
116 |
117 |
125 |
126 |
132 |
133 |
141 |
142 |
143 |
144 |
150 |
151 |
159 |
160 |
161 |
162 |
163 |
164 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_longin.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
16 |
17 |
21 |
22 |
31 |
32 |
33 |
34 |
38 |
39 |
48 |
49 |
50 |
51 |
52 |
59 |
60 |
67 |
68 |
73 |
74 |
80 |
81 |
85 |
86 |
92 |
93 |
94 |
95 |
101 |
102 |
107 |
108 |
113 |
114 |
118 |
119 |
120 |
126 |
127 |
132 |
133 |
138 |
139 |
140 |
146 |
147 |
152 |
153 |
158 |
159 |
160 |
161 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
14 |
22 |
23 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | AutoAndroidLayout
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/test/java/com/lazy/autoandroidlayout/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.lazy.autoandroidlayout;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 |
14 | @Test
15 | public void addition_isCorrect() throws Exception {
16 | assertEquals(4, 2 + 2);
17 | }
18 | }
--------------------------------------------------------------------------------
/autolayoutlibrary/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/autolayoutlibrary/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion "25.0.2"
6 |
7 | defaultConfig {
8 | minSdkVersion 16
9 | targetSdkVersion 25
10 | versionCode 1
11 | versionName "1.0"
12 |
13 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
14 |
15 | }
16 | buildTypes {
17 | release {
18 | minifyEnabled false
19 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
20 | }
21 | }
22 | }
23 |
24 | dependencies {
25 | compile fileTree(dir: 'libs', include: ['*.jar'])
26 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
27 | exclude group: 'com.android.support', module: 'support-annotations'
28 | })
29 | compile 'com.android.support:appcompat-v7:25.3.1'
30 | testCompile 'junit:junit:4.12'
31 | }
32 |
--------------------------------------------------------------------------------
/autolayoutlibrary/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in E:\androidsdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/autolayoutlibrary/src/androidTest/java/com/lazy/autolayoutlibrary/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.lazy.autolayoutlibrary;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 |
20 | @Test
21 | public void useAppContext() throws Exception {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getTargetContext();
24 |
25 | assertEquals("com.lazy.autolayoutlibrary.test", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/autolayoutlibrary/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/autolayoutlibrary/src/main/java/com/lazy/autolayoutlibrary/LayoutUtil.java:
--------------------------------------------------------------------------------
1 | package com.lazy.autolayoutlibrary;
2 |
3 | import android.view.View;
4 | import android.widget.FrameLayout;
5 | import android.widget.LinearLayout;
6 | import android.widget.RelativeLayout.LayoutParams;
7 |
8 | /**
9 | * 类描述:布局工具类
10 | * 创建人:Lazy
11 | * 修改时间:2017/3/31
12 | * 修改备注:
13 | * 联系方式:906514731@qq.com
14 | */
15 | public class LayoutUtil {
16 |
17 | //切图宽高比例值
18 | private float ratio;
19 | //手机屏幕高比
20 | private float mRatio;
21 | //屏幕的高
22 | private static float ScreenWidth = 0;
23 | //屏幕的宽
24 | private static float ScreenHeight = 0;
25 | //切图的宽
26 | private static float designWidth = 0;
27 | //切图的高
28 | private static float designHeight = 0;
29 | static LayoutUtil instance;
30 |
31 | public LayoutUtil() {
32 | ratio = designWidth / designHeight;
33 | mRatio = ScreenWidth / ScreenHeight;
34 | }
35 |
36 |
37 | /**
38 | * 单利获取LayoutUtil
39 | * @return
40 | */
41 | public static LayoutUtil getInstance() {
42 |
43 | if (instance == null) {
44 | synchronized (LayoutUtil.class) {
45 | if (instance == null) {
46 | instance = new LayoutUtil();
47 | }
48 | }
49 | }
50 |
51 | return instance;
52 | }
53 |
54 |
55 | /**
56 | * @param deviceWidth 手机屏幕宽
57 | * @param deviceHeight 手机屏幕高
58 | * @param cutWidth 切图宽
59 | * @param cutHeight 切图高
60 | */
61 | public static void initConfig(float deviceWidth, float deviceHeight, float cutWidth,
62 | float cutHeight) {
63 | ScreenWidth = deviceWidth;
64 | ScreenHeight = deviceHeight;
65 | designWidth = cutWidth;
66 | designHeight = cutHeight;
67 | }
68 |
69 |
70 | /**
71 | * 注意此方法适用于当前控件的父布局是LinearLayout
72 | *
73 | * @param view 当前绘制的View
74 | * @param width 切图的宽
75 | * @param height 切图的高
76 | * @param marginLeft 切图标注距离左边的值
77 | * @param marginTop 切图标注距离顶部的值
78 | * @param marginRight 切图标注距离顶右边距离
79 | * @param marginBottom 切图标注距离底部的距离
80 | */
81 | public void drawViewLinearRBLayout(View view, float width, float height, float marginLeft,
82 | float marginRight,
83 | float marginTop, float marginBottom) {
84 | float ScreenHeight = ScreenWidth / ratio;
85 |
86 | LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) view.getLayoutParams();
87 |
88 | if (width == 0.0f) {
89 |
90 | } else {
91 | params.width = (int) (ScreenWidth * (width / designWidth));
92 | }
93 | if (height == 0.0f) {
94 |
95 | } else {
96 | params.height = (int) (ScreenHeight * (height / designHeight));
97 | }
98 |
99 | if (marginLeft == 0.0f) {
100 |
101 | } else {
102 | params.leftMargin = (int) (ScreenWidth * (marginLeft / designWidth));
103 | }
104 |
105 | if (marginTop == 0.0f) {
106 |
107 | } else {
108 | params.topMargin = (int) (ScreenHeight * (marginTop / designHeight));
109 | }
110 | if (marginRight == 0.0f) {
111 |
112 | } else {
113 | params.rightMargin = (int) (ScreenWidth * (marginRight / designWidth));
114 | }
115 | if (marginBottom == 0.0f) {
116 |
117 | } else {
118 | params.bottomMargin = (int) (ScreenHeight * (marginBottom / designWidth));
119 | }
120 |
121 | view.setLayoutParams(params);
122 | }
123 |
124 |
125 | /**
126 | * 注意此方法适用于当前控件的父布局是LinearLayout
127 | *
128 | * @param view 当前绘制的View
129 | * @param width 切图的宽
130 | * @param height 切图的高
131 | * @param marginLeft 切图标注距离左边的值
132 | * @param marginTop 切图标注距离顶部的值
133 | */
134 | public void drawViewLinearLayout(View view, float width, float height, float marginLeft,
135 | float marginTop) {
136 |
137 | float ScreenHeight = ScreenWidth / ratio;
138 |
139 | LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) view.getLayoutParams();
140 |
141 | if (width == 0.0f) {
142 |
143 | } else {
144 | params.width = (int) (ScreenWidth * (width / designWidth));
145 | }
146 | if (height == 0.0f) {
147 |
148 | } else {
149 | params.height = (int) (ScreenHeight * (height / designHeight));
150 | }
151 |
152 | if (marginLeft == 0.0f) {
153 |
154 | } else {
155 | params.leftMargin = (int) (ScreenWidth * (marginLeft / designWidth));
156 | }
157 |
158 | if (marginTop == 0.0f) {
159 |
160 | } else {
161 | params.topMargin = (int) (ScreenHeight * (marginTop / designHeight));
162 | }
163 |
164 | view.setLayoutParams(params);
165 | }
166 |
167 | /**
168 | * 注意此方法适用于当前控件的父布局是FrameLayout
169 | *
170 | * @param view 当前绘制的View
171 | * @param width 切图的宽
172 | * @param height 切图的高
173 | * @param marginLeft 切图标注距离左边的值
174 | * @param marginTop 切图标注距离顶部的值
175 | */
176 | public void drawViewFramLayout(View view, float width, float height, float marginLeft,
177 | float marginTop) {
178 | float ScreenHeight = ScreenWidth / ratio;
179 |
180 | FrameLayout.LayoutParams params = (FrameLayout.LayoutParams) view.getLayoutParams();
181 |
182 | if (width == 0.0f) {
183 |
184 | } else {
185 | params.width = (int) (ScreenWidth * (width / designWidth));
186 | }
187 | if (height == 0.0f) {
188 |
189 | } else {
190 | params.height = (int) (ScreenHeight * (height / designHeight));
191 | }
192 |
193 | if (marginLeft == 0.0f) {
194 |
195 | } else {
196 | params.leftMargin = (int) (ScreenWidth * (marginLeft / designWidth));
197 | }
198 |
199 | if (marginTop == 0.0f) {
200 |
201 | } else {
202 | params.topMargin = (int) (ScreenHeight * (marginTop / designHeight));
203 | }
204 |
205 | view.setLayoutParams(params);
206 | }
207 |
208 | /**
209 | * 注意此方法适用于当前控件的父布局是RelativeLayout
210 | *
211 | * @param view 当前绘制的View
212 | * @param width 切图的宽
213 | * @param height 切图的高
214 | * @param marginLeft 切图标注距离左边的值
215 | * @param marginTop 切图标注距离顶部的值
216 | * @param marginRight 切图标注距离顶右边距离
217 | */
218 | public void drawViewlLayout(View view, float width, float height, float marginLeft,
219 | float marginRight,
220 | float marginTop) {
221 | float ScreenHeight = ScreenWidth / ratio;
222 |
223 | LayoutParams params = (LayoutParams) view.getLayoutParams();
224 |
225 | if (width == 0.0f) {
226 |
227 | } else {
228 | params.width = (int) (ScreenWidth * (width / designWidth));
229 | }
230 | if (height == 0.0f) {
231 |
232 | } else {
233 | params.height = (int) (ScreenHeight * (height / designHeight));
234 | }
235 |
236 | if (marginLeft == 0.0f) {
237 |
238 | } else {
239 | params.leftMargin = (int) (ScreenWidth * (marginLeft / designWidth));
240 | }
241 |
242 | if (marginTop == 0.0f) {
243 |
244 | } else {
245 | params.topMargin = (int) (ScreenHeight * (marginTop / designHeight));
246 | }
247 | if (marginRight == 0.0f) {
248 |
249 | } else {
250 | params.rightMargin = (int) (ScreenWidth * (marginRight / designWidth));
251 | }
252 | view.setLayoutParams(params);
253 | }
254 |
255 | /**
256 | * 注意此方法适用于当前控件的父布局是RelativeLayout
257 | *
258 | * @param view 当前绘制的View
259 | * @param width 切图的宽
260 | * @param height 切图的高
261 | * @param marginLeft 切图标注距离左边的值
262 | * @param marginTop 切图标注距离顶部的值
263 | * @param marginRight 切图标注距离顶右边距离
264 | * @param marginBottom 切图标注距离底部的距离
265 | */
266 | public void drawViewRBLayout(View view, float width, float height, float marginLeft,
267 | float marginRight, float marginTop, float marginBottom) {
268 | float ScreenHeight = ScreenWidth / ratio;
269 |
270 | LayoutParams params = (LayoutParams) view.getLayoutParams();
271 |
272 | if (width == 0.0f) {
273 |
274 | } else {
275 | params.width = (int) (ScreenWidth * (width / designWidth));
276 | }
277 | if (height == 0.0f) {
278 |
279 | } else {
280 | params.height = (int) (ScreenHeight * (height / designHeight));
281 | }
282 |
283 | if (marginLeft == 0.0f) {
284 |
285 | } else {
286 | params.leftMargin = (int) (ScreenWidth * (marginLeft / designWidth));
287 | }
288 |
289 | if (marginTop == 0.0f) {
290 |
291 | } else {
292 | params.topMargin = (int) (ScreenHeight * (marginTop / designHeight));
293 | }
294 | if (marginRight == 0.0f) {
295 |
296 | } else {
297 | params.rightMargin = (int) (ScreenWidth * (marginRight / designWidth));
298 | }
299 | if (marginBottom == 0.0f) {
300 |
301 | } else {
302 | params.bottomMargin = (int) (ScreenHeight * (marginBottom / designWidth));
303 | }
304 | view.setLayoutParams(params);
305 | }
306 |
307 | }
308 |
--------------------------------------------------------------------------------
/autolayoutlibrary/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | AutoLayoutLibrary
3 |
4 |
--------------------------------------------------------------------------------
/autolayoutlibrary/src/test/java/com/lazy/autolayoutlibrary/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.lazy.autolayoutlibrary;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 |
14 | @Test
15 | public void addition_isCorrect() throws Exception {
16 | assertEquals(4, 2 + 2);
17 | }
18 | }
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.3.0'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 |
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 | systemProp.https.proxyPort=3128
19 | systemProp.http.proxyHost=192.168.1.3
20 | org.gradle.jvmargs=-Xmx2048m
21 | systemProp.https.proxyHost=192.168.1.3
22 | android.useDeprecatedNdk=true
23 | systemProp.http.proxyPort=3128
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Mar 31 19:25:27 CST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/image/hua_wei_a.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/image/hua_wei_a.jpg
--------------------------------------------------------------------------------
/image/hua_wei_b.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/image/hua_wei_b.jpg
--------------------------------------------------------------------------------
/image/mei_zu_a.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/image/mei_zu_a.jpg
--------------------------------------------------------------------------------
/image/mei_zu_b.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/image/mei_zu_b.jpg
--------------------------------------------------------------------------------
/image/san_xing_a.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/image/san_xing_a.jpg
--------------------------------------------------------------------------------
/image/san_xing_b.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/image/san_xing_b.jpg
--------------------------------------------------------------------------------
/image/xiao_mi_a.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/image/xiao_mi_a.jpg
--------------------------------------------------------------------------------
/image/xiao_mi_b.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/l123456789jy/AutoAndroidLayout/abdc260cb39337135da5899ed91067d35fc4785e/image/xiao_mi_b.jpg
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':autolayoutlibrary'
2 |
--------------------------------------------------------------------------------