Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
e
os
App Lounge
Commits
c71bbb36
Commit
c71bbb36
authored
Oct 27, 2020
by
narinder Rana
Committed by
Romain Hunault
Oct 27, 2020
Browse files
Setup /e/ colors
parent
f1203aa4
Changes
8
Hide whitespace changes
Inline
Side-by-side
app/build.gradle
View file @
c71bbb36
...
...
@@ -36,6 +36,10 @@ android {
androidExtensions
{
experimental
=
true
}
aaptOptions
{
additionalParameters
'-I'
,
'app/e-ui-sdk.jar'
}
}
dependencies
{
...
...
@@ -84,4 +88,6 @@ dependencies {
implementation
"com.fasterxml.jackson.module:jackson-module-kotlin:2.11.1"
implementation
'com.github.chrisbanes:PhotoView:2.3.0'
compileOnly
files
(
"e-ui-sdk.jar"
)
}
app/e-ui-sdk.jar
0 → 100644
View file @
c71bbb36
File added
app/src/main/java/foundation/e/apps/MainActivity.kt
View file @
c71bbb36
...
...
@@ -318,13 +318,10 @@ class MainActivity : AppCompatActivity(), BottomNavigationView.OnNavigationItemS
* */
private
fun
getAccentColor
()
{
val
typedValue
=
TypedValue
()
val
contextThemeWrapper
=
ContextThemeWrapper
(
this
,
android
.
R
.
style
.
Theme_DeviceDefault
)
contextThemeWrapper
.
getTheme
().
resolveAttribute
(
android
.
R
.
attr
.
colorAccent
,
typedValue
,
true
)
@ColorInt
val
color
=
typedValue
.
data
accentColorOS
=
color
;
accentColorOS
=
this
.
resources
.
getColor
(
R
.
color
.
colorAccent
);
}
}
\ No newline at end of file
app/src/main/java/foundation/e/apps/application/ApplicationActivity.kt
View file @
c71bbb36
...
...
@@ -762,12 +762,6 @@ class ApplicationActivity :
}
private
fun
getAccentColor
()
{
val
typedValue
=
TypedValue
()
val
contextThemeWrapper
=
ContextThemeWrapper
(
this
,
android
.
R
.
style
.
Theme_DeviceDefault
)
contextThemeWrapper
.
getTheme
().
resolveAttribute
(
android
.
R
.
attr
.
colorAccent
,
typedValue
,
true
)
@ColorInt
val
color
=
typedValue
.
data
accentColorOS
=
color
;
accentColorOS
=
this
.
resources
.
getColor
(
R
.
color
.
colorAccent
);
}
}
app/src/main/java/foundation/e/apps/application/model/Application.kt
View file @
c71bbb36
...
...
@@ -451,12 +451,8 @@ class Application(val packageName: String, private val applicationManager: Appli
*
*/
fun
getAccentColor
(
context
:
Context
):
Int
{
val
typedValue
=
TypedValue
()
val
contextThemeWrapper
=
ContextThemeWrapper
(
context
,
R
.
style
.
Theme_DeviceDefault
)
contextThemeWrapper
.
getTheme
().
resolveAttribute
(
android
.
R
.
attr
.
colorAccent
,
typedValue
,
true
)
@ColorInt
val
color
=
typedValue
.
data
val
color
=
context
.
resources
.
getColor
(
foundation
.
e
.
apps
.
R
.
color
.
colorAccent
);
return
color
;
}
...
...
app/src/main/java/foundation/e/apps/categories/CategoriesFragment.kt
View file @
c71bbb36
...
...
@@ -72,12 +72,10 @@ class CategoriesFragment : Fragment() {
*
*/
fun
getAccentColor
(
context
:
Context
):
Int
{
val
typedValue
=
TypedValue
()
val
contextThemeWrapper
=
ContextThemeWrapper
(
context
,
android
.
R
.
style
.
Theme_DeviceDefault
)
contextThemeWrapper
.
getTheme
().
resolveAttribute
(
android
.
R
.
attr
.
colorAccent
,
typedValue
,
true
)
@ColorInt
val
color
=
typedValue
.
data
val
color
=
context
.
resources
.
getColor
(
R
.
color
.
colorAccent
);
return
color
;
}
...
...
app/src/main/java/foundation/e/apps/categories/category/CategoryActivity.kt
View file @
c71bbb36
...
...
@@ -201,12 +201,6 @@ class CategoryActivity : AppCompatActivity(), ApplicationManagerServiceConnectio
* */
private
fun
getAccentColor
()
{
val
typedValue
=
TypedValue
()
val
contextThemeWrapper
=
ContextThemeWrapper
(
this
,
android
.
R
.
style
.
Theme_DeviceDefault
)
contextThemeWrapper
.
getTheme
().
resolveAttribute
(
android
.
R
.
attr
.
colorAccent
,
typedValue
,
true
)
@ColorInt
val
color
=
typedValue
.
data
accentColorOS
=
color
;
accentColorOS
=
this
.
resources
.
getColor
(
R
.
color
.
colorAccent
);
}
}
app/src/main/res/values/colors.xml
View file @
c71bbb36
...
...
@@ -20,7 +20,14 @@
<resources>
<color
name=
"colorPrimary"
>
#FAFAFA
</color>
<color
name=
"colorPrimaryDark"
>
#FAFAFA
</color>
<color
name=
"colorAccent"
>
#000000
</color>
<!-- <color name="colorAccent">#000000</color>-->
<!-- <color name="colorPrimary">@lineageos.platform:color/color_default_primary</color>-->
<!-- <color name="colorPrimaryDark">@lineageos.platform:color/color_default_primary_dark</color>-->
<color
name=
"colorAccent"
>
@lineageos.platform:color/color_default_accent
</color>
<color
name=
"color_default_background"
>
@lineageos.platform:color/color_default_background
</color>
<color
name=
"color_default_primary_text"
>
@lineageos.platform:color/color_default_primary_text
</color>
<color
name=
"color_default_secondary_text"
>
@lineageos.platform:color/color_default_secondary_text
</color>
<color
name=
"colorDivider"
>
#CFD8DC
</color>
<color
name=
"color_category_icon"
>
#78909C
</color>
...
...
@@ -37,4 +44,8 @@
<color
name=
"colorRatingGood"
>
#4CAF50
</color>
<color
name=
"colorRatingNeutral"
>
#FFEB3B
</color>
<color
name=
"colorRatingBad"
>
#F44336
</color>
</resources>
Romain Hunault
@rhunault
mentioned in commit
cdb9258b
·
Nov 27, 2020
mentioned in commit
cdb9258b
mentioned in commit cdb9258b51a3f365479682460bcb1d2b87a67d0c
Toggle commit list
Romain Hunault
@rhunault
mentioned in commit
9070d298
·
Nov 27, 2020
mentioned in commit
9070d298
mentioned in commit 9070d298bffb66705bbc4af969e5eaada2e7010e
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment