Commit c71bbb36 authored by narinder Rana's avatar narinder Rana Committed by Romain Hunault
Browse files

Setup /e/ colors

parent f1203aa4
......@@ -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")
}
......@@ -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
......@@ -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);
}
}
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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);
}
}
......@@ -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>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment