Vector assets (#262)
@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="apps.amine.bou.readerforselfoss"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
package="apps.amine.bou.readerforselfoss">
|
||||
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
@ -19,11 +18,11 @@
|
||||
android:theme="@style/SplashTheme">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
|
||||
<meta-data android:name="android.app.shortcuts"
|
||||
<meta-data
|
||||
android:name="android.app.shortcuts"
|
||||
android:resource="@xml/shortcuts" />
|
||||
</activity>
|
||||
<activity
|
||||
@ -38,7 +37,7 @@
|
||||
android:parentActivityName=".HomeActivity">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value="apps.amine.bou.readerforselfoss.HomeActivity" />
|
||||
android:value=".HomeActivity" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".SourcesActivity"
|
||||
@ -56,9 +55,7 @@
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEND" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
||||
<data android:mimeType="text/plain" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
@ -18,17 +18,13 @@ import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.appcompat.widget.SearchView
|
||||
import androidx.recyclerview.widget.StaggeredGridLayoutManager
|
||||
import androidx.recyclerview.widget.ItemTouchHelper
|
||||
import android.util.Log
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import android.widget.Toast
|
||||
import androidx.room.Room
|
||||
import androidx.room.RoomDatabase
|
||||
import androidx.work.Constraints
|
||||
import androidx.work.ExistingPeriodicWorkPolicy
|
||||
import androidx.work.NetworkType
|
||||
import androidx.work.OneTimeWorkRequestBuilder
|
||||
import androidx.work.PeriodicWorkRequestBuilder
|
||||
import androidx.work.WorkManager
|
||||
import apps.amine.bou.readerforselfoss.adapters.ItemCardAdapter
|
||||
@ -69,7 +65,6 @@ import com.ashokvarma.bottomnavigation.BottomNavigationItem
|
||||
import com.ashokvarma.bottomnavigation.TextBadgeItem
|
||||
import com.ftinc.scoop.Scoop
|
||||
import com.github.stkent.amplify.tracking.Amplify
|
||||
import com.google.gson.reflect.TypeToken
|
||||
import com.mikepenz.aboutlibraries.Libs
|
||||
import com.mikepenz.aboutlibraries.LibsBuilder
|
||||
import com.mikepenz.materialdrawer.Drawer
|
||||
@ -79,7 +74,6 @@ import com.mikepenz.materialdrawer.model.DividerDrawerItem
|
||||
import com.mikepenz.materialdrawer.model.PrimaryDrawerItem
|
||||
import com.mikepenz.materialdrawer.model.SecondaryDrawerItem
|
||||
import kotlinx.android.synthetic.main.activity_home.*
|
||||
import kotlinx.android.synthetic.main.fragment_article.*
|
||||
import org.acra.ACRA
|
||||
import retrofit2.Call
|
||||
import retrofit2.Callback
|
||||
@ -307,19 +301,19 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
||||
|
||||
val tabNew =
|
||||
BottomNavigationItem(
|
||||
R.drawable.ic_fiber_new_black_24dp,
|
||||
R.drawable.ic_tab_fiber_new_black_24dp,
|
||||
getString(R.string.tab_new)
|
||||
).setActiveColor(appColors.colorAccent)
|
||||
.setBadgeItem(tabNewBadge)
|
||||
val tabArchive =
|
||||
BottomNavigationItem(
|
||||
R.drawable.ic_archive_black_24dp,
|
||||
R.drawable.ic_tab_archive_black_24dp,
|
||||
getString(R.string.tab_read)
|
||||
).setActiveColor(appColors.colorAccentDark)
|
||||
.setBadgeItem(tabArchiveBadge)
|
||||
val tabStarred =
|
||||
BottomNavigationItem(
|
||||
R.drawable.ic_favorite_black_24dp,
|
||||
R.drawable.ic_tab_favorite_black_24dp,
|
||||
getString(R.string.tab_favs)
|
||||
).setActiveColorResource(R.color.pink)
|
||||
.setBadgeItem(tabStarredBadge)
|
||||
@ -481,7 +475,7 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
||||
|
||||
footer {
|
||||
primaryItem(R.string.drawer_report_bug) {
|
||||
icon = R.drawable.ic_bug_report
|
||||
icon = R.drawable.ic_bug_report_black_24dp
|
||||
iconTintingEnabled = true
|
||||
onClick { _ ->
|
||||
val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(Config.trackerUrl))
|
||||
@ -491,7 +485,7 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
||||
}
|
||||
|
||||
primaryItem(R.string.title_activity_settings) {
|
||||
icon = R.drawable.ic_settings
|
||||
icon = R.drawable.ic_settings_black_24dp
|
||||
iconTintingEnabled = true
|
||||
onClick { _ ->
|
||||
startActivityForResult(
|
||||
@ -691,7 +685,7 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
||||
PrimaryDrawerItem()
|
||||
.withName(R.string.action_about)
|
||||
.withSelectable(false)
|
||||
.withIcon(R.drawable.ic_info_outline)
|
||||
.withIcon(R.drawable.ic_info_outline_white_24dp)
|
||||
.withIconTintingEnabled(true)
|
||||
.withOnDrawerItemClickListener { _, _, _ ->
|
||||
LibsBuilder()
|
||||
|
@ -46,7 +46,7 @@ class LoadingWorker(val context: Context, params: WorkerParameters) : Worker(con
|
||||
.setOngoing(true)
|
||||
.setPriority(PRIORITY_LOW)
|
||||
.setChannelId(Config.syncChannelId)
|
||||
.setSmallIcon(R.drawable.ic_cloud_download)
|
||||
.setSmallIcon(R.drawable.ic_stat_cloud_download_black_24dp)
|
||||
|
||||
notificationManager.notify(1, notification.build())
|
||||
|
||||
@ -101,7 +101,7 @@ class LoadingWorker(val context: Context, params: WorkerParameters) : Worker(con
|
||||
.setChannelId(Config.newItemsChannelId)
|
||||
.setContentIntent(pendingIntent)
|
||||
.setAutoCancel(true)
|
||||
.setSmallIcon(R.drawable.ic_fiber_new_black_24dp)
|
||||
.setSmallIcon(R.drawable.ic_tab_fiber_new_black_24dp)
|
||||
|
||||
Timer("", false).schedule(4000) {
|
||||
notificationManager.notify(2, newItemsNotification.build())
|
||||
|
@ -8,6 +8,7 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
@ -24,6 +25,7 @@ import android.text.Editable;
|
||||
import android.text.InputFilter;
|
||||
import android.text.Spanned;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
@ -124,6 +126,27 @@ public class SettingsActivity extends AppCompatPreferenceActivity {
|
||||
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
|
||||
public void onBuildHeaders(List<Header> target) {
|
||||
loadHeadersFromResource(R.xml.pref_headers, target);
|
||||
|
||||
AppColors appColors = new AppColors(this);
|
||||
if (appColors != null && appColors.isDarkTheme()) {
|
||||
for (Header header : target) {
|
||||
tryLoadIconDark(header);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void tryLoadIconDark(Header header){
|
||||
try{
|
||||
if (header.fragmentArguments != null) {
|
||||
String iconDark = header.fragmentArguments.getString("iconDark");
|
||||
int iconDarkId = getResources().getIdentifier(iconDark, "drawable", getPackageName());
|
||||
if (iconDarkId != 0) {
|
||||
header.iconRes = iconDarkId;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.e("SettingsActivity", "Can not load dark icon", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Before Width: | Height: | Size: 683 B |
Before Width: | Height: | Size: 680 B |
Before Width: | Height: | Size: 134 B |
Before Width: | Height: | Size: 239 B |
Before Width: | Height: | Size: 271 B |
Before Width: | Height: | Size: 216 B |
Before Width: | Height: | Size: 206 B |
Before Width: | Height: | Size: 221 B |
Before Width: | Height: | Size: 334 B |
Before Width: | Height: | Size: 458 B |
Before Width: | Height: | Size: 275 B |
Before Width: | Height: | Size: 361 B |
Before Width: | Height: | Size: 324 B |
Before Width: | Height: | Size: 301 B |
Before Width: | Height: | Size: 551 B |
Before Width: | Height: | Size: 355 B |
Before Width: | Height: | Size: 551 B |
Before Width: | Height: | Size: 204 B |
Before Width: | Height: | Size: 187 B |
Before Width: | Height: | Size: 422 B |
Before Width: | Height: | Size: 473 B |
Before Width: | Height: | Size: 498 B |
Before Width: | Height: | Size: 453 B |
Before Width: | Height: | Size: 398 B |
Before Width: | Height: | Size: 397 B |
Before Width: | Height: | Size: 523 B |
Before Width: | Height: | Size: 409 B |
Before Width: | Height: | Size: 442 B |
Before Width: | Height: | Size: 116 B |
Before Width: | Height: | Size: 174 B |
Before Width: | Height: | Size: 212 B |
Before Width: | Height: | Size: 136 B |
Before Width: | Height: | Size: 134 B |
Before Width: | Height: | Size: 175 B |
Before Width: | Height: | Size: 228 B |
Before Width: | Height: | Size: 268 B |
Before Width: | Height: | Size: 213 B |
Before Width: | Height: | Size: 247 B |
Before Width: | Height: | Size: 215 B |
Before Width: | Height: | Size: 208 B |
Before Width: | Height: | Size: 352 B |
Before Width: | Height: | Size: 241 B |
Before Width: | Height: | Size: 355 B |
Before Width: | Height: | Size: 157 B |
Before Width: | Height: | Size: 144 B |
Before Width: | Height: | Size: 276 B |
Before Width: | Height: | Size: 309 B |
Before Width: | Height: | Size: 339 B |
Before Width: | Height: | Size: 322 B |
Before Width: | Height: | Size: 262 B |
Before Width: | Height: | Size: 268 B |
Before Width: | Height: | Size: 361 B |
Before Width: | Height: | Size: 871 B |
Before Width: | Height: | Size: 634 B |
Before Width: | Height: | Size: 168 B |
Before Width: | Height: | Size: 261 B |
Before Width: | Height: | Size: 312 B |
Before Width: | Height: | Size: 171 B |
Before Width: | Height: | Size: 174 B |
Before Width: | Height: | Size: 257 B |
Before Width: | Height: | Size: 380 B |
Before Width: | Height: | Size: 504 B |
Before Width: | Height: | Size: 300 B |
Before Width: | Height: | Size: 437 B |
Before Width: | Height: | Size: 327 B |
Before Width: | Height: | Size: 308 B |
Before Width: | Height: | Size: 684 B |
Before Width: | Height: | Size: 464 B |
Before Width: | Height: | Size: 725 B |
Before Width: | Height: | Size: 230 B |
Before Width: | Height: | Size: 208 B |
Before Width: | Height: | Size: 557 B |
Before Width: | Height: | Size: 625 B |
Before Width: | Height: | Size: 606 B |
Before Width: | Height: | Size: 557 B |
Before Width: | Height: | Size: 483 B |
Before Width: | Height: | Size: 496 B |
Before Width: | Height: | Size: 660 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 242 B |
Before Width: | Height: | Size: 377 B |
Before Width: | Height: | Size: 466 B |
Before Width: | Height: | Size: 263 B |
Before Width: | Height: | Size: 255 B |
Before Width: | Height: | Size: 347 B |
Before Width: | Height: | Size: 547 B |
Before Width: | Height: | Size: 741 B |
Before Width: | Height: | Size: 398 B |
Before Width: | Height: | Size: 636 B |
Before Width: | Height: | Size: 490 B |
Before Width: | Height: | Size: 448 B |
Before Width: | Height: | Size: 986 B |
Before Width: | Height: | Size: 649 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 318 B |