-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from kadbbz/dev-1.18
Dev 1.18
- Loading branch information
Showing
60 changed files
with
386 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
8 changes: 4 additions & 4 deletions
8
...ets/hzg_bundle_cache_10.0.2.0/forguncy.js → ...ets/hzg_bundle_cache_10.0.3.0/forguncy.js
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...ssets/hzg_bundle_cache_10.0.2.0/spread.js → ...ssets/hzg_bundle_cache_10.0.3.0/spread.js
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
app/src/main/java/com/huozige/lab/container/proxy/support/BaseActivityNoActionBar.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.huozige.lab.container.proxy.support; | ||
|
||
import androidx.appcompat.app.ActionBar; | ||
import androidx.appcompat.app.AppCompatActivity; | ||
|
||
public class BaseActivityNoActionBar extends AppCompatActivity { | ||
|
||
@Override | ||
protected void onResume(){ | ||
super.onResume(); | ||
ActionBar aBar = getSupportActionBar(); | ||
if (aBar != null) aBar.hide(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
app/src/main/java/com/huozige/lab/container/utilities/ColorUtility.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package com.huozige.lab.container.utilities; | ||
|
||
import android.content.res.ColorStateList; | ||
import android.graphics.Color; | ||
import android.graphics.drawable.Drawable; | ||
|
||
import androidx.annotation.ColorInt; | ||
import androidx.core.graphics.drawable.DrawableCompat; | ||
|
||
/** | ||
* 颜色相关的帮助类 | ||
*/ | ||
public class ColorUtility { | ||
|
||
// 灰度值的阈值,高于高值意味着深色,否则为暗色 | ||
public static double GRAYSCALE_THRESHOLD_BRIGHT_COLOR = 122.5; | ||
|
||
/** | ||
* 获取灰度值 | ||
* | ||
* @param color 色彩 | ||
* @return 灰度值(0-255) | ||
*/ | ||
public static double getGrayScale(@ColorInt int color) { | ||
return getGrayScale(Color.red(color), Color.green(color), Color.blue(color)); | ||
} | ||
|
||
/** | ||
* 获取灰度值 | ||
* | ||
* @param red 红色分量 | ||
* @param green 绿色分量 | ||
* @param blue 蓝色分量 | ||
* @return 灰度值(0-255) | ||
*/ | ||
public static double getGrayScale(int red, int green, int blue) { | ||
return (red * 0.299) + (green * 0.587) + (blue * 0.114); | ||
} | ||
|
||
/** | ||
* 重置图片的颜色 | ||
* | ||
* @param orig 原始图片 | ||
* @param colorRes 新的颜色 | ||
* @return 处理后的图片 | ||
*/ | ||
public static Drawable resetImageTintColorTo(Drawable orig, @ColorInt int colorRes) { | ||
Drawable wrap = DrawableCompat.wrap(orig).mutate(); | ||
//将Drawable重新着色 | ||
DrawableCompat.setTintList(wrap, ColorStateList.valueOf(colorRes)); | ||
DrawableCompat.setTint(wrap, colorRes); | ||
return wrap; | ||
} | ||
} |
Oops, something went wrong.