├── .gitignore ├── README.md ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── licheedev │ │ └── commonsize │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── licheedev │ │ │ └── commonsize │ │ │ └── MainActivity.java │ └── res │ │ ├── layout │ │ └── activity_main.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── 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 │ └── licheedev │ └── commonsize │ └── ExampleUnitTest.java ├── build.gradle ├── common_size_w1080_n1080 ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── licheedev │ │ └── commonsize │ │ └── CommonSize.java │ └── res │ ├── values-sw1080dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw320dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw360dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw384dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw392dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw411dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw480dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw540dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw600dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw720dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw768dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw800dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw900dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ └── values │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml ├── common_size_w1080_n1920 ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── licheedev │ │ └── commonsize │ │ └── CommonSize.java │ └── res │ ├── values-sw1080dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw320dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw360dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw384dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw392dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw411dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw480dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw540dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw600dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw720dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw768dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw800dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw900dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ └── values │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml ├── common_size_w750_n1000 ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── licheedev │ │ └── commonsize │ │ └── CommonSize.java │ └── res │ ├── values-sw1080dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw320dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw360dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw384dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw392dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw411dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw480dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw540dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw600dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw720dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw768dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw800dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw900dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ └── values │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml ├── common_size_w750_n1334 ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── licheedev │ │ └── commonsize │ │ └── CommonSize.java │ └── res │ ├── values-sw1080dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw320dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw360dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw384dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw392dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw411dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw480dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw540dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw600dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw720dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw768dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw800dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ ├── values-sw900dp │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml │ └── values │ ├── negative_dp.xml │ ├── normal_dp.xml │ └── normal_sp.xml ├── generator ├── .gitignore ├── build.gradle └── src │ └── main │ └── java │ └── com │ └── licheedev │ └── commonsize │ ├── Config.java │ ├── FileUtil.java │ ├── Generator.java │ └── OutputConfig.java ├── generator_config.properties ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── jitpack.gradle ├── pics ├── as_preview.png ├── generator.png ├── mix2.jpg ├── nexus7.png ├── nexus_4.png ├── nexus_9.png ├── pixel_c.png └── rongyao8.jpg ├── settings.gradle ├── smallest_width_list.txt └── templet ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src └── main ├── AndroidManifest.xml └── java └── com └── licheedev └── commonsize └── CommonSize.java /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | .idea 4 | /local.properties 5 | /.idea/workspace.xml 6 | /.idea/libraries 7 | .DS_Store 8 | /build 9 | /captures 10 | .externalNativeBuild 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CommonSize [![](https://jitpack.io/v/licheedev/CommonSize.svg)](https://jitpack.io/#licheedev/CommonSize) 2 | Android通用屏幕适配方案 3 | 4 | ## 原理 smallestWidth 5 | https://developer.android.com/guide/practices/screens_support.html#NewQualifiers 6 | 7 | 关键的地方就是sw后面数值的单位是`dp` 8 | 9 | * 跟hongyang的方案不同,不会用绝对分辨率适配,而使用sw(最小宽度)限定符方案 10 | * 只关注最小宽度,无视高度,不会受有/没有虚拟导航键影响,也可以适配18:9的全面屏 11 | * 设备的sw不会有太多,没有合适的配置的话,会使用最接近设备最小宽度的那个较小的配置(如没有小米mix2的392的话,会用384这个配置,误差不会很大) 12 | * 预览应该无压力,毕竟sw列表就是根据官方模拟器配置列表得来的 13 | 14 | ```java 15 | // 获取最小宽度的代码 16 | Configuration config = getResources().getConfiguration(); 17 | int smallestScreenWidthDp = config.smallestScreenWidthDp; 18 | ``` 19 | 20 | ## 使用 21 | 22 | 1. 在根build.gradle中添加 23 | 24 | ``` 25 | allprojects { 26 | repositories { 27 | ... 28 | maven { url 'https://jitpack.io' } 29 | } 30 | } 31 | ``` 32 | 33 | 2. 子module添加依赖 34 | 35 | ``` 36 | dependencies { 37 | // 随便选一个,没有就按照下面配置重新生成自己要的 38 | // 公司美工喜欢做iphone(750*1334)的图,就任意选一个w750的就行了 39 | // 本人所在公司的广告机项目做的图是1080P的,所以有个w1080的配置 40 | implementation 'com.github.licheedev.CommonSize:common_size_w1080_n1920:1.3.1' 41 | implementation 'com.github.licheedev.CommonSize:common_size_w1080_n1080:1.3.1' 42 | implementation 'com.github.licheedev.CommonSize:common_size_w750_n1334:1.3.1' 43 | implementation 'com.github.licheedev.CommonSize:common_size_w750_n1000:1.3.1' 44 | } 45 | ``` 46 | 47 | 没有合适的话,就按照下面配置重新生成一个module,复制到自己项目里面,然后 `compile project(':生成的模块名')`导入即可 48 | 49 | ## 生成新的尺寸配置 50 | 51 | ### 运行生成器 52 | ![generator](https://raw.githubusercontent.com/licheedev/CommonSize/master/pics/generator.png) 53 | 54 | ### 生成器配置 generator_config.properties 55 | 56 | 最小宽度列表 [smallest_width_list.txt](https://github.com/licheedev/CommonSize/blob/master/smallest_width_list.txt) 57 | 58 | ```properties 59 | # 输出配置,格式为w*n,其中w为参考宽度,美工的图给多少就填多少,n为dimen资源文件中,dimen条目的个数 60 | # 输出配置可以填多个,分别以英文逗号,隔开 61 | output_config=750*1000,750*1334,1080*1920 62 | # 模块名字规则,{w}为上面的参考宽度,{n}为上面的条目数目 63 | module_name_reg=common_size_w{w}_n{n} 64 | # 缩进空格长度 65 | intent_length=4 66 | # 正数尺寸文件名 67 | normal_file_name=normal_dp.xml 68 | # 正数资源命名规则,{x}为要替换的数值 69 | normal_res_reg=normal_{x}dp 70 | # 是否启用生成负数尺寸 71 | enable_negative=true 72 | # 负数尺寸文件名 73 | negative_file_name=negative_dp.xml 74 | # 负数资源命名规则,{x}为要替换的数值 75 | negative_res_reg=negative_{x}dp 76 | # 是否启用生成sp尺寸 77 | enable_sp=true 78 | # 其他配置文件名 79 | sp_file_name=normal_sp.xml 80 | # sp资源命名规则,{x}为要替换的数值 81 | sp_res_reg=normal_{x}sp 82 | # 最小宽度列表路径 83 | smallest_width_list=smallest_width_list.txt 84 | # 只删除目标module 85 | just_delete=false 86 | ``` 87 | 88 | ## 运行情况 89 | 小米mix2运行情况 90 | 91 | ![mix2](https://raw.githubusercontent.com/licheedev/CommonSize/master/pics/mix2.jpg) 92 | 93 | 其他机型 94 | 95 | ![荣耀8](https://raw.githubusercontent.com/licheedev/CommonSize/master/pics/rongyao8.jpg) 96 | ![as_preview](https://raw.githubusercontent.com/licheedev/CommonSize/master/pics/as_preview.png) 97 | ![nexus_4](https://raw.githubusercontent.com/licheedev/CommonSize/master/pics/nexus_4.png) 98 | ![nexus7](https://raw.githubusercontent.com/licheedev/CommonSize/master/pics/nexus7.png) 99 | ![nexus_9](https://raw.githubusercontent.com/licheedev/CommonSize/master/pics/nexus_9.png) 100 | ![pixel_c](https://raw.githubusercontent.com/licheedev/CommonSize/master/pics/pixel_c.png) 101 | 102 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 27 5 | defaultConfig { 6 | applicationId "com.licheedev.commonsize" 7 | minSdkVersion 17 8 | targetSdkVersion 27 9 | versionCode 1 10 | versionName "1.0" 11 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | compile fileTree(dir: 'libs', include: ['*.jar']) 23 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 24 | exclude group: 'com.android.support', module: 'support-annotations' 25 | }) 26 | compile 'com.android.support:appcompat-v7:27.0.2' 27 | compile 'com.android.support.constraint:constraint-layout:1.0.2' 28 | testCompile 'junit:junit:4.12' 29 | compile project(':common_size_w750_n1334') 30 | 31 | } 32 | -------------------------------------------------------------------------------- /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:\DevTools\Android\sdk/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/licheedev/commonsize/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.licheedev.commonsize; 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 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.licheedev.commonsize", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/licheedev/commonsize/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.licheedev.commonsize; 2 | 3 | import android.content.res.Configuration; 4 | import android.os.Bundle; 5 | import android.support.v7.app.AppCompatActivity; 6 | import android.widget.TextView; 7 | import com.licheedev.commonsizedemo.R; 8 | 9 | public class MainActivity extends AppCompatActivity { 10 | 11 | @Override 12 | protected void onCreate(Bundle savedInstanceState) { 13 | super.onCreate(savedInstanceState); 14 | setContentView(R.layout.activity_main); 15 | 16 | TextView tvSw = (TextView) findViewById(R.id.tv_sw); 17 | 18 | Configuration config = getResources().getConfiguration(); 19 | int smallestScreenWidthDp = config.smallestScreenWidthDp; 20 | tvSw.setText(String.format("match_parent, smallest width is %d", smallestScreenWidthDp)); 21 | System.out.println(smallestScreenWidthDp); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 20 | 21 | 29 | 30 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/licheedev/CommonSize/d25b4d9f3a616c44bdf41a3384cadb97bd3437cf/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/licheedev/CommonSize/d25b4d9f3a616c44bdf41a3384cadb97bd3437cf/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/licheedev/CommonSize/d25b4d9f3a616c44bdf41a3384cadb97bd3437cf/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/licheedev/CommonSize/d25b4d9f3a616c44bdf41a3384cadb97bd3437cf/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/licheedev/CommonSize/d25b4d9f3a616c44bdf41a3384cadb97bd3437cf/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/licheedev/CommonSize/d25b4d9f3a616c44bdf41a3384cadb97bd3437cf/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/licheedev/CommonSize/d25b4d9f3a616c44bdf41a3384cadb97bd3437cf/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/licheedev/CommonSize/d25b4d9f3a616c44bdf41a3384cadb97bd3437cf/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/licheedev/CommonSize/d25b4d9f3a616c44bdf41a3384cadb97bd3437cf/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/licheedev/CommonSize/d25b4d9f3a616c44bdf41a3384cadb97bd3437cf/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 | CommonSize 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/test/java/com/licheedev/commonsize/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.licheedev.commonsize; 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 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /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 | google() 6 | jcenter() 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.0.2' 10 | classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' 11 | // NOTE: Do not place your application dependencies here; they belong 12 | // in the individual module build.gradle files 13 | } 14 | } 15 | 16 | allprojects { 17 | repositories { 18 | google() 19 | jcenter() 20 | } 21 | } 22 | 23 | task clean(type: Delete) { 24 | delete rootProject.buildDir 25 | } -------------------------------------------------------------------------------- /common_size_w1080_n1080/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /common_size_w1080_n1080/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 27 5 | 6 | defaultConfig { 7 | minSdkVersion 15 8 | targetSdkVersion 27 9 | versionCode 1 10 | versionName "1.0" 11 | } 12 | 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | //compile fileTree(dir: 'libs', include: ['*.jar']) 23 | } 24 | 25 | apply from: '../jitpack.gradle' 26 | -------------------------------------------------------------------------------- /common_size_w1080_n1080/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /common_size_w1080_n1080/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /common_size_w1080_n1080/src/main/java/com/licheedev/commonsize/CommonSize.java: -------------------------------------------------------------------------------- 1 | package com.licheedev.commonsize; 2 | 3 | import android.content.Context; 4 | import android.content.res.Resources; 5 | import android.util.TypedValue; 6 | import android.widget.TextView; 7 | 8 | /** 9 | * 辅助工具 10 | */ 11 | 12 | public class CommonSize { 13 | 14 | /** 15 | * 获取尺寸资源对应的像素 16 | * 17 | * @param resources 18 | * @param resId 19 | * @return 20 | */ 21 | public static float getPx(Resources resources, int resId) { 22 | return resources.getDimension(resId); 23 | } 24 | 25 | /** 26 | * 获取尺寸资源对应的像素 27 | * 28 | * @param context 29 | * @param resId 30 | * @return 31 | */ 32 | public static float getPx(Context context, int resId) { 33 | return getPx(context.getResources(), resId); 34 | } 35 | 36 | /** 37 | * 应用TextView字体大小 38 | * 39 | * @param textView 40 | * @param resId 41 | */ 42 | public static void applyTextSize(TextView textView, int resId) { 43 | float pixel = getPx(textView.getResources(), resId); 44 | textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, pixel); 45 | } 46 | 47 | /** 48 | * dp转px 49 | * 50 | * @param resources 51 | * @param dp 52 | * @return 53 | */ 54 | public static float dp2px(Resources resources, float dp) { 55 | return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, 56 | resources.getDisplayMetrics()); 57 | } 58 | 59 | /** 60 | * sp转px 61 | * 62 | * @param context 63 | * @param sp 64 | * @return 65 | */ 66 | public static int sp2px(Context context, float sp) { 67 | return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, sp, 68 | context.getResources().getDisplayMetrics()); 69 | } 70 | 71 | /** 72 | * px转dp 73 | * 74 | * @param context 75 | * @param px 76 | * @return 77 | */ 78 | public static float px2dp(Context context, float px) { 79 | final float scale = context.getResources().getDisplayMetrics().density; 80 | return (px / scale); 81 | } 82 | 83 | /** 84 | * px转sp 85 | * 86 | * @param context 87 | * @param px 88 | * @return 89 | */ 90 | public static float px2sp(Context context, float px) { 91 | return (px / context.getResources().getDisplayMetrics().scaledDensity); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /common_size_w1080_n1920/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /common_size_w1080_n1920/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 27 5 | 6 | defaultConfig { 7 | minSdkVersion 15 8 | targetSdkVersion 27 9 | versionCode 1 10 | versionName "1.0" 11 | } 12 | 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | //compile fileTree(dir: 'libs', include: ['*.jar']) 23 | } 24 | 25 | apply from: '../jitpack.gradle' 26 | -------------------------------------------------------------------------------- /common_size_w1080_n1920/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /common_size_w1080_n1920/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /common_size_w1080_n1920/src/main/java/com/licheedev/commonsize/CommonSize.java: -------------------------------------------------------------------------------- 1 | package com.licheedev.commonsize; 2 | 3 | import android.content.Context; 4 | import android.content.res.Resources; 5 | import android.util.TypedValue; 6 | import android.widget.TextView; 7 | 8 | /** 9 | * 辅助工具 10 | */ 11 | 12 | public class CommonSize { 13 | 14 | /** 15 | * 获取尺寸资源对应的像素 16 | * 17 | * @param resources 18 | * @param resId 19 | * @return 20 | */ 21 | public static float getPx(Resources resources, int resId) { 22 | return resources.getDimension(resId); 23 | } 24 | 25 | /** 26 | * 获取尺寸资源对应的像素 27 | * 28 | * @param context 29 | * @param resId 30 | * @return 31 | */ 32 | public static float getPx(Context context, int resId) { 33 | return getPx(context.getResources(), resId); 34 | } 35 | 36 | /** 37 | * 应用TextView字体大小 38 | * 39 | * @param textView 40 | * @param resId 41 | */ 42 | public static void applyTextSize(TextView textView, int resId) { 43 | float pixel = getPx(textView.getResources(), resId); 44 | textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, pixel); 45 | } 46 | 47 | /** 48 | * dp转px 49 | * 50 | * @param resources 51 | * @param dp 52 | * @return 53 | */ 54 | public static float dp2px(Resources resources, float dp) { 55 | return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, 56 | resources.getDisplayMetrics()); 57 | } 58 | 59 | /** 60 | * sp转px 61 | * 62 | * @param context 63 | * @param sp 64 | * @return 65 | */ 66 | public static int sp2px(Context context, float sp) { 67 | return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, sp, 68 | context.getResources().getDisplayMetrics()); 69 | } 70 | 71 | /** 72 | * px转dp 73 | * 74 | * @param context 75 | * @param px 76 | * @return 77 | */ 78 | public static float px2dp(Context context, float px) { 79 | final float scale = context.getResources().getDisplayMetrics().density; 80 | return (px / scale); 81 | } 82 | 83 | /** 84 | * px转sp 85 | * 86 | * @param context 87 | * @param px 88 | * @return 89 | */ 90 | public static float px2sp(Context context, float px) { 91 | return (px / context.getResources().getDisplayMetrics().scaledDensity); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /common_size_w750_n1000/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /common_size_w750_n1000/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 27 5 | 6 | defaultConfig { 7 | minSdkVersion 15 8 | targetSdkVersion 27 9 | versionCode 1 10 | versionName "1.0" 11 | } 12 | 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | //compile fileTree(dir: 'libs', include: ['*.jar']) 23 | } 24 | 25 | apply from: '../jitpack.gradle' 26 | -------------------------------------------------------------------------------- /common_size_w750_n1000/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /common_size_w750_n1000/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /common_size_w750_n1000/src/main/java/com/licheedev/commonsize/CommonSize.java: -------------------------------------------------------------------------------- 1 | package com.licheedev.commonsize; 2 | 3 | import android.content.Context; 4 | import android.content.res.Resources; 5 | import android.util.TypedValue; 6 | import android.widget.TextView; 7 | 8 | /** 9 | * 辅助工具 10 | */ 11 | 12 | public class CommonSize { 13 | 14 | /** 15 | * 获取尺寸资源对应的像素 16 | * 17 | * @param resources 18 | * @param resId 19 | * @return 20 | */ 21 | public static float getPx(Resources resources, int resId) { 22 | return resources.getDimension(resId); 23 | } 24 | 25 | /** 26 | * 获取尺寸资源对应的像素 27 | * 28 | * @param context 29 | * @param resId 30 | * @return 31 | */ 32 | public static float getPx(Context context, int resId) { 33 | return getPx(context.getResources(), resId); 34 | } 35 | 36 | /** 37 | * 应用TextView字体大小 38 | * 39 | * @param textView 40 | * @param resId 41 | */ 42 | public static void applyTextSize(TextView textView, int resId) { 43 | float pixel = getPx(textView.getResources(), resId); 44 | textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, pixel); 45 | } 46 | 47 | /** 48 | * dp转px 49 | * 50 | * @param resources 51 | * @param dp 52 | * @return 53 | */ 54 | public static float dp2px(Resources resources, float dp) { 55 | return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, 56 | resources.getDisplayMetrics()); 57 | } 58 | 59 | /** 60 | * sp转px 61 | * 62 | * @param context 63 | * @param sp 64 | * @return 65 | */ 66 | public static int sp2px(Context context, float sp) { 67 | return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, sp, 68 | context.getResources().getDisplayMetrics()); 69 | } 70 | 71 | /** 72 | * px转dp 73 | * 74 | * @param context 75 | * @param px 76 | * @return 77 | */ 78 | public static float px2dp(Context context, float px) { 79 | final float scale = context.getResources().getDisplayMetrics().density; 80 | return (px / scale); 81 | } 82 | 83 | /** 84 | * px转sp 85 | * 86 | * @param context 87 | * @param px 88 | * @return 89 | */ 90 | public static float px2sp(Context context, float px) { 91 | return (px / context.getResources().getDisplayMetrics().scaledDensity); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /common_size_w750_n1000/src/main/res/values-sw600dp/normal_dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0dp 4 | 0.8dp 5 | 1.6dp 6 | 2.4dp 7 | 3.2dp 8 | 4.0dp 9 | 4.8dp 10 | 5.6dp 11 | 6.4dp 12 | 7.2000003dp 13 | 8.0dp 14 | 8.8dp 15 | 9.6dp 16 | 10.4dp 17 | 11.2dp 18 | 12.0dp 19 | 12.8dp 20 | 13.6dp 21 | 14.400001dp 22 | 15.2dp 23 | 16.0dp 24 | 16.800001dp 25 | 17.6dp 26 | 18.4dp 27 | 19.2dp 28 | 20.000002dp 29 | 20.8dp 30 | 21.599998dp 31 | 22.4dp 32 | 23.199999dp 33 | 24.0dp 34 | 24.8dp 35 | 25.6dp 36 | 26.4dp 37 | 27.2dp 38 | 28.0dp 39 | 28.800001dp 40 | 29.6dp 41 | 30.4dp 42 | 31.2dp 43 | 32.0dp 44 | 32.8dp 45 | 33.600002dp 46 | 34.399998dp 47 | 35.2dp 48 | 36.0dp 49 | 36.8dp 50 | 37.600002dp 51 | 38.4dp 52 | 39.2dp 53 | 40.000004dp 54 | 40.800003dp 55 | 41.6dp 56 | 42.399998dp 57 | 43.199997dp 58 | 44.0dp 59 | 44.8dp 60 | 45.6dp 61 | 46.399998dp 62 | 47.199997dp 63 | 48.0dp 64 | 48.8dp 65 | 49.6dp 66 | 50.399998dp 67 | 51.2dp 68 | 52.0dp 69 | 52.8dp 70 | 53.6dp 71 | 54.4dp 72 | 55.2dp 73 | 56.0dp 74 | 56.8dp 75 | 57.600002dp 76 | 58.4dp 77 | 59.2dp 78 | 60.0dp 79 | 60.8dp 80 | 61.600002dp 81 | 62.4dp 82 | 63.2dp 83 | 64.0dp 84 | 64.8dp 85 | 65.6dp 86 | 66.4dp 87 | 67.200005dp 88 | 68.0dp 89 | 68.799995dp 90 | 69.6dp 91 | 70.4dp 92 | 71.2dp 93 | 72.0dp 94 | 72.799995dp 95 | 73.6dp 96 | 74.4dp 97 | 75.200005dp 98 | 76.0dp 99 | 76.8dp 100 | 77.6dp 101 | 78.4dp 102 | 79.2dp 103 | 80.00001dp 104 | 80.8dp 105 | 81.600006dp 106 | 82.4dp 107 | 83.2dp 108 | 84.0dp 109 | 84.799995dp 110 | 85.6dp 111 | 86.399994dp 112 | 87.200005dp 113 | 88.0dp 114 | 88.8dp 115 | 89.6dp 116 | 90.4dp 117 | 91.2dp 118 | 92.0dp 119 | 92.799995dp 120 | 93.6dp 121 | 94.399994dp 122 | 95.200005dp 123 | 96.0dp 124 | 96.8dp 125 | 97.6dp 126 | 98.4dp 127 | 99.2dp 128 | 100.0dp 129 | 100.799995dp 130 | 101.600006dp 131 | 102.4dp 132 | 103.200005dp 133 | 104.0dp 134 | 104.8dp 135 | 105.6dp 136 | 106.4dp 137 | 107.2dp 138 | 108.00001dp 139 | 108.8dp 140 | 109.6dp 141 | 110.4dp 142 | 111.2dp 143 | 112.0dp 144 | 112.799995dp 145 | 113.6dp 146 | 114.399994dp 147 | 115.200005dp 148 | 116.0dp 149 | 116.8dp 150 | 117.6dp 151 | 118.4dp 152 | 119.2dp 153 | 120.0dp 154 | 120.799995dp 155 | 121.6dp 156 | 122.399994dp 157 | 123.200005dp 158 | 124.0dp 159 | 124.8dp 160 | 125.6dp 161 | 126.4dp 162 | 127.2dp 163 | 128.0dp 164 | 128.8dp 165 | 129.6dp 166 | 130.4dp 167 | 131.2dp 168 | 132.0dp 169 | 132.8dp 170 | 133.6dp 171 | 134.40001dp 172 | 135.2dp 173 | 136.0dp 174 | 136.8dp 175 | 137.59999dp 176 | 138.4dp 177 | 139.2dp 178 | 140.0dp 179 | 140.8dp 180 | 141.6dp 181 | 142.4dp 182 | 143.2dp 183 | 144.0dp 184 | 144.8dp 185 | 145.59999dp 186 | 146.40001dp 187 | 147.2dp 188 | 148.0dp 189 | 148.8dp 190 | 149.6dp 191 | 150.40001dp 192 | 151.2dp 193 | 152.0dp 194 | 152.79999dp 195 | 153.6dp 196 | 154.40001dp 197 | 155.2dp 198 | 156.0dp 199 | 156.8dp 200 | 157.6dp 201 | 158.4dp 202 | 159.2dp 203 | 160.00002dp 204 | 160.8dp 205 | 161.6dp 206 | 162.4dp 207 | 163.20001dp 208 | 164.0dp 209 | 164.8dp 210 | 165.59999dp 211 | 166.4dp 212 | 167.20001dp 213 | 168.0dp 214 | 168.8dp 215 | 169.59999dp 216 | 170.40001dp 217 | 171.2dp 218 | 172.0dp 219 | 172.79999dp 220 | 173.6dp 221 | 174.40001dp 222 | 175.2dp 223 | 176.0dp 224 | 176.8dp 225 | 177.6dp 226 | 178.4dp 227 | 179.2dp 228 | 180.0dp 229 | 180.8dp 230 | 181.6dp 231 | 182.4dp 232 | 183.20001dp 233 | 184.0dp 234 | 184.8dp 235 | 185.59999dp 236 | 186.40001dp 237 | 187.2dp 238 | 188.0dp 239 | 188.79999dp 240 | 189.6dp 241 | 190.40001dp 242 | 191.2dp 243 | 192.0dp 244 | 192.79999dp 245 | 193.6dp 246 | 194.4dp 247 | 195.2dp 248 | 195.99998dp 249 | 196.8dp 250 | 197.6dp 251 | 198.4dp 252 | 199.2dp 253 | 200.0dp 254 | 200.8dp 255 | 201.59999dp 256 | 202.4dp 257 | 203.20001dp 258 | 204.0dp 259 | 204.8dp 260 | 205.59999dp 261 | 206.40001dp 262 | 207.2dp 263 | 208.0dp 264 | 208.79999dp 265 | 209.6dp 266 | 210.40001dp 267 | 211.2dp 268 | 212.0dp 269 | 212.8dp 270 | 213.6dp 271 | 214.4dp 272 | 215.2dp 273 | 216.00002dp 274 | 216.8dp 275 | 217.6dp 276 | 218.4dp 277 | 219.2dp 278 | 220.0dp 279 | 220.8dp 280 | 221.59999dp 281 | 222.4dp 282 | 223.20001dp 283 | 224.0dp 284 | 224.8dp 285 | 225.59999dp 286 | 226.40001dp 287 | 227.2dp 288 | 228.0dp 289 | 228.79999dp 290 | 229.6dp 291 | 230.40001dp 292 | 231.2dp 293 | 232.0dp 294 | 232.8dp 295 | 233.6dp 296 | 234.4dp 297 | 235.2dp 298 | 236.0dp 299 | 236.8dp 300 | 237.6dp 301 | 238.4dp 302 | 239.20001dp 303 | 240.0dp 304 | 240.8dp 305 | 241.59999dp 306 | 242.40001dp 307 | 243.2dp 308 | 244.0dp 309 | 244.79999dp 310 | 245.59999dp 311 | 246.40001dp 312 | 247.2dp 313 | 248.0dp 314 | 248.79999dp 315 | 249.6dp 316 | 250.4dp 317 | 251.2dp 318 | 251.99998dp 319 | 252.8dp 320 | 253.6dp 321 | 254.4dp 322 | 255.2dp 323 | 256.0dp 324 | 256.8dp 325 | 257.6dp 326 | 258.4dp 327 | 259.2dp 328 | 260.0dp 329 | 260.8dp 330 | 261.6dp 331 | 262.4dp 332 | 263.2dp 333 | 264.0dp 334 | 264.8dp 335 | 265.6dp 336 | 266.4dp 337 | 267.2dp 338 | 268.0dp 339 | 268.80002dp 340 | 269.6dp 341 | 270.4dp 342 | 271.19998dp 343 | 272.0dp 344 | 272.80002dp 345 | 273.6dp 346 | 274.4dp 347 | 275.19998dp 348 | 276.0dp 349 | 276.8dp 350 | 277.6dp 351 | 278.4dp 352 | 279.2dp 353 | 280.0dp 354 | 280.8dp 355 | 281.6dp 356 | 282.4dp 357 | 283.2dp 358 | 284.0dp 359 | 284.8dp 360 | 285.6dp 361 | 286.4dp 362 | 287.2dp 363 | 288.0dp 364 | 288.80002dp 365 | 289.6dp 366 | 290.4dp 367 | 291.19998dp 368 | 292.0dp 369 | 292.80002dp 370 | 293.6dp 371 | 294.4dp 372 | 295.2dp 373 | 296.0dp 374 | 296.8dp 375 | 297.6dp 376 | 298.4dp 377 | 299.2dp 378 | 300.0dp 379 | 300.80002dp 380 | 301.6dp 381 | 302.4dp 382 | 303.19998dp 383 | 304.0dp 384 | 304.80002dp 385 | 305.59998dp 386 | 306.4dp 387 | 307.2dp 388 | 308.0dp 389 | 308.80002dp 390 | 309.59998dp 391 | 310.4dp 392 | 311.2dp 393 | 312.0dp 394 | 312.8dp 395 | 313.6dp 396 | 314.4dp 397 | 315.2dp 398 | 316.0dp 399 | 316.8dp 400 | 317.6dp 401 | 318.4dp 402 | 319.2dp 403 | 320.00003dp 404 | 320.8dp 405 | 321.6dp 406 | 322.4dp 407 | 323.2dp 408 | 324.0dp 409 | 324.8dp 410 | 325.6dp 411 | 326.40002dp 412 | 327.19998dp 413 | 328.0dp 414 | 328.8dp 415 | 329.6dp 416 | 330.40002dp 417 | 331.19998dp 418 | 332.0dp 419 | 332.8dp 420 | 333.6dp 421 | 334.40002dp 422 | 335.19998dp 423 | 336.0dp 424 | 336.80002dp 425 | 337.6dp 426 | 338.4dp 427 | 339.19998dp 428 | 340.0dp 429 | 340.80002dp 430 | 341.59998dp 431 | 342.4dp 432 | 343.2dp 433 | 344.0dp 434 | 344.80002dp 435 | 345.59998dp 436 | 346.4dp 437 | 347.2dp 438 | 348.0dp 439 | 348.80002dp 440 | 349.6dp 441 | 350.4dp 442 | 351.2dp 443 | 352.0dp 444 | 352.8dp 445 | 353.6dp 446 | 354.4dp 447 | 355.2dp 448 | 355.99997dp 449 | 356.8dp 450 | 357.6dp 451 | 358.4dp 452 | 359.2dp 453 | 360.0dp 454 | 360.8dp 455 | 361.6dp 456 | 362.4dp 457 | 363.2dp 458 | 364.0dp 459 | 364.8dp 460 | 365.6dp 461 | 366.40002dp 462 | 367.19998dp 463 | 368.0dp 464 | 368.8dp 465 | 369.6dp 466 | 370.40002dp 467 | 371.19998dp 468 | 372.0dp 469 | 372.80002dp 470 | 373.6dp 471 | 374.4dp 472 | 375.19998dp 473 | 376.0dp 474 | 376.80002dp 475 | 377.59998dp 476 | 378.4dp 477 | 379.2dp 478 | 380.0dp 479 | 380.80002dp 480 | 381.59998dp 481 | 382.4dp 482 | 383.2dp 483 | 384.0dp 484 | 384.80002dp 485 | 385.59998dp 486 | 386.4dp 487 | 387.2dp 488 | 388.0dp 489 | 388.8dp 490 | 389.6dp 491 | 390.4dp 492 | 391.2dp 493 | 391.99997dp 494 | 392.8dp 495 | 393.6dp 496 | 394.4dp 497 | 395.2dp 498 | 396.00003dp 499 | 396.8dp 500 | 397.6dp 501 | 398.4dp 502 | 399.2dp 503 | 400.0dp 504 | 400.8dp 505 | 401.6dp 506 | 402.40002dp 507 | 403.19998dp 508 | 404.0dp 509 | 404.8dp 510 | 405.6dp 511 | 406.40002dp 512 | 407.19998dp 513 | 408.0dp 514 | 408.80002dp 515 | 409.6dp 516 | 410.40002dp 517 | 411.19998dp 518 | 412.0dp 519 | 412.80002dp 520 | 413.6dp 521 | 414.4dp 522 | 415.19998dp 523 | 416.0dp 524 | 416.80002dp 525 | 417.59998dp 526 | 418.4dp 527 | 419.2dp 528 | 420.0dp 529 | 420.80002dp 530 | 421.59998dp 531 | 422.4dp 532 | 423.2dp 533 | 424.0dp 534 | 424.8dp 535 | 425.6dp 536 | 426.4dp 537 | 427.2dp 538 | 428.0dp 539 | 428.8dp 540 | 429.6dp 541 | 430.4dp 542 | 431.2dp 543 | 432.00003dp 544 | 432.8dp 545 | 433.6dp 546 | 434.4dp 547 | 435.2dp 548 | 436.0dp 549 | 436.8dp 550 | 437.6dp 551 | 438.4dp 552 | 439.19998dp 553 | 440.0dp 554 | 440.8dp 555 | 441.6dp 556 | 442.40002dp 557 | 443.19998dp 558 | 444.0dp 559 | 444.8dp 560 | 445.6dp 561 | 446.40002dp 562 | 447.19998dp 563 | 448.0dp 564 | 448.80002dp 565 | 449.6dp 566 | 450.4dp 567 | 451.19998dp 568 | 452.0dp 569 | 452.80002dp 570 | 453.59998dp 571 | 454.4dp 572 | 455.2dp 573 | 456.0dp 574 | 456.80002dp 575 | 457.59998dp 576 | 458.4dp 577 | 459.2dp 578 | 460.0dp 579 | 460.80002dp 580 | 461.6dp 581 | 462.4dp 582 | 463.2dp 583 | 464.0dp 584 | 464.8dp 585 | 465.6dp 586 | 466.4dp 587 | 467.2dp 588 | 467.99997dp 589 | 468.8dp 590 | 469.6dp 591 | 470.4dp 592 | 471.2dp 593 | 472.0dp 594 | 472.8dp 595 | 473.6dp 596 | 474.4dp 597 | 475.2dp 598 | 476.0dp 599 | 476.8dp 600 | 477.6dp 601 | 478.40002dp 602 | 479.19998dp 603 | 480.0dp 604 | 480.8dp 605 | 481.6dp 606 | 482.40002dp 607 | 483.19998dp 608 | 484.0dp 609 | 484.80002dp 610 | 485.6dp 611 | 486.4dp 612 | 487.19998dp 613 | 488.0dp 614 | 488.80002dp 615 | 489.59998dp 616 | 490.4dp 617 | 491.19998dp 618 | 492.0dp 619 | 492.80002dp 620 | 493.59998dp 621 | 494.4dp 622 | 495.2dp 623 | 496.0dp 624 | 496.80002dp 625 | 497.59998dp 626 | 498.4dp 627 | 499.2dp 628 | 500.0dp 629 | 500.8dp 630 | 501.6dp 631 | 502.4dp 632 | 503.2dp 633 | 503.99997dp 634 | 504.8dp 635 | 505.6dp 636 | 506.4dp 637 | 507.2dp 638 | 508.00003dp 639 | 508.8dp 640 | 509.6dp 641 | 510.4dp 642 | 511.2dp 643 | 512.0dp 644 | 512.8dp 645 | 513.6dp 646 | 514.4dp 647 | 515.2dp 648 | 516.0dp 649 | 516.8dp 650 | 517.6dp 651 | 518.4dp 652 | 519.2dp 653 | 520.0dp 654 | 520.8dp 655 | 521.6dp 656 | 522.4dp 657 | 523.2dp 658 | 524.0dp 659 | 524.8dp 660 | 525.6dp 661 | 526.4dp 662 | 527.2dp 663 | 528.0dp 664 | 528.8dp 665 | 529.6dp 666 | 530.4dp 667 | 531.2dp 668 | 532.0dp 669 | 532.8dp 670 | 533.6dp 671 | 534.4dp 672 | 535.2dp 673 | 536.0dp 674 | 536.8dp 675 | 537.60004dp 676 | 538.4dp 677 | 539.2dp 678 | 540.0dp 679 | 540.8dp 680 | 541.60004dp 681 | 542.39996dp 682 | 543.2dp 683 | 544.0dp 684 | 544.8dp 685 | 545.60004dp 686 | 546.39996dp 687 | 547.2dp 688 | 548.0dp 689 | 548.8dp 690 | 549.6dp 691 | 550.39996dp 692 | 551.2dp 693 | 552.0dp 694 | 552.8dp 695 | 553.6dp 696 | 554.4dp 697 | 555.2dp 698 | 556.0dp 699 | 556.8dp 700 | 557.6dp 701 | 558.4dp 702 | 559.2dp 703 | 560.0dp 704 | 560.8dp 705 | 561.6dp 706 | 562.4dp 707 | 563.2dp 708 | 564.0dp 709 | 564.8dp 710 | 565.6dp 711 | 566.4dp 712 | 567.2dp 713 | 568.0dp 714 | 568.8dp 715 | 569.6dp 716 | 570.4dp 717 | 571.2dp 718 | 572.0dp 719 | 572.8dp 720 | 573.6dp 721 | 574.4dp 722 | 575.2dp 723 | 576.0dp 724 | 576.8dp 725 | 577.60004dp 726 | 578.39996dp 727 | 579.2dp 728 | 580.0dp 729 | 580.8dp 730 | 581.60004dp 731 | 582.39996dp 732 | 583.2dp 733 | 584.0dp 734 | 584.8dp 735 | 585.60004dp 736 | 586.39996dp 737 | 587.2dp 738 | 588.0dp 739 | 588.8dp 740 | 589.6dp 741 | 590.4dp 742 | 591.2dp 743 | 592.0dp 744 | 592.8dp 745 | 593.6dp 746 | 594.4dp 747 | 595.2dp 748 | 596.0dp 749 | 596.8dp 750 | 597.6dp 751 | 598.4dp 752 | 599.2dp 753 | 600.0dp 754 | 600.8dp 755 | 601.60004dp 756 | 602.39996dp 757 | 603.2dp 758 | 604.0dp 759 | 604.8dp 760 | 605.60004dp 761 | 606.39996dp 762 | 607.19995dp 763 | 608.0dp 764 | 608.8dp 765 | 609.60004dp 766 | 610.4dp 767 | 611.19995dp 768 | 612.0dp 769 | 612.8dp 770 | 613.60004dp 771 | 614.4dp 772 | 615.19995dp 773 | 616.0dp 774 | 616.8dp 775 | 617.60004dp 776 | 618.4dp 777 | 619.19995dp 778 | 620.0dp 779 | 620.8dp 780 | 621.60004dp 781 | 622.4dp 782 | 623.2dp 783 | 624.0dp 784 | 624.8dp 785 | 625.6dp 786 | 626.4dp 787 | 627.2dp 788 | 628.0dp 789 | 628.8dp 790 | 629.6dp 791 | 630.4dp 792 | 631.2dp 793 | 632.0dp 794 | 632.8dp 795 | 633.6dp 796 | 634.4dp 797 | 635.2dp 798 | 635.99994dp 799 | 636.8dp 800 | 637.6dp 801 | 638.4dp 802 | 639.2dp 803 | 640.00006dp 804 | 640.8dp 805 | 641.6dp 806 | 642.4dp 807 | 643.2dp 808 | 644.0dp 809 | 644.8dp 810 | 645.6dp 811 | 646.4dp 812 | 647.2dp 813 | 648.0dp 814 | 648.8dp 815 | 649.6dp 816 | 650.4dp 817 | 651.2dp 818 | 652.0dp 819 | 652.80005dp 820 | 653.6dp 821 | 654.39996dp 822 | 655.2dp 823 | 656.0dp 824 | 656.80005dp 825 | 657.6dp 826 | 658.39996dp 827 | 659.2dp 828 | 660.0dp 829 | 660.80005dp 830 | 661.6dp 831 | 662.39996dp 832 | 663.2dp 833 | 664.0dp 834 | 664.80005dp 835 | 665.6dp 836 | 666.39996dp 837 | 667.2dp 838 | 668.0dp 839 | 668.80005dp 840 | 669.60004dp 841 | 670.39996dp 842 | 671.2dp 843 | 672.0dp 844 | 672.8dp 845 | 673.60004dp 846 | 674.39996dp 847 | 675.2dp 848 | 676.0dp 849 | 676.8dp 850 | 677.60004dp 851 | 678.39996dp 852 | 679.19995dp 853 | 680.0dp 854 | 680.8dp 855 | 681.60004dp 856 | 682.39996dp 857 | 683.19995dp 858 | 684.0dp 859 | 684.8dp 860 | 685.60004dp 861 | 686.4dp 862 | 687.19995dp 863 | 688.0dp 864 | 688.8dp 865 | 689.60004dp 866 | 690.4dp 867 | 691.19995dp 868 | 692.0dp 869 | 692.8dp 870 | 693.60004dp 871 | 694.4dp 872 | 695.19995dp 873 | 696.0dp 874 | 696.8dp 875 | 697.60004dp 876 | 698.4dp 877 | 699.2dp 878 | 700.0dp 879 | 700.8dp 880 | 701.6dp 881 | 702.4dp 882 | 703.2dp 883 | 704.0dp 884 | 704.8dp 885 | 705.6dp 886 | 706.4dp 887 | 707.2dp 888 | 707.99994dp 889 | 708.8dp 890 | 709.6dp 891 | 710.4dp 892 | 711.2dp 893 | 711.99994dp 894 | 712.8dp 895 | 713.6dp 896 | 714.4dp 897 | 715.2dp 898 | 716.00006dp 899 | 716.8dp 900 | 717.6dp 901 | 718.4dp 902 | 719.2dp 903 | 720.0dp 904 | 720.8dp 905 | 721.6dp 906 | 722.4dp 907 | 723.2dp 908 | 724.0dp 909 | 724.8dp 910 | 725.6dp 911 | 726.4dp 912 | 727.2dp 913 | 728.0dp 914 | 728.80005dp 915 | 729.6dp 916 | 730.39996dp 917 | 731.2dp 918 | 732.0dp 919 | 732.80005dp 920 | 733.6dp 921 | 734.39996dp 922 | 735.2dp 923 | 736.0dp 924 | 736.80005dp 925 | 737.6dp 926 | 738.39996dp 927 | 739.2dp 928 | 740.0dp 929 | 740.80005dp 930 | 741.6dp 931 | 742.39996dp 932 | 743.2dp 933 | 744.0dp 934 | 744.80005dp 935 | 745.60004dp 936 | 746.39996dp 937 | 747.2dp 938 | 748.0dp 939 | 748.8dp 940 | 749.60004dp 941 | 750.39996dp 942 | 751.2dp 943 | 752.0dp 944 | 752.8dp 945 | 753.60004dp 946 | 754.39996dp 947 | 755.19995dp 948 | 756.0dp 949 | 756.8dp 950 | 757.60004dp 951 | 758.4dp 952 | 759.19995dp 953 | 760.0dp 954 | 760.8dp 955 | 761.60004dp 956 | 762.4dp 957 | 763.19995dp 958 | 764.0dp 959 | 764.8dp 960 | 765.60004dp 961 | 766.4dp 962 | 767.19995dp 963 | 768.0dp 964 | 768.8dp 965 | 769.60004dp 966 | 770.4dp 967 | 771.19995dp 968 | 772.0dp 969 | 772.8dp 970 | 773.6dp 971 | 774.4dp 972 | 775.2dp 973 | 776.0dp 974 | 776.8dp 975 | 777.6dp 976 | 778.4dp 977 | 779.2dp 978 | 780.0dp 979 | 780.8dp 980 | 781.6dp 981 | 782.4dp 982 | 783.2dp 983 | 783.99994dp 984 | 784.8dp 985 | 785.6dp 986 | 786.4dp 987 | 787.2dp 988 | 788.00006dp 989 | 788.8dp 990 | 789.6dp 991 | 790.4dp 992 | 791.2dp 993 | 792.00006dp 994 | 792.8dp 995 | 793.6dp 996 | 794.4dp 997 | 795.2dp 998 | 796.0dp 999 | 796.8dp 1000 | 797.6dp 1001 | 798.4dp 1002 | 799.2dp 1003 | 800.0dp 1004 | 1005 | -------------------------------------------------------------------------------- /common_size_w750_n1000/src/main/res/values-sw600dp/normal_sp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0sp 4 | 0.8sp 5 | 1.6sp 6 | 2.4sp 7 | 3.2sp 8 | 4.0sp 9 | 4.8sp 10 | 5.6sp 11 | 6.4sp 12 | 7.2000003sp 13 | 8.0sp 14 | 8.8sp 15 | 9.6sp 16 | 10.4sp 17 | 11.2sp 18 | 12.0sp 19 | 12.8sp 20 | 13.6sp 21 | 14.400001sp 22 | 15.2sp 23 | 16.0sp 24 | 16.800001sp 25 | 17.6sp 26 | 18.4sp 27 | 19.2sp 28 | 20.000002sp 29 | 20.8sp 30 | 21.599998sp 31 | 22.4sp 32 | 23.199999sp 33 | 24.0sp 34 | 24.8sp 35 | 25.6sp 36 | 26.4sp 37 | 27.2sp 38 | 28.0sp 39 | 28.800001sp 40 | 29.6sp 41 | 30.4sp 42 | 31.2sp 43 | 32.0sp 44 | 32.8sp 45 | 33.600002sp 46 | 34.399998sp 47 | 35.2sp 48 | 36.0sp 49 | 36.8sp 50 | 37.600002sp 51 | 38.4sp 52 | 39.2sp 53 | 40.000004sp 54 | 40.800003sp 55 | 41.6sp 56 | 42.399998sp 57 | 43.199997sp 58 | 44.0sp 59 | 44.8sp 60 | 45.6sp 61 | 46.399998sp 62 | 47.199997sp 63 | 48.0sp 64 | 48.8sp 65 | 49.6sp 66 | 50.399998sp 67 | 51.2sp 68 | 52.0sp 69 | 52.8sp 70 | 53.6sp 71 | 54.4sp 72 | 55.2sp 73 | 56.0sp 74 | 56.8sp 75 | 57.600002sp 76 | 58.4sp 77 | 59.2sp 78 | 60.0sp 79 | 60.8sp 80 | 61.600002sp 81 | 62.4sp 82 | 63.2sp 83 | 64.0sp 84 | 64.8sp 85 | 65.6sp 86 | 66.4sp 87 | 67.200005sp 88 | 68.0sp 89 | 68.799995sp 90 | 69.6sp 91 | 70.4sp 92 | 71.2sp 93 | 72.0sp 94 | 72.799995sp 95 | 73.6sp 96 | 74.4sp 97 | 75.200005sp 98 | 76.0sp 99 | 76.8sp 100 | 77.6sp 101 | 78.4sp 102 | 79.2sp 103 | 80.00001sp 104 | 80.8sp 105 | 81.600006sp 106 | 82.4sp 107 | 83.2sp 108 | 84.0sp 109 | 84.799995sp 110 | 85.6sp 111 | 86.399994sp 112 | 87.200005sp 113 | 88.0sp 114 | 88.8sp 115 | 89.6sp 116 | 90.4sp 117 | 91.2sp 118 | 92.0sp 119 | 92.799995sp 120 | 93.6sp 121 | 94.399994sp 122 | 95.200005sp 123 | 96.0sp 124 | 96.8sp 125 | 97.6sp 126 | 98.4sp 127 | 99.2sp 128 | 100.0sp 129 | 100.799995sp 130 | 101.600006sp 131 | 102.4sp 132 | 103.200005sp 133 | 104.0sp 134 | 104.8sp 135 | 105.6sp 136 | 106.4sp 137 | 107.2sp 138 | 108.00001sp 139 | 108.8sp 140 | 109.6sp 141 | 110.4sp 142 | 111.2sp 143 | 112.0sp 144 | 112.799995sp 145 | 113.6sp 146 | 114.399994sp 147 | 115.200005sp 148 | 116.0sp 149 | 116.8sp 150 | 117.6sp 151 | 118.4sp 152 | 119.2sp 153 | 120.0sp 154 | 120.799995sp 155 | 121.6sp 156 | 122.399994sp 157 | 123.200005sp 158 | 124.0sp 159 | 124.8sp 160 | 125.6sp 161 | 126.4sp 162 | 127.2sp 163 | 128.0sp 164 | 128.8sp 165 | 129.6sp 166 | 130.4sp 167 | 131.2sp 168 | 132.0sp 169 | 132.8sp 170 | 133.6sp 171 | 134.40001sp 172 | 135.2sp 173 | 136.0sp 174 | 136.8sp 175 | 137.59999sp 176 | 138.4sp 177 | 139.2sp 178 | 140.0sp 179 | 140.8sp 180 | 141.6sp 181 | 142.4sp 182 | 143.2sp 183 | 144.0sp 184 | 144.8sp 185 | 145.59999sp 186 | 146.40001sp 187 | 147.2sp 188 | 148.0sp 189 | 148.8sp 190 | 149.6sp 191 | 150.40001sp 192 | 151.2sp 193 | 152.0sp 194 | 152.79999sp 195 | 153.6sp 196 | 154.40001sp 197 | 155.2sp 198 | 156.0sp 199 | 156.8sp 200 | 157.6sp 201 | 158.4sp 202 | 159.2sp 203 | 160.00002sp 204 | 160.8sp 205 | 161.6sp 206 | 162.4sp 207 | 163.20001sp 208 | 164.0sp 209 | 164.8sp 210 | 165.59999sp 211 | 166.4sp 212 | 167.20001sp 213 | 168.0sp 214 | 168.8sp 215 | 169.59999sp 216 | 170.40001sp 217 | 171.2sp 218 | 172.0sp 219 | 172.79999sp 220 | 173.6sp 221 | 174.40001sp 222 | 175.2sp 223 | 176.0sp 224 | 176.8sp 225 | 177.6sp 226 | 178.4sp 227 | 179.2sp 228 | 180.0sp 229 | 180.8sp 230 | 181.6sp 231 | 182.4sp 232 | 183.20001sp 233 | 184.0sp 234 | 184.8sp 235 | 185.59999sp 236 | 186.40001sp 237 | 187.2sp 238 | 188.0sp 239 | 188.79999sp 240 | 189.6sp 241 | 190.40001sp 242 | 191.2sp 243 | 192.0sp 244 | 192.79999sp 245 | 193.6sp 246 | 194.4sp 247 | 195.2sp 248 | 195.99998sp 249 | 196.8sp 250 | 197.6sp 251 | 198.4sp 252 | 199.2sp 253 | 200.0sp 254 | 200.8sp 255 | 201.59999sp 256 | 202.4sp 257 | 203.20001sp 258 | 204.0sp 259 | 204.8sp 260 | 205.59999sp 261 | 206.40001sp 262 | 207.2sp 263 | 208.0sp 264 | 208.79999sp 265 | 209.6sp 266 | 210.40001sp 267 | 211.2sp 268 | 212.0sp 269 | 212.8sp 270 | 213.6sp 271 | 214.4sp 272 | 215.2sp 273 | 216.00002sp 274 | 216.8sp 275 | 217.6sp 276 | 218.4sp 277 | 219.2sp 278 | 220.0sp 279 | 220.8sp 280 | 221.59999sp 281 | 222.4sp 282 | 223.20001sp 283 | 224.0sp 284 | 224.8sp 285 | 225.59999sp 286 | 226.40001sp 287 | 227.2sp 288 | 228.0sp 289 | 228.79999sp 290 | 229.6sp 291 | 230.40001sp 292 | 231.2sp 293 | 232.0sp 294 | 232.8sp 295 | 233.6sp 296 | 234.4sp 297 | 235.2sp 298 | 236.0sp 299 | 236.8sp 300 | 237.6sp 301 | 238.4sp 302 | 239.20001sp 303 | 240.0sp 304 | 240.8sp 305 | 241.59999sp 306 | 242.40001sp 307 | 243.2sp 308 | 244.0sp 309 | 244.79999sp 310 | 245.59999sp 311 | 246.40001sp 312 | 247.2sp 313 | 248.0sp 314 | 248.79999sp 315 | 249.6sp 316 | 250.4sp 317 | 251.2sp 318 | 251.99998sp 319 | 252.8sp 320 | 253.6sp 321 | 254.4sp 322 | 255.2sp 323 | 256.0sp 324 | 256.8sp 325 | 257.6sp 326 | 258.4sp 327 | 259.2sp 328 | 260.0sp 329 | 260.8sp 330 | 261.6sp 331 | 262.4sp 332 | 263.2sp 333 | 264.0sp 334 | 264.8sp 335 | 265.6sp 336 | 266.4sp 337 | 267.2sp 338 | 268.0sp 339 | 268.80002sp 340 | 269.6sp 341 | 270.4sp 342 | 271.19998sp 343 | 272.0sp 344 | 272.80002sp 345 | 273.6sp 346 | 274.4sp 347 | 275.19998sp 348 | 276.0sp 349 | 276.8sp 350 | 277.6sp 351 | 278.4sp 352 | 279.2sp 353 | 280.0sp 354 | 280.8sp 355 | 281.6sp 356 | 282.4sp 357 | 283.2sp 358 | 284.0sp 359 | 284.8sp 360 | 285.6sp 361 | 286.4sp 362 | 287.2sp 363 | 288.0sp 364 | 288.80002sp 365 | 289.6sp 366 | 290.4sp 367 | 291.19998sp 368 | 292.0sp 369 | 292.80002sp 370 | 293.6sp 371 | 294.4sp 372 | 295.2sp 373 | 296.0sp 374 | 296.8sp 375 | 297.6sp 376 | 298.4sp 377 | 299.2sp 378 | 300.0sp 379 | 300.80002sp 380 | 301.6sp 381 | 302.4sp 382 | 303.19998sp 383 | 304.0sp 384 | 304.80002sp 385 | 305.59998sp 386 | 306.4sp 387 | 307.2sp 388 | 308.0sp 389 | 308.80002sp 390 | 309.59998sp 391 | 310.4sp 392 | 311.2sp 393 | 312.0sp 394 | 312.8sp 395 | 313.6sp 396 | 314.4sp 397 | 315.2sp 398 | 316.0sp 399 | 316.8sp 400 | 317.6sp 401 | 318.4sp 402 | 319.2sp 403 | 320.00003sp 404 | 320.8sp 405 | 321.6sp 406 | 322.4sp 407 | 323.2sp 408 | 324.0sp 409 | 324.8sp 410 | 325.6sp 411 | 326.40002sp 412 | 327.19998sp 413 | 328.0sp 414 | 328.8sp 415 | 329.6sp 416 | 330.40002sp 417 | 331.19998sp 418 | 332.0sp 419 | 332.8sp 420 | 333.6sp 421 | 334.40002sp 422 | 335.19998sp 423 | 336.0sp 424 | 336.80002sp 425 | 337.6sp 426 | 338.4sp 427 | 339.19998sp 428 | 340.0sp 429 | 340.80002sp 430 | 341.59998sp 431 | 342.4sp 432 | 343.2sp 433 | 344.0sp 434 | 344.80002sp 435 | 345.59998sp 436 | 346.4sp 437 | 347.2sp 438 | 348.0sp 439 | 348.80002sp 440 | 349.6sp 441 | 350.4sp 442 | 351.2sp 443 | 352.0sp 444 | 352.8sp 445 | 353.6sp 446 | 354.4sp 447 | 355.2sp 448 | 355.99997sp 449 | 356.8sp 450 | 357.6sp 451 | 358.4sp 452 | 359.2sp 453 | 360.0sp 454 | 360.8sp 455 | 361.6sp 456 | 362.4sp 457 | 363.2sp 458 | 364.0sp 459 | 364.8sp 460 | 365.6sp 461 | 366.40002sp 462 | 367.19998sp 463 | 368.0sp 464 | 368.8sp 465 | 369.6sp 466 | 370.40002sp 467 | 371.19998sp 468 | 372.0sp 469 | 372.80002sp 470 | 373.6sp 471 | 374.4sp 472 | 375.19998sp 473 | 376.0sp 474 | 376.80002sp 475 | 377.59998sp 476 | 378.4sp 477 | 379.2sp 478 | 380.0sp 479 | 380.80002sp 480 | 381.59998sp 481 | 382.4sp 482 | 383.2sp 483 | 384.0sp 484 | 384.80002sp 485 | 385.59998sp 486 | 386.4sp 487 | 387.2sp 488 | 388.0sp 489 | 388.8sp 490 | 389.6sp 491 | 390.4sp 492 | 391.2sp 493 | 391.99997sp 494 | 392.8sp 495 | 393.6sp 496 | 394.4sp 497 | 395.2sp 498 | 396.00003sp 499 | 396.8sp 500 | 397.6sp 501 | 398.4sp 502 | 399.2sp 503 | 400.0sp 504 | 400.8sp 505 | 401.6sp 506 | 402.40002sp 507 | 403.19998sp 508 | 404.0sp 509 | 404.8sp 510 | 405.6sp 511 | 406.40002sp 512 | 407.19998sp 513 | 408.0sp 514 | 408.80002sp 515 | 409.6sp 516 | 410.40002sp 517 | 411.19998sp 518 | 412.0sp 519 | 412.80002sp 520 | 413.6sp 521 | 414.4sp 522 | 415.19998sp 523 | 416.0sp 524 | 416.80002sp 525 | 417.59998sp 526 | 418.4sp 527 | 419.2sp 528 | 420.0sp 529 | 420.80002sp 530 | 421.59998sp 531 | 422.4sp 532 | 423.2sp 533 | 424.0sp 534 | 424.8sp 535 | 425.6sp 536 | 426.4sp 537 | 427.2sp 538 | 428.0sp 539 | 428.8sp 540 | 429.6sp 541 | 430.4sp 542 | 431.2sp 543 | 432.00003sp 544 | 432.8sp 545 | 433.6sp 546 | 434.4sp 547 | 435.2sp 548 | 436.0sp 549 | 436.8sp 550 | 437.6sp 551 | 438.4sp 552 | 439.19998sp 553 | 440.0sp 554 | 440.8sp 555 | 441.6sp 556 | 442.40002sp 557 | 443.19998sp 558 | 444.0sp 559 | 444.8sp 560 | 445.6sp 561 | 446.40002sp 562 | 447.19998sp 563 | 448.0sp 564 | 448.80002sp 565 | 449.6sp 566 | 450.4sp 567 | 451.19998sp 568 | 452.0sp 569 | 452.80002sp 570 | 453.59998sp 571 | 454.4sp 572 | 455.2sp 573 | 456.0sp 574 | 456.80002sp 575 | 457.59998sp 576 | 458.4sp 577 | 459.2sp 578 | 460.0sp 579 | 460.80002sp 580 | 461.6sp 581 | 462.4sp 582 | 463.2sp 583 | 464.0sp 584 | 464.8sp 585 | 465.6sp 586 | 466.4sp 587 | 467.2sp 588 | 467.99997sp 589 | 468.8sp 590 | 469.6sp 591 | 470.4sp 592 | 471.2sp 593 | 472.0sp 594 | 472.8sp 595 | 473.6sp 596 | 474.4sp 597 | 475.2sp 598 | 476.0sp 599 | 476.8sp 600 | 477.6sp 601 | 478.40002sp 602 | 479.19998sp 603 | 480.0sp 604 | 480.8sp 605 | 481.6sp 606 | 482.40002sp 607 | 483.19998sp 608 | 484.0sp 609 | 484.80002sp 610 | 485.6sp 611 | 486.4sp 612 | 487.19998sp 613 | 488.0sp 614 | 488.80002sp 615 | 489.59998sp 616 | 490.4sp 617 | 491.19998sp 618 | 492.0sp 619 | 492.80002sp 620 | 493.59998sp 621 | 494.4sp 622 | 495.2sp 623 | 496.0sp 624 | 496.80002sp 625 | 497.59998sp 626 | 498.4sp 627 | 499.2sp 628 | 500.0sp 629 | 500.8sp 630 | 501.6sp 631 | 502.4sp 632 | 503.2sp 633 | 503.99997sp 634 | 504.8sp 635 | 505.6sp 636 | 506.4sp 637 | 507.2sp 638 | 508.00003sp 639 | 508.8sp 640 | 509.6sp 641 | 510.4sp 642 | 511.2sp 643 | 512.0sp 644 | 512.8sp 645 | 513.6sp 646 | 514.4sp 647 | 515.2sp 648 | 516.0sp 649 | 516.8sp 650 | 517.6sp 651 | 518.4sp 652 | 519.2sp 653 | 520.0sp 654 | 520.8sp 655 | 521.6sp 656 | 522.4sp 657 | 523.2sp 658 | 524.0sp 659 | 524.8sp 660 | 525.6sp 661 | 526.4sp 662 | 527.2sp 663 | 528.0sp 664 | 528.8sp 665 | 529.6sp 666 | 530.4sp 667 | 531.2sp 668 | 532.0sp 669 | 532.8sp 670 | 533.6sp 671 | 534.4sp 672 | 535.2sp 673 | 536.0sp 674 | 536.8sp 675 | 537.60004sp 676 | 538.4sp 677 | 539.2sp 678 | 540.0sp 679 | 540.8sp 680 | 541.60004sp 681 | 542.39996sp 682 | 543.2sp 683 | 544.0sp 684 | 544.8sp 685 | 545.60004sp 686 | 546.39996sp 687 | 547.2sp 688 | 548.0sp 689 | 548.8sp 690 | 549.6sp 691 | 550.39996sp 692 | 551.2sp 693 | 552.0sp 694 | 552.8sp 695 | 553.6sp 696 | 554.4sp 697 | 555.2sp 698 | 556.0sp 699 | 556.8sp 700 | 557.6sp 701 | 558.4sp 702 | 559.2sp 703 | 560.0sp 704 | 560.8sp 705 | 561.6sp 706 | 562.4sp 707 | 563.2sp 708 | 564.0sp 709 | 564.8sp 710 | 565.6sp 711 | 566.4sp 712 | 567.2sp 713 | 568.0sp 714 | 568.8sp 715 | 569.6sp 716 | 570.4sp 717 | 571.2sp 718 | 572.0sp 719 | 572.8sp 720 | 573.6sp 721 | 574.4sp 722 | 575.2sp 723 | 576.0sp 724 | 576.8sp 725 | 577.60004sp 726 | 578.39996sp 727 | 579.2sp 728 | 580.0sp 729 | 580.8sp 730 | 581.60004sp 731 | 582.39996sp 732 | 583.2sp 733 | 584.0sp 734 | 584.8sp 735 | 585.60004sp 736 | 586.39996sp 737 | 587.2sp 738 | 588.0sp 739 | 588.8sp 740 | 589.6sp 741 | 590.4sp 742 | 591.2sp 743 | 592.0sp 744 | 592.8sp 745 | 593.6sp 746 | 594.4sp 747 | 595.2sp 748 | 596.0sp 749 | 596.8sp 750 | 597.6sp 751 | 598.4sp 752 | 599.2sp 753 | 600.0sp 754 | 600.8sp 755 | 601.60004sp 756 | 602.39996sp 757 | 603.2sp 758 | 604.0sp 759 | 604.8sp 760 | 605.60004sp 761 | 606.39996sp 762 | 607.19995sp 763 | 608.0sp 764 | 608.8sp 765 | 609.60004sp 766 | 610.4sp 767 | 611.19995sp 768 | 612.0sp 769 | 612.8sp 770 | 613.60004sp 771 | 614.4sp 772 | 615.19995sp 773 | 616.0sp 774 | 616.8sp 775 | 617.60004sp 776 | 618.4sp 777 | 619.19995sp 778 | 620.0sp 779 | 620.8sp 780 | 621.60004sp 781 | 622.4sp 782 | 623.2sp 783 | 624.0sp 784 | 624.8sp 785 | 625.6sp 786 | 626.4sp 787 | 627.2sp 788 | 628.0sp 789 | 628.8sp 790 | 629.6sp 791 | 630.4sp 792 | 631.2sp 793 | 632.0sp 794 | 632.8sp 795 | 633.6sp 796 | 634.4sp 797 | 635.2sp 798 | 635.99994sp 799 | 636.8sp 800 | 637.6sp 801 | 638.4sp 802 | 639.2sp 803 | 640.00006sp 804 | 640.8sp 805 | 641.6sp 806 | 642.4sp 807 | 643.2sp 808 | 644.0sp 809 | 644.8sp 810 | 645.6sp 811 | 646.4sp 812 | 647.2sp 813 | 648.0sp 814 | 648.8sp 815 | 649.6sp 816 | 650.4sp 817 | 651.2sp 818 | 652.0sp 819 | 652.80005sp 820 | 653.6sp 821 | 654.39996sp 822 | 655.2sp 823 | 656.0sp 824 | 656.80005sp 825 | 657.6sp 826 | 658.39996sp 827 | 659.2sp 828 | 660.0sp 829 | 660.80005sp 830 | 661.6sp 831 | 662.39996sp 832 | 663.2sp 833 | 664.0sp 834 | 664.80005sp 835 | 665.6sp 836 | 666.39996sp 837 | 667.2sp 838 | 668.0sp 839 | 668.80005sp 840 | 669.60004sp 841 | 670.39996sp 842 | 671.2sp 843 | 672.0sp 844 | 672.8sp 845 | 673.60004sp 846 | 674.39996sp 847 | 675.2sp 848 | 676.0sp 849 | 676.8sp 850 | 677.60004sp 851 | 678.39996sp 852 | 679.19995sp 853 | 680.0sp 854 | 680.8sp 855 | 681.60004sp 856 | 682.39996sp 857 | 683.19995sp 858 | 684.0sp 859 | 684.8sp 860 | 685.60004sp 861 | 686.4sp 862 | 687.19995sp 863 | 688.0sp 864 | 688.8sp 865 | 689.60004sp 866 | 690.4sp 867 | 691.19995sp 868 | 692.0sp 869 | 692.8sp 870 | 693.60004sp 871 | 694.4sp 872 | 695.19995sp 873 | 696.0sp 874 | 696.8sp 875 | 697.60004sp 876 | 698.4sp 877 | 699.2sp 878 | 700.0sp 879 | 700.8sp 880 | 701.6sp 881 | 702.4sp 882 | 703.2sp 883 | 704.0sp 884 | 704.8sp 885 | 705.6sp 886 | 706.4sp 887 | 707.2sp 888 | 707.99994sp 889 | 708.8sp 890 | 709.6sp 891 | 710.4sp 892 | 711.2sp 893 | 711.99994sp 894 | 712.8sp 895 | 713.6sp 896 | 714.4sp 897 | 715.2sp 898 | 716.00006sp 899 | 716.8sp 900 | 717.6sp 901 | 718.4sp 902 | 719.2sp 903 | 720.0sp 904 | 720.8sp 905 | 721.6sp 906 | 722.4sp 907 | 723.2sp 908 | 724.0sp 909 | 724.8sp 910 | 725.6sp 911 | 726.4sp 912 | 727.2sp 913 | 728.0sp 914 | 728.80005sp 915 | 729.6sp 916 | 730.39996sp 917 | 731.2sp 918 | 732.0sp 919 | 732.80005sp 920 | 733.6sp 921 | 734.39996sp 922 | 735.2sp 923 | 736.0sp 924 | 736.80005sp 925 | 737.6sp 926 | 738.39996sp 927 | 739.2sp 928 | 740.0sp 929 | 740.80005sp 930 | 741.6sp 931 | 742.39996sp 932 | 743.2sp 933 | 744.0sp 934 | 744.80005sp 935 | 745.60004sp 936 | 746.39996sp 937 | 747.2sp 938 | 748.0sp 939 | 748.8sp 940 | 749.60004sp 941 | 750.39996sp 942 | 751.2sp 943 | 752.0sp 944 | 752.8sp 945 | 753.60004sp 946 | 754.39996sp 947 | 755.19995sp 948 | 756.0sp 949 | 756.8sp 950 | 757.60004sp 951 | 758.4sp 952 | 759.19995sp 953 | 760.0sp 954 | 760.8sp 955 | 761.60004sp 956 | 762.4sp 957 | 763.19995sp 958 | 764.0sp 959 | 764.8sp 960 | 765.60004sp 961 | 766.4sp 962 | 767.19995sp 963 | 768.0sp 964 | 768.8sp 965 | 769.60004sp 966 | 770.4sp 967 | 771.19995sp 968 | 772.0sp 969 | 772.8sp 970 | 773.6sp 971 | 774.4sp 972 | 775.2sp 973 | 776.0sp 974 | 776.8sp 975 | 777.6sp 976 | 778.4sp 977 | 779.2sp 978 | 780.0sp 979 | 780.8sp 980 | 781.6sp 981 | 782.4sp 982 | 783.2sp 983 | 783.99994sp 984 | 784.8sp 985 | 785.6sp 986 | 786.4sp 987 | 787.2sp 988 | 788.00006sp 989 | 788.8sp 990 | 789.6sp 991 | 790.4sp 992 | 791.2sp 993 | 792.00006sp 994 | 792.8sp 995 | 793.6sp 996 | 794.4sp 997 | 795.2sp 998 | 796.0sp 999 | 796.8sp 1000 | 797.6sp 1001 | 798.4sp 1002 | 799.2sp 1003 | 800.0sp 1004 | 1005 | -------------------------------------------------------------------------------- /common_size_w750_n1000/src/main/res/values-sw900dp/normal_dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0dp 4 | 1.1999999dp 5 | 2.3999999dp 6 | 3.6000001dp 7 | 4.7999997dp 8 | 6.0dp 9 | 7.2000003dp 10 | 8.4dp 11 | 9.599999dp 12 | 10.8dp 13 | 12.0dp 14 | 13.2dp 15 | 14.400001dp 16 | 15.599999dp 17 | 16.8dp 18 | 18.0dp 19 | 19.199999dp 20 | 20.4dp 21 | 21.6dp 22 | 22.800001dp 23 | 24.0dp 24 | 25.2dp 25 | 26.4dp 26 | 27.6dp 27 | 28.800001dp 28 | 30.000002dp 29 | 31.199999dp 30 | 32.399998dp 31 | 33.6dp 32 | 34.8dp 33 | 36.0dp 34 | 37.2dp 35 | 38.399998dp 36 | 39.6dp 37 | 40.8dp 38 | 42.0dp 39 | 43.2dp 40 | 44.4dp 41 | 45.600002dp 42 | 46.8dp 43 | 48.0dp 44 | 49.2dp 45 | 50.4dp 46 | 51.6dp 47 | 52.8dp 48 | 54.0dp 49 | 55.2dp 50 | 56.4dp 51 | 57.600002dp 52 | 58.800003dp 53 | 60.000004dp 54 | 61.200005dp 55 | 62.399998dp 56 | 63.6dp 57 | 64.799995dp 58 | 66.0dp 59 | 67.2dp 60 | 68.4dp 61 | 69.6dp 62 | 70.799995dp 63 | 72.0dp 64 | 73.2dp 65 | 74.4dp 66 | 75.6dp 67 | 76.799995dp 68 | 78.0dp 69 | 79.2dp 70 | 80.4dp 71 | 81.6dp 72 | 82.8dp 73 | 84.0dp 74 | 85.2dp 75 | 86.4dp 76 | 87.6dp 77 | 88.8dp 78 | 90.0dp 79 | 91.200005dp 80 | 92.4dp 81 | 93.6dp 82 | 94.8dp 83 | 96.0dp 84 | 97.200005dp 85 | 98.4dp 86 | 99.600006dp 87 | 100.8dp 88 | 102.0dp 89 | 103.2dp 90 | 104.399994dp 91 | 105.6dp 92 | 106.799995dp 93 | 108.0dp 94 | 109.2dp 95 | 110.4dp 96 | 111.6dp 97 | 112.8dp 98 | 114.0dp 99 | 115.200005dp 100 | 116.4dp 101 | 117.600006dp 102 | 118.8dp 103 | 120.00001dp 104 | 121.2dp 105 | 122.40001dp 106 | 123.6dp 107 | 124.799995dp 108 | 126.0dp 109 | 127.2dp 110 | 128.4dp 111 | 129.59999dp 112 | 130.8dp 113 | 132.0dp 114 | 133.2dp 115 | 134.4dp 116 | 135.6dp 117 | 136.8dp 118 | 138.0dp 119 | 139.2dp 120 | 140.40001dp 121 | 141.59999dp 122 | 142.8dp 123 | 144.0dp 124 | 145.2dp 125 | 146.4dp 126 | 147.6dp 127 | 148.8dp 128 | 150.0dp 129 | 151.2dp 130 | 152.40001dp 131 | 153.59999dp 132 | 154.8dp 133 | 156.0dp 134 | 157.20001dp 135 | 158.4dp 136 | 159.6dp 137 | 160.8dp 138 | 162.0dp 139 | 163.2dp 140 | 164.4dp 141 | 165.6dp 142 | 166.79999dp 143 | 168.0dp 144 | 169.2dp 145 | 170.4dp 146 | 171.59999dp 147 | 172.8dp 148 | 174.0dp 149 | 175.2dp 150 | 176.4dp 151 | 177.6dp 152 | 178.8dp 153 | 180.0dp 154 | 181.2dp 155 | 182.40001dp 156 | 183.59999dp 157 | 184.8dp 158 | 186.0dp 159 | 187.2dp 160 | 188.4dp 161 | 189.6dp 162 | 190.8dp 163 | 192.0dp 164 | 193.2dp 165 | 194.40001dp 166 | 195.6dp 167 | 196.8dp 168 | 198.0dp 169 | 199.20001dp 170 | 200.4dp 171 | 201.6dp 172 | 202.8dp 173 | 204.0dp 174 | 205.2dp 175 | 206.4dp 176 | 207.6dp 177 | 208.79999dp 178 | 210.0dp 179 | 211.2dp 180 | 212.4dp 181 | 213.59999dp 182 | 214.8dp 183 | 216.0dp 184 | 217.2dp 185 | 218.4dp 186 | 219.6dp 187 | 220.8dp 188 | 222.0dp 189 | 223.2dp 190 | 224.40001dp 191 | 225.6dp 192 | 226.8dp 193 | 228.0dp 194 | 229.2dp 195 | 230.40001dp 196 | 231.6dp 197 | 232.8dp 198 | 233.99998dp 199 | 235.20001dp 200 | 236.40001dp 201 | 237.6dp 202 | 238.79999dp 203 | 240.00002dp 204 | 241.20001dp 205 | 242.4dp 206 | 243.59999dp 207 | 244.80002dp 208 | 246.0dp 209 | 247.2dp 210 | 248.4dp 211 | 249.59999dp 212 | 250.8dp 213 | 252.0dp 214 | 253.2dp 215 | 254.4dp 216 | 255.6dp 217 | 256.8dp 218 | 258.0dp 219 | 259.19998dp 220 | 260.40002dp 221 | 261.6dp 222 | 262.8dp 223 | 264.0dp 224 | 265.2dp 225 | 266.4dp 226 | 267.6dp 227 | 268.8dp 228 | 270.0dp 229 | 271.2dp 230 | 272.4dp 231 | 273.6dp 232 | 274.80002dp 233 | 276.0dp 234 | 277.2dp 235 | 278.4dp 236 | 279.6dp 237 | 280.80002dp 238 | 282.0dp 239 | 283.19998dp 240 | 284.40002dp 241 | 285.6dp 242 | 286.8dp 243 | 288.0dp 244 | 289.19998dp 245 | 290.4dp 246 | 291.6dp 247 | 292.8dp 248 | 294.0dp 249 | 295.2dp 250 | 296.4dp 251 | 297.6dp 252 | 298.8dp 253 | 300.0dp 254 | 301.2dp 255 | 302.4dp 256 | 303.59998dp 257 | 304.80002dp 258 | 306.0dp 259 | 307.19998dp 260 | 308.4dp 261 | 309.6dp 262 | 310.80002dp 263 | 312.0dp 264 | 313.19998dp 265 | 314.40002dp 266 | 315.6dp 267 | 316.8dp 268 | 318.0dp 269 | 319.2dp 270 | 320.4dp 271 | 321.6dp 272 | 322.8dp 273 | 324.0dp 274 | 325.2dp 275 | 326.4dp 276 | 327.6dp 277 | 328.8dp 278 | 330.0dp 279 | 331.2dp 280 | 332.4dp 281 | 333.59998dp 282 | 334.80002dp 283 | 336.0dp 284 | 337.19998dp 285 | 338.4dp 286 | 339.6dp 287 | 340.8dp 288 | 342.0dp 289 | 343.19998dp 290 | 344.40002dp 291 | 345.6dp 292 | 346.8dp 293 | 348.0dp 294 | 349.2dp 295 | 350.4dp 296 | 351.6dp 297 | 352.8dp 298 | 354.0dp 299 | 355.2dp 300 | 356.4dp 301 | 357.6dp 302 | 358.80002dp 303 | 360.0dp 304 | 361.2dp 305 | 362.4dp 306 | 363.6dp 307 | 364.80002dp 308 | 366.0dp 309 | 367.19998dp 310 | 368.4dp 311 | 369.6dp 312 | 370.8dp 313 | 372.0dp 314 | 373.19998dp 315 | 374.4dp 316 | 375.6dp 317 | 376.8dp 318 | 378.0dp 319 | 379.2dp 320 | 380.4dp 321 | 381.6dp 322 | 382.8dp 323 | 384.0dp 324 | 385.2dp 325 | 386.4dp 326 | 387.59998dp 327 | 388.80002dp 328 | 390.0dp 329 | 391.2dp 330 | 392.4dp 331 | 393.6dp 332 | 394.80002dp 333 | 396.0dp 334 | 397.19998dp 335 | 398.40002dp 336 | 399.6dp 337 | 400.8dp 338 | 402.0dp 339 | 403.2dp 340 | 404.4dp 341 | 405.6dp 342 | 406.8dp 343 | 408.0dp 344 | 409.2dp 345 | 410.4dp 346 | 411.6dp 347 | 412.8dp 348 | 414.0dp 349 | 415.2dp 350 | 416.4dp 351 | 417.59998dp 352 | 418.80002dp 353 | 420.0dp 354 | 421.19998dp 355 | 422.4dp 356 | 423.6dp 357 | 424.8dp 358 | 426.0dp 359 | 427.19998dp 360 | 428.40002dp 361 | 429.6dp 362 | 430.8dp 363 | 432.0dp 364 | 433.2dp 365 | 434.4dp 366 | 435.6dp 367 | 436.8dp 368 | 438.0dp 369 | 439.2dp 370 | 440.4dp 371 | 441.6dp 372 | 442.80002dp 373 | 444.0dp 374 | 445.2dp 375 | 446.4dp 376 | 447.6dp 377 | 448.80002dp 378 | 450.0dp 379 | 451.2dp 380 | 452.4dp 381 | 453.6dp 382 | 454.8dp 383 | 456.0dp 384 | 457.2dp 385 | 458.4dp 386 | 459.6dp 387 | 460.80002dp 388 | 462.0dp 389 | 463.2dp 390 | 464.39996dp 391 | 465.6dp 392 | 466.80002dp 393 | 467.99997dp 394 | 469.2dp 395 | 470.40002dp 396 | 471.59998dp 397 | 472.80002dp 398 | 473.99997dp 399 | 475.2dp 400 | 476.40002dp 401 | 477.59998dp 402 | 478.80002dp 403 | 480.00003dp 404 | 481.19998dp 405 | 482.40002dp 406 | 483.59998dp 407 | 484.8dp 408 | 486.00003dp 409 | 487.19998dp 410 | 488.4dp 411 | 489.60004dp 412 | 490.8dp 413 | 492.0dp 414 | 493.19998dp 415 | 494.4dp 416 | 495.6dp 417 | 496.8dp 418 | 498.0dp 419 | 499.19998dp 420 | 500.4dp 421 | 501.6dp 422 | 502.8dp 423 | 504.0dp 424 | 505.2dp 425 | 506.4dp 426 | 507.6dp 427 | 508.8dp 428 | 510.0dp 429 | 511.2dp 430 | 512.39996dp 431 | 513.6dp 432 | 514.80005dp 433 | 516.0dp 434 | 517.2dp 435 | 518.39996dp 436 | 519.6dp 437 | 520.80005dp 438 | 522.0dp 439 | 523.2dp 440 | 524.4dp 441 | 525.6dp 442 | 526.8dp 443 | 528.0dp 444 | 529.2dp 445 | 530.4dp 446 | 531.6dp 447 | 532.8dp 448 | 534.0dp 449 | 535.2dp 450 | 536.4dp 451 | 537.6dp 452 | 538.8dp 453 | 540.0dp 454 | 541.2dp 455 | 542.4dp 456 | 543.6dp 457 | 544.8dp 458 | 546.0dp 459 | 547.2dp 460 | 548.4dp 461 | 549.60004dp 462 | 550.8dp 463 | 552.0dp 464 | 553.19995dp 465 | 554.4dp 466 | 555.60004dp 467 | 556.8dp 468 | 558.0dp 469 | 559.2dp 470 | 560.39996dp 471 | 561.60004dp 472 | 562.8dp 473 | 564.0dp 474 | 565.2dp 475 | 566.39996dp 476 | 567.6dp 477 | 568.80005dp 478 | 570.0dp 479 | 571.2dp 480 | 572.39996dp 481 | 573.6dp 482 | 574.80005dp 483 | 576.0dp 484 | 577.2dp 485 | 578.39996dp 486 | 579.6dp 487 | 580.8dp 488 | 582.0dp 489 | 583.2dp 490 | 584.4dp 491 | 585.6dp 492 | 586.8dp 493 | 588.0dp 494 | 589.2dp 495 | 590.4dp 496 | 591.6dp 497 | 592.8dp 498 | 594.0dp 499 | 595.2dp 500 | 596.4dp 501 | 597.6dp 502 | 598.8dp 503 | 600.0dp 504 | 601.2dp 505 | 602.4dp 506 | 603.60004dp 507 | 604.8dp 508 | 606.0dp 509 | 607.19995dp 510 | 608.4dp 511 | 609.60004dp 512 | 610.8dp 513 | 612.0dp 514 | 613.2dp 515 | 614.39996dp 516 | 615.60004dp 517 | 616.8dp 518 | 618.0dp 519 | 619.2dp 520 | 620.39996dp 521 | 621.60004dp 522 | 622.8dp 523 | 624.0dp 524 | 625.2dp 525 | 626.39996dp 526 | 627.6dp 527 | 628.80005dp 528 | 630.0dp 529 | 631.2dp 530 | 632.39996dp 531 | 633.6dp 532 | 634.8dp 533 | 636.0dp 534 | 637.2dp 535 | 638.4dp 536 | 639.6dp 537 | 640.8dp 538 | 642.0dp 539 | 643.2dp 540 | 644.4dp 541 | 645.6dp 542 | 646.8dp 543 | 648.0dp 544 | 649.2dp 545 | 650.4dp 546 | 651.6dp 547 | 652.8dp 548 | 654.0dp 549 | 655.2dp 550 | 656.4dp 551 | 657.6dp 552 | 658.8dp 553 | 660.0dp 554 | 661.19995dp 555 | 662.4dp 556 | 663.60004dp 557 | 664.8dp 558 | 666.0dp 559 | 667.19995dp 560 | 668.4dp 561 | 669.60004dp 562 | 670.8dp 563 | 672.0dp 564 | 673.2dp 565 | 674.39996dp 566 | 675.60004dp 567 | 676.8dp 568 | 678.0dp 569 | 679.2dp 570 | 680.39996dp 571 | 681.6dp 572 | 682.80005dp 573 | 684.0dp 574 | 685.2dp 575 | 686.39996dp 576 | 687.6dp 577 | 688.80005dp 578 | 690.0dp 579 | 691.2dp 580 | 692.4dp 581 | 693.6dp 582 | 694.8dp 583 | 696.0dp 584 | 697.2dp 585 | 698.4dp 586 | 699.6dp 587 | 700.8dp 588 | 702.0dp 589 | 703.2dp 590 | 704.4dp 591 | 705.6dp 592 | 706.8dp 593 | 708.0dp 594 | 709.2dp 595 | 710.4dp 596 | 711.6dp 597 | 712.8dp 598 | 714.0dp 599 | 715.2dp 600 | 716.4dp 601 | 717.60004dp 602 | 718.8dp 603 | 720.0dp 604 | 721.19995dp 605 | 722.4dp 606 | 723.60004dp 607 | 724.8dp 608 | 726.0dp 609 | 727.2dp 610 | 728.39996dp 611 | 729.60004dp 612 | 730.8dp 613 | 732.0dp 614 | 733.2dp 615 | 734.39996dp 616 | 735.60004dp 617 | 736.8dp 618 | 738.0dp 619 | 739.2dp 620 | 740.39996dp 621 | 741.6dp 622 | 742.80005dp 623 | 744.0dp 624 | 745.2dp 625 | 746.39996dp 626 | 747.6dp 627 | 748.8dp 628 | 750.0dp 629 | 751.2dp 630 | 752.4dp 631 | 753.6dp 632 | 754.8dp 633 | 756.0dp 634 | 757.2dp 635 | 758.4dp 636 | 759.6dp 637 | 760.8dp 638 | 762.0dp 639 | 763.2dp 640 | 764.4dp 641 | 765.6dp 642 | 766.8dp 643 | 768.0dp 644 | 769.2dp 645 | 770.4dp 646 | 771.60004dp 647 | 772.8dp 648 | 774.0dp 649 | 775.19995dp 650 | 776.4dp 651 | 777.60004dp 652 | 778.8dp 653 | 780.0dp 654 | 781.19995dp 655 | 782.4dp 656 | 783.60004dp 657 | 784.8dp 658 | 786.0dp 659 | 787.2dp 660 | 788.39996dp 661 | 789.60004dp 662 | 790.8dp 663 | 792.0dp 664 | 793.2dp 665 | 794.39996dp 666 | 795.6dp 667 | 796.80005dp 668 | 798.0dp 669 | 799.2dp 670 | 800.39996dp 671 | 801.6dp 672 | 802.8dp 673 | 804.0dp 674 | 805.2dp 675 | 806.4dp 676 | 807.6dp 677 | 808.8dp 678 | 810.0dp 679 | 811.2dp 680 | 812.4dp 681 | 813.6dp 682 | 814.8dp 683 | 816.0dp 684 | 817.2dp 685 | 818.4dp 686 | 819.6dp 687 | 820.8dp 688 | 822.0dp 689 | 823.2dp 690 | 824.4dp 691 | 825.6dp 692 | 826.8dp 693 | 828.0dp 694 | 829.19995dp 695 | 830.4dp 696 | 831.60004dp 697 | 832.8dp 698 | 834.0dp 699 | 835.19995dp 700 | 836.4dp 701 | 837.60004dp 702 | 838.8dp 703 | 840.0dp 704 | 841.2dp 705 | 842.39996dp 706 | 843.60004dp 707 | 844.8dp 708 | 846.0dp 709 | 847.2dp 710 | 848.39996dp 711 | 849.6dp 712 | 850.80005dp 713 | 852.0dp 714 | 853.2dp 715 | 854.39996dp 716 | 855.6dp 717 | 856.80005dp 718 | 858.0dp 719 | 859.2dp 720 | 860.39996dp 721 | 861.6dp 722 | 862.8dp 723 | 864.0dp 724 | 865.2dp 725 | 866.4dp 726 | 867.6dp 727 | 868.8dp 728 | 870.0dp 729 | 871.2dp 730 | 872.4dp 731 | 873.6dp 732 | 874.8dp 733 | 876.0dp 734 | 877.2dp 735 | 878.4dp 736 | 879.6dp 737 | 880.8dp 738 | 882.0dp 739 | 883.2dp 740 | 884.4dp 741 | 885.60004dp 742 | 886.8dp 743 | 888.0dp 744 | 889.19995dp 745 | 890.4dp 746 | 891.60004dp 747 | 892.8dp 748 | 894.0dp 749 | 895.2dp 750 | 896.39996dp 751 | 897.60004dp 752 | 898.8dp 753 | 900.0dp 754 | 901.2dp 755 | 902.4dp 756 | 903.6dp 757 | 904.8dp 758 | 906.0dp 759 | 907.2dp 760 | 908.4dp 761 | 909.6dp 762 | 910.8dp 763 | 912.0dp 764 | 913.2dp 765 | 914.4dp 766 | 915.60004dp 767 | 916.8dp 768 | 918.0dp 769 | 919.2dp 770 | 920.4dp 771 | 921.60004dp 772 | 922.7999dp 773 | 924.0dp 774 | 925.2dp 775 | 926.4dp 776 | 927.60004dp 777 | 928.7999dp 778 | 930.0dp 779 | 931.2dp 780 | 932.4dp 781 | 933.60004dp 782 | 934.80005dp 783 | 935.99994dp 784 | 937.2dp 785 | 938.4dp 786 | 939.60004dp 787 | 940.80005dp 788 | 941.99994dp 789 | 943.19995dp 790 | 944.4dp 791 | 945.60004dp 792 | 946.80005dp 793 | 947.99994dp 794 | 949.19995dp 795 | 950.4dp 796 | 951.60004dp 797 | 952.80005dp 798 | 953.99994dp 799 | 955.19995dp 800 | 956.39996dp 801 | 957.60004dp 802 | 958.80005dp 803 | 960.00006dp 804 | 961.19995dp 805 | 962.39996dp 806 | 963.6dp 807 | 964.80005dp 808 | 966.00006dp 809 | 967.19995dp 810 | 968.39996dp 811 | 969.6dp 812 | 970.80005dp 813 | 972.00006dp 814 | 973.19995dp 815 | 974.39996dp 816 | 975.6dp 817 | 976.8dp 818 | 978.00006dp 819 | 979.2001dp 820 | 980.39996dp 821 | 981.6dp 822 | 982.8dp 823 | 984.0dp 824 | 985.2001dp 825 | 986.39996dp 826 | 987.6dp 827 | 988.8dp 828 | 990.0dp 829 | 991.2dp 830 | 992.39996dp 831 | 993.6dp 832 | 994.8dp 833 | 996.0dp 834 | 997.2dp 835 | 998.39996dp 836 | 999.6dp 837 | 1000.8dp 838 | 1002.0dp 839 | 1003.2dp 840 | 1004.4dp 841 | 1005.6dp 842 | 1006.8dp 843 | 1008.0dp 844 | 1009.2dp 845 | 1010.4dp 846 | 1011.6dp 847 | 1012.8dp 848 | 1014.0dp 849 | 1015.2dp 850 | 1016.4dp 851 | 1017.6dp 852 | 1018.8dp 853 | 1020.0dp 854 | 1021.2dp 855 | 1022.4dp 856 | 1023.6dp 857 | 1024.7999dp 858 | 1026.0dp 859 | 1027.2dp 860 | 1028.4dp 861 | 1029.6001dp 862 | 1030.7999dp 863 | 1032.0dp 864 | 1033.2dp 865 | 1034.4dp 866 | 1035.6001dp 867 | 1036.7999dp 868 | 1038.0dp 869 | 1039.2dp 870 | 1040.4dp 871 | 1041.6001dp 872 | 1042.7999dp 873 | 1044.0dp 874 | 1045.2dp 875 | 1046.4dp 876 | 1047.6dp 877 | 1048.8dp 878 | 1050.0dp 879 | 1051.2dp 880 | 1052.4dp 881 | 1053.6dp 882 | 1054.8dp 883 | 1056.0dp 884 | 1057.2dp 885 | 1058.4dp 886 | 1059.6dp 887 | 1060.8dp 888 | 1062.0dp 889 | 1063.2dp 890 | 1064.4dp 891 | 1065.6dp 892 | 1066.8dp 893 | 1068.0dp 894 | 1069.2dp 895 | 1070.4dp 896 | 1071.6dp 897 | 1072.8dp 898 | 1074.0dp 899 | 1075.2dp 900 | 1076.4dp 901 | 1077.6dp 902 | 1078.8dp 903 | 1080.0dp 904 | 1081.2dp 905 | 1082.4dp 906 | 1083.6dp 907 | 1084.8dp 908 | 1086.0dp 909 | 1087.2dp 910 | 1088.4dp 911 | 1089.6dp 912 | 1090.8dp 913 | 1092.0dp 914 | 1093.2001dp 915 | 1094.4dp 916 | 1095.6dp 917 | 1096.8dp 918 | 1098.0dp 919 | 1099.2001dp 920 | 1100.3999dp 921 | 1101.6dp 922 | 1102.8dp 923 | 1104.0dp 924 | 1105.2001dp 925 | 1106.3999dp 926 | 1107.6dp 927 | 1108.8dp 928 | 1110.0dp 929 | 1111.2001dp 930 | 1112.3999dp 931 | 1113.6dp 932 | 1114.8dp 933 | 1116.0dp 934 | 1117.2001dp 935 | 1118.4dp 936 | 1119.6dp 937 | 1120.7999dp 938 | 1122.0dp 939 | 1123.2001dp 940 | 1124.4dp 941 | 1125.6dp 942 | 1126.7999dp 943 | 1128.0dp 944 | 1129.2001dp 945 | 1130.4dp 946 | 1131.6dp 947 | 1132.7999dp 948 | 1134.0dp 949 | 1135.2dp 950 | 1136.4dp 951 | 1137.6001dp 952 | 1138.7999dp 953 | 1140.0dp 954 | 1141.2dp 955 | 1142.4dp 956 | 1143.6001dp 957 | 1144.7999dp 958 | 1146.0dp 959 | 1147.2dp 960 | 1148.4dp 961 | 1149.6001dp 962 | 1150.7999dp 963 | 1152.0dp 964 | 1153.2dp 965 | 1154.4dp 966 | 1155.6dp 967 | 1156.7999dp 968 | 1158.0dp 969 | 1159.2dp 970 | 1160.4dp 971 | 1161.6dp 972 | 1162.8dp 973 | 1164.0dp 974 | 1165.2dp 975 | 1166.4dp 976 | 1167.6dp 977 | 1168.8dp 978 | 1170.0dp 979 | 1171.2dp 980 | 1172.4dp 981 | 1173.6dp 982 | 1174.8dp 983 | 1176.0dp 984 | 1177.2dp 985 | 1178.4dp 986 | 1179.6dp 987 | 1180.8dp 988 | 1182.0dp 989 | 1183.2dp 990 | 1184.4dp 991 | 1185.6dp 992 | 1186.8dp 993 | 1188.0dp 994 | 1189.2dp 995 | 1190.4dp 996 | 1191.6dp 997 | 1192.8dp 998 | 1194.0dp 999 | 1195.2dp 1000 | 1196.4dp 1001 | 1197.6dp 1002 | 1198.8dp 1003 | 1200.0dp 1004 | 1005 | -------------------------------------------------------------------------------- /common_size_w750_n1334/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /common_size_w750_n1334/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 27 5 | 6 | defaultConfig { 7 | minSdkVersion 15 8 | targetSdkVersion 27 9 | versionCode 1 10 | versionName "1.0" 11 | } 12 | 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | //compile fileTree(dir: 'libs', include: ['*.jar']) 23 | } 24 | 25 | apply from: '../jitpack.gradle' 26 | -------------------------------------------------------------------------------- /common_size_w750_n1334/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /common_size_w750_n1334/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /common_size_w750_n1334/src/main/java/com/licheedev/commonsize/CommonSize.java: -------------------------------------------------------------------------------- 1 | package com.licheedev.commonsize; 2 | 3 | import android.content.Context; 4 | import android.content.res.Resources; 5 | import android.util.TypedValue; 6 | import android.widget.TextView; 7 | 8 | /** 9 | * 辅助工具 10 | */ 11 | 12 | public class CommonSize { 13 | 14 | /** 15 | * 获取尺寸资源对应的像素 16 | * 17 | * @param resources 18 | * @param resId 19 | * @return 20 | */ 21 | public static float getPx(Resources resources, int resId) { 22 | return resources.getDimension(resId); 23 | } 24 | 25 | /** 26 | * 获取尺寸资源对应的像素 27 | * 28 | * @param context 29 | * @param resId 30 | * @return 31 | */ 32 | public static float getPx(Context context, int resId) { 33 | return getPx(context.getResources(), resId); 34 | } 35 | 36 | /** 37 | * 应用TextView字体大小 38 | * 39 | * @param textView 40 | * @param resId 41 | */ 42 | public static void applyTextSize(TextView textView, int resId) { 43 | float pixel = getPx(textView.getResources(), resId); 44 | textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, pixel); 45 | } 46 | 47 | /** 48 | * dp转px 49 | * 50 | * @param resources 51 | * @param dp 52 | * @return 53 | */ 54 | public static float dp2px(Resources resources, float dp) { 55 | return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, 56 | resources.getDisplayMetrics()); 57 | } 58 | 59 | /** 60 | * sp转px 61 | * 62 | * @param context 63 | * @param sp 64 | * @return 65 | */ 66 | public static int sp2px(Context context, float sp) { 67 | return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, sp, 68 | context.getResources().getDisplayMetrics()); 69 | } 70 | 71 | /** 72 | * px转dp 73 | * 74 | * @param context 75 | * @param px 76 | * @return 77 | */ 78 | public static float px2dp(Context context, float px) { 79 | final float scale = context.getResources().getDisplayMetrics().density; 80 | return (px / scale); 81 | } 82 | 83 | /** 84 | * px转sp 85 | * 86 | * @param context 87 | * @param px 88 | * @return 89 | */ 90 | public static float px2sp(Context context, float px) { 91 | return (px / context.getResources().getDisplayMetrics().scaledDensity); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /generator/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /generator/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java' 2 | 3 | dependencies { 4 | compile fileTree(dir: 'libs', include: ['*.jar']) 5 | } 6 | 7 | sourceCompatibility = "1.7" 8 | targetCompatibility = "1.7" 9 | -------------------------------------------------------------------------------- /generator/src/main/java/com/licheedev/commonsize/Config.java: -------------------------------------------------------------------------------- 1 | package com.licheedev.commonsize; 2 | 3 | import java.io.BufferedReader; 4 | import java.io.File; 5 | import java.io.FileInputStream; 6 | import java.io.FileReader; 7 | import java.io.IOException; 8 | import java.util.ArrayList; 9 | import java.util.List; 10 | import java.util.Properties; 11 | 12 | /** 13 | * Created by John on 2018/3/5. 14 | */ 15 | 16 | public class Config { 17 | 18 | public static final String XML_HEAD = ""; 19 | public static final String REPLACE_REG = "{reg}"; 20 | public static final String REPLACE_VALUE = "{value}"; 21 | public static final String DIMEN_DP_LINE = 22 | "" + REPLACE_VALUE + "dp"; 23 | public static final String DIMEN_SP_LINE = 24 | "" + REPLACE_VALUE + "sp"; 25 | 26 | public static final String RESOURCES_START = ""; 27 | public static final String RESOURCES_END = ""; 28 | 29 | public static final String TEMPLET = "templet"; 30 | public static final String RES_ROOT = "src/main/res"; 31 | 32 | public List outputConfigs; 33 | public String normalFileName = "normal_dp.xml"; 34 | public String negativeFileName = "negative_dp.xml"; 35 | public String spFileName = "normal_sp.xml"; 36 | public String intent = getBlank(4); 37 | public String normalResReg = "normal_{x}dp"; 38 | public String negativeResReg = "negative_{x}dp"; 39 | public String spResReg = "normal_{x}sp"; 40 | public boolean enableNegative = true; 41 | public boolean enableSp = true; 42 | public List swList; 43 | public boolean justDelete; 44 | 45 | public Config(File configPropertiesFile) { 46 | 47 | Properties properties = new Properties(); 48 | try { 49 | FileInputStream input = new FileInputStream(configPropertiesFile); 50 | properties.load(input); 51 | input.close(); 52 | } catch (IOException e) { 53 | //e.printStackTrace(); 54 | } 55 | 56 | String outputConfig = properties.getProperty("output_config", ""); 57 | String moduleNameReg = properties.getProperty("module_name_reg", ""); 58 | outputConfigs = OutputConfig.parseOutputConfigs(outputConfig, moduleNameReg); 59 | 60 | normalFileName = properties.getProperty("normal_file_name"); 61 | negativeFileName = properties.getProperty("negative_file_name"); 62 | spFileName = properties.getProperty("sp_file_name"); 63 | int intentLength = Integer.parseInt(properties.getProperty("intent_length", "4")); 64 | intent = getBlank(intentLength); 65 | normalResReg = properties.getProperty("normal_res_reg"); 66 | negativeResReg = properties.getProperty("negative_res_reg"); 67 | spResReg = properties.getProperty("sp_res_reg"); 68 | enableNegative = Boolean.parseBoolean(properties.getProperty("enable_negative", "true")); 69 | enableSp = Boolean.parseBoolean(properties.getProperty("enable_sp", "true")); 70 | 71 | String swListFile = properties.getProperty("smallest_width_list"); 72 | swList = parseSwList(new File(swListFile)); 73 | justDelete = Boolean.parseBoolean(properties.getProperty("just_delete", "false")); 74 | } 75 | 76 | private String getBlank(int length) { 77 | StringBuilder sb = new StringBuilder(); 78 | for (int i = 0; i < length; i++) { 79 | sb.append(" "); 80 | } 81 | return sb.toString(); 82 | } 83 | 84 | public static ArrayList parseSwList(File file) { 85 | ArrayList sizes = new ArrayList<>(); 86 | BufferedReader reader = null; 87 | try { 88 | reader = new BufferedReader(new FileReader(file)); 89 | String tmp; 90 | while ((tmp = reader.readLine()) != null) { 91 | if (tmp.startsWith("//")) { 92 | continue; 93 | } 94 | 95 | Integer size = -1; 96 | try { 97 | int _pos = tmp.indexOf("//"); 98 | if (_pos > 0) { 99 | size = Integer.parseInt(tmp.substring(0, _pos).trim()); 100 | } else { 101 | size = Integer.parseInt(tmp.trim()); 102 | } 103 | } catch (NumberFormatException e) { 104 | e.printStackTrace(); 105 | } 106 | 107 | if (size > 0) { 108 | sizes.add(size); 109 | } 110 | } 111 | } catch (IOException e) { 112 | // e.printStackTrace(); 113 | } finally { 114 | try { 115 | reader.close(); 116 | } catch (Exception e) { 117 | e.printStackTrace(); 118 | } 119 | } 120 | return sizes; 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /generator/src/main/java/com/licheedev/commonsize/FileUtil.java: -------------------------------------------------------------------------------- 1 | package com.licheedev.commonsize; 2 | 3 | import java.io.File; 4 | import java.io.FileInputStream; 5 | import java.io.FileOutputStream; 6 | import java.io.IOException; 7 | import java.nio.channels.FileChannel; 8 | 9 | /** 10 | * Created by John on 2018/3/5. 11 | */ 12 | 13 | public class FileUtil { 14 | 15 | public static void removeFile(File destFile) { 16 | if (destFile == null || !destFile.exists()) { 17 | return; 18 | } 19 | 20 | if (destFile.isDirectory()) { 21 | File[] files = destFile.listFiles(); 22 | if (files != null) { 23 | for (File file : files) { 24 | removeFile(file); 25 | } 26 | } 27 | } 28 | destFile.delete(); 29 | } 30 | 31 | public static void copyDir(File src, File dest) { 32 | 33 | if (src.isDirectory()) { 34 | 35 | if (!dest.exists()) { 36 | dest.mkdirs(); 37 | } 38 | 39 | File[] files = src.listFiles(); 40 | if (files != null) { 41 | for (File file : files) { 42 | copyDir(file, new File(dest, file.getName())); 43 | } 44 | } 45 | } else { 46 | copyFile(src, dest); 47 | } 48 | } 49 | 50 | public static void copyFile(File src, File dest) { 51 | 52 | FileInputStream fi = null; 53 | FileOutputStream fo = null; 54 | FileChannel in = null; 55 | FileChannel out = null; 56 | 57 | try { 58 | 59 | fi = new FileInputStream(src); 60 | fo = new FileOutputStream(dest); 61 | in = fi.getChannel();//得到对应的文件通道 62 | out = fo.getChannel();//得到对应的文件通道 63 | in.transferTo(0, in.size(), out);//连接两个通道,并且从in通道读取,然后写入out通道 64 | } catch (IOException e) { 65 | e.printStackTrace(); 66 | } finally { 67 | try { 68 | fi.close(); 69 | } catch (Exception e) { 70 | e.printStackTrace(); 71 | } 72 | 73 | try { 74 | in.close(); 75 | } catch (Exception e) { 76 | e.printStackTrace(); 77 | } 78 | 79 | try { 80 | fo.close(); 81 | } catch (Exception e) { 82 | e.printStackTrace(); 83 | } 84 | 85 | try { 86 | out.close(); 87 | } catch (Exception e) { 88 | e.printStackTrace(); 89 | } 90 | } 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /generator/src/main/java/com/licheedev/commonsize/Generator.java: -------------------------------------------------------------------------------- 1 | package com.licheedev.commonsize; 2 | 3 | import java.io.File; 4 | import java.io.FileWriter; 5 | import java.io.IOException; 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | 9 | public class Generator { 10 | 11 | public static void main(String[] args) throws Exception { 12 | 13 | Config config = new Config(new File("generator_config.properties")); 14 | 15 | Generator generator = new Generator(config); 16 | 17 | File templet = new File(Config.TEMPLET); 18 | 19 | List modules = new ArrayList<>(); 20 | modules.add("app"); 21 | modules.add("generator"); 22 | 23 | for (OutputConfig outputConfig : config.outputConfigs) { 24 | File destModule = new File(outputConfig.getModuleName()); 25 | 26 | FileUtil.removeFile(destModule); 27 | 28 | if (config.justDelete) { 29 | continue; 30 | } 31 | 32 | FileUtil.copyDir(templet, destModule); 33 | 34 | File resDir = new File(destModule, Config.RES_ROOT); 35 | // 先生成个默认的 36 | generator.generateFile(outputConfig, resDir, 0); 37 | // 再生成其他 38 | for (Integer integer : config.swList) { 39 | generator.generateFile(outputConfig, resDir, integer); 40 | } 41 | 42 | System.out.println(outputConfig); 43 | 44 | modules.add(outputConfig.getModuleName()); 45 | } 46 | 47 | File settingsGradle = new File("settings.gradle"); 48 | FileWriter settingsGradleWriter = new FileWriter(settingsGradle, false); 49 | 50 | for (String module : modules) { 51 | settingsGradleWriter.write(String.format("include ':%s'\n", module)); 52 | } 53 | settingsGradleWriter.flush(); 54 | } 55 | 56 | private final Config mConfig; 57 | 58 | public Generator(Config config) { 59 | mConfig = config; 60 | } 61 | 62 | private void generateFile(OutputConfig outputConfig, File resRoot, int smallestWidth) { 63 | 64 | File dir; 65 | 66 | if (smallestWidth > 0) { 67 | dir = new File(resRoot, "values-sw" + smallestWidth + "dp"); 68 | } else { 69 | dir = new File(resRoot, "values"); 70 | } 71 | 72 | if (!dir.exists()) { 73 | dir.mkdirs(); 74 | } 75 | 76 | // 正数 77 | File file = new File(dir, mConfig.normalFileName); 78 | String dimenReg = Config.DIMEN_DP_LINE.replace(Config.REPLACE_REG, mConfig.normalResReg); 79 | writeContent(outputConfig, file, dimenReg, smallestWidth, false); 80 | 81 | // 负数 82 | if (mConfig.enableNegative) { 83 | file = new File(dir, mConfig.negativeFileName); 84 | dimenReg = Config.DIMEN_DP_LINE.replace(Config.REPLACE_REG, mConfig.negativeResReg); 85 | writeContent(outputConfig, file, dimenReg, smallestWidth, true); 86 | } 87 | 88 | // sp 89 | if (mConfig.enableSp) { 90 | file = new File(dir, mConfig.spFileName); 91 | dimenReg = Config.DIMEN_SP_LINE.replace(Config.REPLACE_REG, mConfig.spResReg); 92 | writeContent(outputConfig, file, dimenReg, smallestWidth, false); 93 | } 94 | } 95 | 96 | private void writeContent(OutputConfig outputConfig, File file, String dimenReg, int smallLest, 97 | boolean negative) { 98 | StringBuilder sb = new StringBuilder(); 99 | sb.append(Config.XML_HEAD).append("\n").append(Config.RESOURCES_START).append("\n"); 100 | 101 | // 0 的时候 102 | sb.append(mConfig.intent) 103 | .append(dimenReg.replace("{x}", "" + 0).replace("{value}", "" + 0)) 104 | .append("\n"); 105 | 106 | // 最关键的步骤,就是算出 参考屏幕上每单位,对应屏幕上多少dp 107 | //float per = smallLest / (float) outputConfig.designWidth; 108 | //if (smallLest <= 0) { 109 | // // 如果是负数,则表示为默认的values目录,以360为标准 110 | // per = 360 / (float) outputConfig.designWidth; 111 | //} 112 | 113 | for (int i = 1; i <= outputConfig.itemAmount; i++) { 114 | 115 | float value; 116 | if (smallLest > 0) { 117 | value = i / (float) outputConfig.designWidth * smallLest; 118 | } else { 119 | value = i / (float) outputConfig.designWidth * 360; 120 | } 121 | 122 | if (negative) { 123 | sb.append(mConfig.intent) 124 | .append(dimenReg.replace("{x}", "" + i).replace("{value}", "-" + value)) 125 | .append("\n"); 126 | } else { 127 | sb.append(mConfig.intent) 128 | .append(dimenReg.replace("{x}", "" + i).replace("{value}", "" + value)) 129 | .append("\n"); 130 | } 131 | } 132 | sb.append(Config.RESOURCES_END).append("\n"); 133 | try { 134 | FileWriter writer = new FileWriter(file); 135 | writer.write(sb.toString()); 136 | writer.flush(); 137 | writer.close(); 138 | } catch (IOException e) { 139 | e.printStackTrace(); 140 | } 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /generator/src/main/java/com/licheedev/commonsize/OutputConfig.java: -------------------------------------------------------------------------------- 1 | package com.licheedev.commonsize; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | import java.util.regex.Matcher; 6 | import java.util.regex.Pattern; 7 | 8 | /** 9 | * Created by John on 2018/3/5. 10 | */ 11 | 12 | public class OutputConfig { 13 | 14 | public int designWidth; 15 | public int itemAmount; 16 | private String moduleNameReg; 17 | 18 | public OutputConfig(int designWidth, int itemAmount, String moduleNameReg) { 19 | this.designWidth = designWidth; 20 | this.itemAmount = itemAmount; 21 | this.moduleNameReg = moduleNameReg; 22 | } 23 | 24 | public String getModuleName() { 25 | 26 | String moduleName; 27 | if (moduleNameReg != null && moduleNameReg.contains("{w}") && moduleNameReg.contains( 28 | "{n}")) { 29 | moduleName = moduleNameReg.replace("{w}", "" + designWidth); 30 | moduleName = moduleName.replace("{n}", "" + itemAmount); 31 | // 再检查一遍 32 | if (!moduleName.contains("{w}") && !moduleName.contains("{n}")) { 33 | return moduleName; 34 | } 35 | } 36 | 37 | moduleName = "common_size_w" + designWidth + "_n" + itemAmount; 38 | 39 | return moduleName; 40 | } 41 | 42 | public static List parseOutputConfigs(String outputConfig, String moduleNameReg) { 43 | ArrayList outputConfigs = new ArrayList<>(); 44 | 45 | try { 46 | Pattern pattern = Pattern.compile("\\d+\\*\\d+"); 47 | Matcher matcher = pattern.matcher(outputConfig); 48 | while (matcher.find()) { 49 | String sizeStr = matcher.group(); 50 | String[] values = sizeStr.split("\\*"); 51 | int designWidth = Integer.parseInt(values[0]); 52 | int itemAmount = Integer.parseInt(values[1]); 53 | outputConfigs.add(new OutputConfig(designWidth, itemAmount, moduleNameReg)); 54 | } 55 | } catch (NumberFormatException e) { 56 | // e.printStackTrace(); 57 | } 58 | 59 | return outputConfigs; 60 | } 61 | 62 | @Override 63 | public String toString() { 64 | return "OutputConfig{" 65 | + "designWidth=" 66 | + designWidth 67 | + ", itemAmount=" 68 | + itemAmount 69 | + ", moduleNameReg='" 70 | + getModuleName() 71 | + '\'' 72 | + '}'; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /generator_config.properties: -------------------------------------------------------------------------------- 1 | # 输出配置,格式为w*n,其中w为参考宽度,美工的图给多少就填多少,n为dimen资源文件中,dimen条目的个数 2 | # 输出配置可以填多个,分别以英文逗号,隔开 3 | output_config=750*1000,750*1334,1080*1920,1080*1080 4 | # 模块名字规则,{w}为上面的参考宽度,{n}为上面的条目数目 5 | module_name_reg=common_size_w{w}_n{n} 6 | # 缩进空格长度 7 | intent_length=4 8 | # 正数尺寸文件名 9 | normal_file_name=normal_dp.xml 10 | # 正数资源命名规则,{x}为要替换的数值 11 | normal_res_reg=normal_{x}dp 12 | # 是否启用生成负数尺寸 13 | enable_negative=true 14 | # 负数尺寸文件名 15 | negative_file_name=negative_dp.xml 16 | # 负数资源命名规则,{x}为要替换的数值 17 | negative_res_reg=negative_{x}dp 18 | # 是否启用生成sp尺寸 19 | enable_sp=true 20 | # 其他配置文件名 21 | sp_file_name=normal_sp.xml 22 | # sp资源命名规则,{x}为要替换的数值 23 | sp_res_reg=normal_{x}sp 24 | # 最小宽度列表路径 25 | smallest_width_list=smallest_width_list.txt 26 | # 只删除目标module 27 | just_delete=false 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /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 | org.gradle.jvmargs=-Xmx1536m 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 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/licheedev/CommonSize/d25b4d9f3a616c44bdf41a3384cadb97bd3437cf/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Oct 08 19:57:47 CST 2020 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-6.1.1-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 | -------------------------------------------------------------------------------- /jitpack.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.github.dcendents.android-maven' 2 | 3 | group = 'com.github.licheedev' 4 | 5 | tasks.withType(JavaCompile) { 6 | options.encoding = "UTF-8" 7 | } 8 | 9 | task sourcesJar(type: Jar) { 10 | from android.sourceSets.main.java.srcDirs 11 | classifier = 'sources' 12 | } 13 | 14 | task javadoc(type: Javadoc) { 15 | failOnError false 16 | source = android.sourceSets.main.java.sourceFiles 17 | classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) 18 | classpath += configurations.compile 19 | } 20 | 21 | 22 | task javadocJar(type: Jar, dependsOn: javadoc) { 23 | classifier = 'javadoc' 24 | from javadoc.destinationDir 25 | } 26 | 27 | artifacts { 28 | archives sourcesJar 29 | archives javadocJar 30 | } -------------------------------------------------------------------------------- /pics/as_preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/licheedev/CommonSize/d25b4d9f3a616c44bdf41a3384cadb97bd3437cf/pics/as_preview.png -------------------------------------------------------------------------------- /pics/generator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/licheedev/CommonSize/d25b4d9f3a616c44bdf41a3384cadb97bd3437cf/pics/generator.png -------------------------------------------------------------------------------- /pics/mix2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/licheedev/CommonSize/d25b4d9f3a616c44bdf41a3384cadb97bd3437cf/pics/mix2.jpg -------------------------------------------------------------------------------- /pics/nexus7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/licheedev/CommonSize/d25b4d9f3a616c44bdf41a3384cadb97bd3437cf/pics/nexus7.png -------------------------------------------------------------------------------- /pics/nexus_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/licheedev/CommonSize/d25b4d9f3a616c44bdf41a3384cadb97bd3437cf/pics/nexus_4.png -------------------------------------------------------------------------------- /pics/nexus_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/licheedev/CommonSize/d25b4d9f3a616c44bdf41a3384cadb97bd3437cf/pics/nexus_9.png -------------------------------------------------------------------------------- /pics/pixel_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/licheedev/CommonSize/d25b4d9f3a616c44bdf41a3384cadb97bd3437cf/pics/pixel_c.png -------------------------------------------------------------------------------- /pics/rongyao8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/licheedev/CommonSize/d25b4d9f3a616c44bdf41a3384cadb97bd3437cf/pics/rongyao8.jpg -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | include ':generator' 3 | include ':common_size_w750_n1000' 4 | include ':common_size_w750_n1334' 5 | include ':common_size_w1080_n1920' 6 | include ':common_size_w1080_n1080' 7 | -------------------------------------------------------------------------------- /smallest_width_list.txt: -------------------------------------------------------------------------------- 1 | // 计算公式一般为 宽度像素*160/dpi 2 | 320 // 320*480(mdpi)、480*800(hdpi) 3 | 360 // 720*1280(xhdpi)、1080*1920(xxhdpi)、Galaxy Nexus、Nexus5、荣耀8 4 | 384 // 768*1280(xhdpi)、Nexus4 5 | 392 // Xiaomi Mix2 6 | 411 // 1080*1920(420dpi)、1440*2560(560dpi)、Nexus 5x、Nexus 6、Nexus 6p、Pixel xl 7 | 480 // 480*800(mdpi) 8 | 540 // 540*960(mdpi) 9 | 600 // 600*1024(mdpi)、1200*1920(xhdpi)、Nexus 7 10 | 720 // 1080*1920(8英寸) 11 | 768 // 768*1280(mdpi)、2048*1536(xhdpi)、Nexus 9 12 | 800 // 800*1280(mdpi)、2560*1600(xhdpi)、Nexus 10 13 | 900 // 900*1600(mdpi)、2560*1800(xhdpi)、Pixel C 14 | 1080 // 1080*1920(mpdi) 15 | -------------------------------------------------------------------------------- /templet/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /templet/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 27 5 | 6 | defaultConfig { 7 | minSdkVersion 15 8 | targetSdkVersion 27 9 | versionCode 1 10 | versionName "1.0" 11 | } 12 | 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | //compile fileTree(dir: 'libs', include: ['*.jar']) 23 | } 24 | 25 | apply from: '../jitpack.gradle' 26 | -------------------------------------------------------------------------------- /templet/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /templet/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /templet/src/main/java/com/licheedev/commonsize/CommonSize.java: -------------------------------------------------------------------------------- 1 | package com.licheedev.commonsize; 2 | 3 | import android.content.Context; 4 | import android.content.res.Resources; 5 | import android.util.TypedValue; 6 | import android.widget.TextView; 7 | 8 | /** 9 | * 辅助工具 10 | */ 11 | 12 | public class CommonSize { 13 | 14 | /** 15 | * 获取尺寸资源对应的像素 16 | * 17 | * @param resources 18 | * @param resId 19 | * @return 20 | */ 21 | public static float getPx(Resources resources, int resId) { 22 | return resources.getDimension(resId); 23 | } 24 | 25 | /** 26 | * 获取尺寸资源对应的像素 27 | * 28 | * @param context 29 | * @param resId 30 | * @return 31 | */ 32 | public static float getPx(Context context, int resId) { 33 | return getPx(context.getResources(), resId); 34 | } 35 | 36 | /** 37 | * 应用TextView字体大小 38 | * 39 | * @param textView 40 | * @param resId 41 | */ 42 | public static void applyTextSize(TextView textView, int resId) { 43 | float pixel = getPx(textView.getResources(), resId); 44 | textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, pixel); 45 | } 46 | 47 | /** 48 | * dp转px 49 | * 50 | * @param resources 51 | * @param dp 52 | * @return 53 | */ 54 | public static float dp2px(Resources resources, float dp) { 55 | return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, 56 | resources.getDisplayMetrics()); 57 | } 58 | 59 | /** 60 | * sp转px 61 | * 62 | * @param context 63 | * @param sp 64 | * @return 65 | */ 66 | public static int sp2px(Context context, float sp) { 67 | return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, sp, 68 | context.getResources().getDisplayMetrics()); 69 | } 70 | 71 | /** 72 | * px转dp 73 | * 74 | * @param context 75 | * @param px 76 | * @return 77 | */ 78 | public static float px2dp(Context context, float px) { 79 | final float scale = context.getResources().getDisplayMetrics().density; 80 | return (px / scale); 81 | } 82 | 83 | /** 84 | * px转sp 85 | * 86 | * @param context 87 | * @param px 88 | * @return 89 | */ 90 | public static float px2sp(Context context, float px) { 91 | return (px / context.getResources().getDisplayMetrics().scaledDensity); 92 | } 93 | } 94 | --------------------------------------------------------------------------------