Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6af29b3d authored by Fahim's avatar Fahim
Browse files

2827-P,Q-Implement Dark Mode

parent 34da4b85
Loading
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -5,7 +5,6 @@
    <option name="FORMATTER_TAGS_ENABLED" value="true" />
    <option name="WRAP_COMMENTS" value="true" />
    <AndroidXmlCodeStyleSettings>
      <option name="USE_CUSTOM_SETTINGS" value="true" />
      <option name="VALUE_RESOURCE_FILE_SETTINGS">
        <value>
          <option name="WRAP_ATTRIBUTES" value="2" />
@@ -15,11 +14,6 @@
    <JavaCodeStyleSettings>
      <option name="FIELD_NAME_PREFIX" value="m" />
      <option name="CLASS_NAMES_IN_JAVADOC" value="3" />
      <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
      <option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
      <option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
        <value />
      </option>
      <option name="IMPORT_LAYOUT_TABLE">
        <value>
          <package name="android" withSubpackages="true" static="false" />
@@ -50,8 +44,6 @@
    </JavaCodeStyleSettings>
    <XML>
      <option name="XML_ATTRIBUTE_WRAP" value="2" />
      <option name="XML_KEEP_LINE_BREAKS" value="false" />
      <option name="XML_ALIGN_ATTRIBUTES" value="false" />
      <option name="XML_KEEP_WHITE_SPACES_INSIDE_CDATA" value="true" />
      <option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
    </XML>
+30 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="RemoteRepositoriesConfiguration">
    <remote-repository>
      <option name="id" value="central" />
      <option name="name" value="Maven Central repository" />
      <option name="url" value="https://repo1.maven.org/maven2" />
    </remote-repository>
    <remote-repository>
      <option name="id" value="jboss.community" />
      <option name="name" value="JBoss Community repository" />
      <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
    </remote-repository>
    <remote-repository>
      <option name="id" value="BintrayJCenter" />
      <option name="name" value="BintrayJCenter" />
      <option name="url" value="https://jcenter.bintray.com/" />
    </remote-repository>
    <remote-repository>
      <option name="id" value="maven" />
      <option name="name" value="maven" />
      <option name="url" value="https://jitpack.io" />
    </remote-repository>
    <remote-repository>
      <option name="id" value="Google" />
      <option name="name" value="Google" />
      <option name="url" value="https://dl.google.com/dl/android/maven2/" />
    </remote-repository>
  </component>
</project>
 No newline at end of file
+404 B (122 KiB)

File changed.

No diff preview for this file type.

+5 −5
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@
                android:name=".ViewTaskActivity"
                android:label="@string/title_task_detail"
                android:parentActivityName=".TaskListActivity"
                android:theme="@style/OpenTasksAppTheme"
                android:theme="@style/OpenTasksAppThemeWhiteBackButton"
                android:windowSoftInputMode="adjustResize">
            <intent-filter android:label="edit">
                <action android:name="android.intent.action.VIEW" />
@@ -145,7 +145,7 @@
                android:name=".SyncSettingsActivity"
                android:label="@string/title_activity_settings"
                android:parentActivityName=".TaskListActivity"
                android:theme="@style/AppTheme">
                android:theme="@style/AboutTheme">
            <meta-data
                    android:name="android.support.PARENT_ACTIVITY"
                    android:value="org.dmfs.tasks.TaskListActivity" />
@@ -155,7 +155,7 @@
                android:name=".AboutActivity"
                android:label="@string/title_activity_about"
                android:parentActivityName=".TaskListActivity"
                android:theme="@style/AppTheme">
                android:theme="@style/AboutTheme">
            <meta-data
                    android:name="android.support.PARENT_ACTIVITY"
                    android:value="org.dmfs.tasks.TaskListActivity" />
@@ -265,7 +265,7 @@
                android:name=".dashclock.DashClockPreferenceActivity"
                android:exported="true"
                android:label="@string/title_task_list"
                android:theme="@style/AppTheme" />
                android:theme="@style/AboutTheme" />

        <!-- Manage List -->
        <activity
@@ -299,7 +299,7 @@
        <activity
                android:name=".AppSettingsActivity"
                android:label="@string/title_activity_settings"
                android:theme="@style/AppTheme" />
                android:theme="@style/AboutTheme" />

        <!-- Notification -->
        <receiver
+9 −24
Original line number Diff line number Diff line
@@ -9,12 +9,16 @@ import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.text.Html;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.style.ForegroundColorSpan;
import android.widget.TextView;

import org.dmfs.tasks.utils.BaseActivity;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.ContextCompat;
import androidx.core.graphics.drawable.DrawableCompat;

import static org.dmfs.tasks.TaskListActivity.color_default_primary_text;
@@ -22,41 +26,22 @@ import static org.dmfs.tasks.TaskListActivity.color_default_primary_text;

public class AboutActivity extends BaseActivity {




    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_about);

        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        //getSupportActionBar().setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.color_default_blue1)));

        getFragmentManager()
                .beginTransaction()
                .replace(R.id.about_container,
                        new AboutFragment())
                .commit();
        getSupportActionBar().setHomeAsUpIndicator(changeBackArrowColor(this, R.color.color_default_blue1));
        String title = getResources().getString(R.string.title_activity_about);
        getSupportActionBar().setTitle(Html.fromHtml("<font color='#007FFF'>"+title+" </font>"));
        getSupportActionBar().getThemedContext();

       // getSupportActionBar().setTitle(Html.fromHtml("<font color='#ffffff'> About </font>"));


        SpannableString spannableString = new SpannableString(title);
        spannableString.setSpan(new ForegroundColorSpan(ContextCompat.getColor(getApplicationContext(), R.color.color_default_primary_text)), 0, title.length(),
                Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
        getSupportActionBar().setTitle(spannableString);
    }
    public static Drawable changeBackArrowColor(Context context, int color) {
        String resName;
        int res;

        resName = Build.VERSION.SDK_INT >= 23 ? "abc_ic_ab_back_material" : "abc_ic_ab_back_mtrl_am_alpha";
        res = context.getResources().getIdentifier(resName, "drawable", context.getPackageName());
        final Drawable upArrow = context.getResources().getDrawable(res);
        upArrow.setColorFilter(color, PorterDuff.Mode.SRC_ATOP);

        return upArrow;
    }

}
Loading