Skip to content

Commit

Permalink
Merge pull request Tencent#3 from QMUI/master
Browse files Browse the repository at this point in the history
update from origin
  • Loading branch information
EndSmile authored Oct 20, 2017
2 parents 5b629e6 + bfa296a commit d8a5ede
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -300,14 +300,15 @@ private void layoutWithGravityLeft(int parentWidth) {
}
final int childw = child.getMeasuredWidth();
final int childh = child.getMeasuredHeight();
lineHeight = Math.max(lineHeight, childh);
if (childPositionX + childw > childMaxRight) {
// 换行
childPositionX = getPaddingLeft();
childPositionY += (lineHeight + mChildVerticalSpacing);
lineHeight = 0;
}
child.layout(childPositionX, childPositionY, childPositionX + childw, childPositionY + childh);
childPositionX += childw + mChildHorizontalSpacing;
lineHeight = Math.max(lineHeight, childh);
}

// 如果布局的子View少于childCount,则表示有一些子View不需要布局
Expand Down
2 changes: 1 addition & 1 deletion qmuidemo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ configurations.all {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':qmuilint')
// compile 'com.qmuiteam:qmuilint:1.0.0'
// compile 'com.qmuiteam:qmuilint:1.0.1'
compile "com.android.support:appcompat-v7:$supportVersion"
compile 'com.jakewharton:butterknife:8.4.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
Expand Down
2 changes: 1 addition & 1 deletion qmuilint/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: 'com.android.library'

group = 'com.qmuiteam'
version = "1.0.0" // QMUI Lint 发布到 bintray 的版本号
version = "1.0.1" // QMUI Lint 发布到 bintray 的版本号

android {
compileSdkVersion project.ext.compileSdkVersion
Expand Down
3 changes: 0 additions & 3 deletions qmuilintrule/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
apply plugin: 'java'

sourceCompatibility = "1.7"
targetCompatibility = "1.7"

configurations {
lintChecks
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class QMUIFWordDetector extends Detector
Issue.create("QMUIDontUseTheFWordInLog",
"Please, don't use the f word, type something more nicely.",
"Do I need to explain this? \uD83D\uDD95",
Category.MESSAGES, 5, Severity.WARNING,
Category.MESSAGES, 2, Severity.WARNING,
new Implementation(QMUIFWordDetector.class, Scope.JAVA_FILE_SCOPE));

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class QMUIImageScaleDetector extends Detector implements Detector.BinaryR
Issue.create("QMUIImageSizeDisproportionate",
"The size of this image is disproportionate.",
"Please check the size of the image, for example, the height and width of the 3x plot should be 1.5 times 2x plot.",
Category.CORRECTNESS, 5, Severity.WARNING,
Category.ICONS, 4, Severity.WARNING,
new Implementation(QMUIImageScaleDetector.class, Scope.BINARY_RESOURCE_FILE_SCOPE));

private static final String IGNORE_IMAGE_NIGHT_PNG = ".9.png";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class QMUIImageSizeDetector extends Detector implements Detector.BinaryRe
Issue.create("QMUIImageSizeInvalid",
"The size of this image is not correct.",
"Please check the size of the image, for example, the height and width of the 2x plot should be even.",
Category.CORRECTNESS, 5, Severity.WARNING,
Category.ICONS, 2, Severity.WARNING,
new Implementation(QMUIImageSizeDetector.class, Scope.BINARY_RESOURCE_FILE_SCOPE));

private static final String IGNORE_IMAGE_NIGHT_PNG = ".9.png";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class QMUIJavaVectorDrawableDetector extends Detector implements Detector
Issue.create("QMUIGetVectorDrawableWithWrongFunction",
"Should use the corresponding method to get vector drawable.",
"Using the normal method to get the vector drawable will cause a crash on Android versions below 4.0",
Category.ICONS, 2, Severity.ERROR,
Category.CORRECTNESS, 8, Severity.ERROR,
new Implementation(QMUIJavaVectorDrawableDetector.class, Scope.JAVA_FILE_SCOPE));

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class QMUIXmlVectorDrawableDetector extends ResourceXmlDetector {
Issue.create("QMUIGetVectorDrawableWithWrongProperty",
"Should use the corresponding property to get vector drawable.",
"Using the normal property to get the vector drawable will cause a crash on Android versions below 4.0.",
Category.ICONS, 2, Severity.ERROR,
Category.CORRECTNESS, 8, Severity.ERROR,
new Implementation(QMUIXmlVectorDrawableDetector.class, Scope.RESOURCE_FILE_SCOPE));

private static final Collection<String> mAttrList = Lists.newArrayList(ATTR_DRAWABLE_LEFT, ATTR_DRAWABLE_RIGHT, ATTR_DRAWABLE_TOP, ATTR_DRAWABLE_BOTTOM);
Expand Down

0 comments on commit d8a5ede

Please sign in to comment.