diff options
Diffstat (limited to 'org.fox.ttrss')
53 files changed, 412 insertions, 73 deletions
diff --git a/org.fox.ttrss/build.gradle b/org.fox.ttrss/build.gradle index 4a23cd3e..b6ebc812 100755 --- a/org.fox.ttrss/build.gradle +++ b/org.fox.ttrss/build.gradle @@ -8,6 +8,7 @@ android { applicationId "org.fox.ttrss" buildConfigField "long", "TIMESTAMP", System.currentTimeMillis() + "L" buildConfigField "boolean", "ENABLE_TRIAL", "true" + buildConfigField "boolean", "ENABLE_UPDATER", "false" minSdkVersion 16 targetSdkVersion 29 } @@ -37,11 +38,12 @@ android { fdroid { minifyEnabled false - versionNameSuffix "-fdroid" + versionNameSuffix "-fdroid" proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' - buildConfigField "boolean", "ENABLE_TRIAL", "false" - signingConfig signingConfigs.fdroid - matchingFallbacks = ['release'] + buildConfigField "boolean", "ENABLE_TRIAL", "false" + buildConfigField "boolean", "ENABLE_UPDATER", "true" + signingConfig signingConfigs.fdroid + matchingFallbacks = ['release'] } } } @@ -73,4 +75,5 @@ dependencies { annotationProcessor 'frankiesardo:icepick-processor:3.2.0' implementation 'com.github.livefront:bridge:v1.1.1' implementation files('libs/YouTubeAndroidPlayerApi.jar') + implementation 'com.github.javiersantos:AppUpdater:2.7' } diff --git a/org.fox.ttrss/src/main/AndroidManifest.xml b/org.fox.ttrss/src/main/AndroidManifest.xml index 6b1a19b1..18f56e7a 100755 --- a/org.fox.ttrss/src/main/AndroidManifest.xml +++ b/org.fox.ttrss/src/main/AndroidManifest.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.fox.ttrss" - android:versionCode="530" - android:versionName="1.296"> + android:versionCode="534" + android:versionName="1.300"> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/Application.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/Application.java index dd134e8c..94857855 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/Application.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/Application.java @@ -10,6 +10,9 @@ import org.fox.ttrss.types.ArticleList; import androidx.annotation.NonNull; import androidx.annotation.Nullable; + +import java.util.LinkedHashMap; + import icepick.Icepick; public class Application extends android.app.Application { @@ -21,6 +24,8 @@ public class Application extends android.app.Application { public int m_selectedArticleId; public String m_sessionId; public int m_apiLevel; + public LinkedHashMap<String, String> m_customSortModes = new LinkedHashMap<String, String>(); + public static Application getInstance(){ return m_singleton; } @@ -50,6 +55,7 @@ public class Application extends android.app.Application { out.putString("gs:sessionId", m_sessionId); out.putInt("gs:apiLevel", m_apiLevel); out.putInt("gs:selectedArticleId", m_selectedArticleId); + out.putSerializable("gs:customSortTypes", m_customSortModes); } public void load(Bundle in) { @@ -57,6 +63,12 @@ public class Application extends android.app.Application { m_sessionId = in.getString("gs:sessionId"); m_apiLevel = in.getInt("gs:apiLevel"); m_selectedArticleId = in.getInt("gs:selectedArticleId"); + + try { + m_customSortModes = (LinkedHashMap<String, String>) in.getSerializable("gs:customSortTypes"); + } catch (Exception e) { + e.printStackTrace(); + } } } diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java index ed961e38..d75a4e5a 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java @@ -2,7 +2,11 @@ package org.fox.ttrss; import android.annotation.SuppressLint; import android.app.Activity; +import android.app.AlertDialog; +import android.app.Dialog; +import android.content.DialogInterface; import android.content.SharedPreferences; +import android.content.res.Resources; import android.graphics.Color; import android.net.Uri; import android.os.Build; @@ -23,6 +27,7 @@ import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebView.HitTestResult; import android.webkit.WebViewClient; +import android.widget.EditText; import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.TextView; @@ -210,6 +215,70 @@ public class ArticleFragment extends StateSavedFragment { } + final ImageView scoreView = view.findViewById(R.id.score); + + if (scoreView != null) { + setScoreImage(scoreView, m_article.score); + + Resources.Theme theme = m_activity.getTheme(); + TypedValue tv = new TypedValue(); + theme.resolveAttribute(R.attr.headlineTitleHighScoreUnreadTextColor, tv, true); + int titleHighScoreUnreadColor = tv.data; + + if (m_article.score > Article.SCORE_HIGH) + scoreView.setColorFilter(titleHighScoreUnreadColor); + else + scoreView.setColorFilter(null); + + if (m_activity.getApiLevel() >= 16) { + scoreView.setOnClickListener(new OnClickListener() { + @Override + public void onClick(View v) { + final EditText edit = new EditText(getActivity()); + edit.setText(String.valueOf(m_article.score)); + + AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()) + .setTitle(R.string.score_for_this_article) + .setPositiveButton(R.string.set_score, + new DialogInterface.OnClickListener() { + + @Override + public void onClick(DialogInterface dialog, + int which) { + + try { + int newScore = Integer.parseInt(edit.getText().toString()); + + m_article.score = newScore; + + m_activity.saveArticleScore(m_article); + + setScoreImage(scoreView, newScore); + } catch (NumberFormatException e) { + m_activity.toast(R.string.score_invalid); + e.printStackTrace(); + } + } + }) + .setNegativeButton(getString(R.string.cancel), + new DialogInterface.OnClickListener() { + + @Override + public void onClick(DialogInterface dialog, + int which) { + + // + + } + }).setView(edit); + + Dialog dialog = builder.create(); + dialog.show(); + } + }); + } + } + ImageView attachments = view.findViewById(R.id.attachments); if (attachments != null) { @@ -360,6 +429,20 @@ public class ArticleFragment extends StateSavedFragment { return view; } + private void setScoreImage(ImageView scoreView, int score) { + TypedValue tv = new TypedValue(); + int scoreAttr = R.attr.ic_action_trending_flat; + + if (m_article.score > 0) + scoreAttr = R.attr.ic_action_trending_up; + else if (m_article.score < 0) + scoreAttr = R.attr.ic_action_trending_down; + + m_activity.getTheme().resolveAttribute(scoreAttr, tv, true); + + scoreView.setImageResource(tv.resourceId); + } + protected void renderContent(Bundle savedInstanceState) { if (!isAdded() || m_web == null) return; diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java index b92324da..672da44e 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java @@ -43,6 +43,7 @@ import android.view.ViewTreeObserver; import android.view.WindowManager; import android.widget.AdapterView.AdapterContextMenuInfo; import android.widget.CheckBox; +import android.widget.EditText; import android.widget.ImageView; import android.widget.ListView; import android.widget.PopupMenu; @@ -704,6 +705,7 @@ public class HeadlinesFragment extends StateSavedFragment { public TextView titleView; public TextView feedTitleView; public ImageView markedView; + public ImageView scoreView; public ImageView publishedView; public TextView excerptView; public ImageView flavorImageView; @@ -747,6 +749,7 @@ public class HeadlinesFragment extends StateSavedFragment { feedTitleView = v.findViewById(R.id.feed_title); markedView = v.findViewById(R.id.marked); + scoreView = v.findViewById(R.id.score); publishedView = v.findViewById(R.id.published); excerptView = v.findViewById(R.id.excerpt); flavorImageView = v.findViewById(R.id.flavor_image); @@ -1034,6 +1037,72 @@ public class HeadlinesFragment extends StateSavedFragment { }); } + if (holder.scoreView != null) { + TypedValue tv = new TypedValue(); + int scoreAttr = R.attr.ic_action_trending_flat; + + if (article.score > 0) + scoreAttr = R.attr.ic_action_trending_up; + else if (article.score < 0) + scoreAttr = R.attr.ic_action_trending_down; + + m_activity.getTheme().resolveAttribute(scoreAttr, tv, true); + + holder.scoreView.setImageResource(tv.resourceId); + + if (article.score > Article.SCORE_HIGH) + holder.scoreView.setColorFilter(titleHighScoreUnreadColor); + else + holder.scoreView.setColorFilter(null); + + if (m_activity.getApiLevel() >= 16) { + holder.scoreView.setOnClickListener(new OnClickListener() { + @Override + public void onClick(View v) { + final EditText edit = new EditText(getActivity()); + edit.setText(String.valueOf(article.score)); + + AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()) + .setTitle(R.string.score_for_this_article) + .setPositiveButton(R.string.set_score, + new DialogInterface.OnClickListener() { + + @Override + public void onClick(DialogInterface dialog, + int which) { + + try { + int newScore = Integer.parseInt(edit.getText().toString()); + + article.score = newScore; + + m_activity.saveArticleScore(article); + + m_adapter.notifyItemChanged(m_list.getChildPosition(holder.view)); + } catch (NumberFormatException e) { + m_activity.toast(R.string.score_invalid); + e.printStackTrace(); + } + } + }) + .setNegativeButton(getString(R.string.cancel), + new DialogInterface.OnClickListener() { + + @Override + public void onClick(DialogInterface dialog, + int which) { + + // + + } + }).setView(edit); + + Dialog dialog = builder.create(); + dialog.show(); + } + }); + } + } if (holder.publishedView != null) { TypedValue tv = new TypedValue(); @@ -1662,9 +1731,9 @@ public class HeadlinesFragment extends StateSavedFragment { // store original color origTitleColors[viewType] = Integer.valueOf(tv.getCurrentTextColor()); - if (score < -500) { + if (score < Article.SCORE_LOW) { tv.setPaintFlags(tv.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG); - } else if (score > 500) { + } else if (score > Article.SCORE_HIGH) { tv.setTextColor(titleHighScoreUnreadColor); tv.setPaintFlags(tv.getPaintFlags() & ~Paint.STRIKE_THRU_TEXT_FLAG); } else { diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/MasterActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/MasterActivity.java index 121b836c..f7681e42 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/MasterActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/MasterActivity.java @@ -26,6 +26,7 @@ import org.fox.ttrss.types.FeedCategory; import java.util.Date; import java.util.HashMap; +import java.util.LinkedHashMap; import androidx.appcompat.app.ActionBarDrawerToggle; import androidx.appcompat.widget.Toolbar; @@ -367,45 +368,43 @@ public class MasterActivity extends OnlineActivity implements HeadlinesEventList case R.id.headlines_toggle_sort_order: Dialog dialog = new Dialog(this); - String sortMode = getSortMode(); + LinkedHashMap<String, String> sortModes = getSortModes(); - int selectedIndex = 0; + CharSequence[] sortTitles = sortModes.values().toArray(new CharSequence[0]); + final CharSequence[] sortNames = sortModes.keySet().toArray(new CharSequence[0]); - if (sortMode.equals("feed_dates")) { - selectedIndex = 1; - } else if (sortMode.equals("date_reverse")) { - selectedIndex = 2; - } else if (sortMode.equals("title")) { - selectedIndex = 3; - } + String currentMode = getSortMode(); + + int i = 0; + int selectedIndex = 0; + + for (CharSequence tmp : sortNames) { + if (tmp.equals(currentMode)) { + selectedIndex = i; + break; + } + + ++i; + } AlertDialog.Builder builder = new AlertDialog.Builder(this) .setTitle(getString(R.string.headlines_sort_articles_title)) .setSingleChoiceItems( - new String[] { - getString(R.string.headlines_sort_default), - getString(R.string.headlines_sort_newest_first), - getString(R.string.headlines_sort_oldest_first), - getString(R.string.headlines_sort_title) - }, + sortTitles, selectedIndex, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { - switch (which) { - case 0: - setSortMode("default"); - break; - case 1: - setSortMode("feed_dates"); - break; - case 2: - setSortMode("date_reverse"); - break; - case 3: - setSortMode("title"); - break; - } + + try { +// Log.d(TAG, "sort selected index:" + which + ": " + sortNames[which]); + + setSortMode((String)sortNames[which]); + + } catch (IndexOutOfBoundsException e) { + e.printStackTrace(); + } + dialog.cancel(); refresh(); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/OnlineActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/OnlineActivity.java index e8559d3e..f513173a 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/OnlineActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/OnlineActivity.java @@ -1,5 +1,6 @@ package org.fox.ttrss; +import android.annotation.SuppressLint; import android.annotation.TargetApi; import android.app.AlertDialog; import android.app.Dialog; @@ -31,6 +32,8 @@ import android.widget.EditText; import android.widget.ListView; import android.widget.TextView; +import com.github.javiersantos.appupdater.AppUpdater; +import com.github.javiersantos.appupdater.enums.UpdateFrom; import com.google.gson.Gson; import com.google.gson.JsonElement; import com.google.gson.JsonObject; @@ -48,7 +51,9 @@ import org.fox.ttrss.util.ImageCacheService; import java.lang.reflect.Type; import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.List; +import java.util.Map; import androidx.appcompat.view.ActionMode; import androidx.appcompat.widget.Toolbar; @@ -256,11 +261,20 @@ public class OnlineActivity extends CommonActivity { switchOfflineSuccess(); } else { checkTrial(false); + checkUpdates(); m_headlinesActionModeCallback = new HeadlinesActionModeCallback(); } } + protected void checkUpdates() { + if (BuildConfig.DEBUG || BuildConfig.ENABLE_UPDATER) { + new AppUpdater(this) + .setUpdateFrom(UpdateFrom.JSON) + .setUpdateJSON(String.format("https://srv.tt-rss.org/fdroid/updates/%1$s.json", this.getPackageName())) + .start(); + } + } protected void switchOffline() { AlertDialog.Builder builder = new AlertDialog.Builder(this) @@ -1164,24 +1178,28 @@ public class OnlineActivity extends CommonActivity { initMenu(); - List<PackageInfo> pkgs = getPackageManager() - .getInstalledPackages(0); - - for (PackageInfo p : pkgs) { - if ("org.fox.ttrss.key".equals(p.packageName)) { - Log.d(TAG, "license apk found"); - menu.findItem(R.id.donate).setVisible(false); - break; + if (BuildConfig.ENABLE_TRIAL && !BuildConfig.DEBUG) { + List<PackageInfo> pkgs = getPackageManager() + .getInstalledPackages(0); + + for (PackageInfo p : pkgs) { + if ("org.fox.ttrss.key".equals(p.packageName)) { + Log.d(TAG, "license apk found"); + menu.findItem(R.id.donate).setVisible(false); + break; + } } + } else { + menu.findItem(R.id.donate).setVisible(false); } - + return true; } public int getApiLevel() { return Application.getInstance().m_apiLevel; } - + protected void setApiLevel(int apiLevel) { Application.getInstance().m_apiLevel = apiLevel; } @@ -1208,6 +1226,27 @@ public class OnlineActivity extends CommonActivity { req.execute(map); } + public void saveArticleScore(final Article article) { + ApiRequest req = new ApiRequest(getApplicationContext()) { + protected void onPostExecute(JsonElement result) { + //toast(article.marked ? R.string.notify_article_marked : R.string.notify_article_unmarked); + invalidateOptionsMenu(); + } + }; + + HashMap<String, String> map = new HashMap<String, String>() { + { + put("sid", getSessionId()); + put("op", "updateArticle"); + put("article_ids", String.valueOf(article.id)); + put("data", String.valueOf(article.score)); + put("field", "4"); + } + }; + + req.execute(map); + } + public void saveArticleMarked(final Article article) { ApiRequest req = new ApiRequest(getApplicationContext()) { protected void onPostExecute(JsonElement result) { @@ -1291,8 +1330,45 @@ public class OnlineActivity extends CommonActivity { @Override public boolean onKeyDown(int keyCode, KeyEvent event) { + ArticlePager ap = (ArticlePager) getSupportFragmentManager().findFragmentByTag(FRAG_ARTICLE); + HeadlinesFragment hf = (HeadlinesFragment) getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES); + + switch (keyCode) { + case KeyEvent.KEYCODE_DPAD_LEFT: + if (ap != null && ap.isAdded()) { + ap.selectArticle(false); + return true; + } + break; + case KeyEvent.KEYCODE_DPAD_RIGHT: + if (ap != null && ap.isAdded()) { + ap.selectArticle(true); + return true; + } + break; + case KeyEvent.KEYCODE_ESCAPE: + moveTaskToBack(true); + return true; + case KeyEvent.KEYCODE_O: + if (ap != null && ap.getSelectedArticle() != null) { + openUri(Uri.parse(ap.getSelectedArticle().link)); + return true; + } + break; + case KeyEvent.KEYCODE_R: + refresh(); + return true; + case KeyEvent.KEYCODE_U: + if (ap != null && ap.getSelectedArticle() != null) { + Article a = ap.getSelectedArticle(); + a.unread = !a.unread; + saveArticleUnread(a); + if (hf != null) hf.notifyUpdated(); + } + return true; + } + if (m_prefs.getBoolean("use_volume_keys", false)) { - ArticlePager ap = (ArticlePager) getSupportFragmentManager().findFragmentByTag(FRAG_ARTICLE); if (ap != null && ap.isAdded()) { switch (keyCode) { @@ -1506,6 +1582,7 @@ public class OnlineActivity extends CommonActivity { } @SuppressWarnings("unchecked") + @SuppressLint("StaticFieldLeak") protected void onPostExecute(JsonElement result) { if (result != null) { try { @@ -1521,6 +1598,20 @@ public class OnlineActivity extends CommonActivity { if (apiLevel != null) { setApiLevel(apiLevel.getAsInt()); Log.d(TAG, "Received API level: " + getApiLevel()); + + // get custom sort from configuration object + if (getApiLevel() >= 17) { + + // daemon_is_running, icons_dir, etc... + JsonObject config = content.get("config").getAsJsonObject(); + + Type hashType = new TypeToken<Map<String, String>>(){}.getType(); + Map<String, String> customSortTypes = new Gson().fromJson(config.get("custom_sort_types"), hashType); + + setCustomSortModes(customSortTypes); + + Log.d(TAG, "test"); + } if (m_listener != null) { m_listener.OnLoginSuccess(); @@ -1602,7 +1693,20 @@ public class OnlineActivity extends CommonActivity { } - public String getSortMode() { + public LinkedHashMap<String, String> getSortModes() { + LinkedHashMap<String, String> tmp = new LinkedHashMap<String, String>(); + + tmp.put("default", getString(R.string.headlines_sort_default)); + tmp.put("feed_dates", getString(R.string.headlines_sort_newest_first)); + tmp.put("date_reverse", getString(R.string.headlines_sort_oldest_first)); + tmp.put("title", getString(R.string.headlines_sort_title)); + + tmp.putAll(Application.getInstance().m_customSortModes); + + return tmp; + } + + public String getSortMode() { return m_prefs.getString("headlines_sort_mode", "default"); } @@ -1612,6 +1716,11 @@ public class OnlineActivity extends CommonActivity { editor.apply(); } + private synchronized void setCustomSortModes(Map<String, String> modes) { + Application.getInstance().m_customSortModes.clear(); + Application.getInstance().m_customSortModes.putAll(modes); + } + public void setViewMode(String viewMode) { SharedPreferences.Editor editor = m_prefs.edit(); editor.putString("view_mode", viewMode); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineArticleFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineArticleFragment.java index 441ec62b..a3b152a7 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineArticleFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineArticleFragment.java @@ -235,6 +235,11 @@ public class OfflineArticleFragment extends Fragment { } + ImageView score = view.findViewById(R.id.score); + + if (score != null) { + score.setVisibility(View.GONE); + } ImageView attachments = view.findViewById(R.id.attachments); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java index 3d9e1229..470b0aac 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java @@ -505,6 +505,7 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis public View flavorImageOverflow; public View headlineHeader; public ImageView attachmentsView; + public ImageView scoreView; public ArticleViewHolder(View v) { @@ -549,6 +550,7 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis headlineHeader = v.findViewById(R.id.headline_header); flavorImageOverflow = v.findViewById(R.id.gallery_overflow); attachmentsView = v.findViewById(R.id.attachments); + scoreView = v.findViewById(R.id.score); } } @@ -794,6 +796,10 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis holder.attachmentsView.setVisibility(View.GONE); } + if (holder.scoreView != null) { + holder.scoreView.setVisibility(View.GONE); + } + if (holder.markedView != null) { TypedValue tv = new TypedValue(); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineMasterActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineMasterActivity.java index cdaa794e..0a3b6378 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineMasterActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineMasterActivity.java @@ -25,6 +25,8 @@ import androidx.drawerlayout.widget.DrawerLayout; import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentTransaction; +import java.util.HashMap; + public class OfflineMasterActivity extends OfflineActivity implements OfflineHeadlinesEventListener { private final String TAG = this.getClass().getSimpleName(); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/types/Article.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/types/Article.java index a11cd0ac..2daaba49 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/types/Article.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/types/Article.java @@ -21,6 +21,9 @@ public class Article implements Parcelable { public static final int FLAVOR_KIND_VIDEO = 2; public static final int FLAVOR_KIND_YOUTUBE = 3; + public static final int SCORE_LOW = -500; + public static final int SCORE_HIGH = 500; + public int id; public boolean unread; public boolean marked; diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/util/ImageCacheService.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/util/ImageCacheService.java index f07e23c2..24a7a732 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/util/ImageCacheService.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/util/ImageCacheService.java @@ -132,7 +132,7 @@ public class ImageCacheService extends IntentService { digest.update(s.getBytes()); byte messageDigest[] = digest.digest(); - StringBuffer hexString = new StringBuffer(); + StringBuilder hexString = new StringBuilder(); for (int i=0; i<messageDigest.length; i++) hexString.append(Integer.toHexString(0xFF & messageDigest[i])); diff --git a/org.fox.ttrss/src/main/res/drawable-hdpi/ic_action_trending_down.png b/org.fox.ttrss/src/main/res/drawable-hdpi/ic_action_trending_down.png Binary files differnew file mode 100644 index 00000000..d84624ca --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable-hdpi/ic_action_trending_down.png diff --git a/org.fox.ttrss/src/main/res/drawable-hdpi/ic_action_trending_down_dark.png b/org.fox.ttrss/src/main/res/drawable-hdpi/ic_action_trending_down_dark.png Binary files differnew file mode 100644 index 00000000..1b4e2ac6 --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable-hdpi/ic_action_trending_down_dark.png diff --git a/org.fox.ttrss/src/main/res/drawable-hdpi/ic_action_trending_flat.png b/org.fox.ttrss/src/main/res/drawable-hdpi/ic_action_trending_flat.png Binary files differnew file mode 100644 index 00000000..ec65283b --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable-hdpi/ic_action_trending_flat.png diff --git a/org.fox.ttrss/src/main/res/drawable-hdpi/ic_action_trending_flat_dark.png b/org.fox.ttrss/src/main/res/drawable-hdpi/ic_action_trending_flat_dark.png Binary files differnew file mode 100644 index 00000000..d877db05 --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable-hdpi/ic_action_trending_flat_dark.png diff --git a/org.fox.ttrss/src/main/res/drawable-hdpi/ic_action_trending_up.png b/org.fox.ttrss/src/main/res/drawable-hdpi/ic_action_trending_up.png Binary files differnew file mode 100644 index 00000000..68945759 --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable-hdpi/ic_action_trending_up.png diff --git a/org.fox.ttrss/src/main/res/drawable-hdpi/ic_action_trending_up_dark.png b/org.fox.ttrss/src/main/res/drawable-hdpi/ic_action_trending_up_dark.png Binary files differnew file mode 100644 index 00000000..b3ecbf00 --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable-hdpi/ic_action_trending_up_dark.png diff --git a/org.fox.ttrss/src/main/res/drawable-mdpi/ic_action_trending_down.png b/org.fox.ttrss/src/main/res/drawable-mdpi/ic_action_trending_down.png Binary files differnew file mode 100644 index 00000000..7dcdca0e --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable-mdpi/ic_action_trending_down.png diff --git a/org.fox.ttrss/src/main/res/drawable-mdpi/ic_action_trending_down_dark.png b/org.fox.ttrss/src/main/res/drawable-mdpi/ic_action_trending_down_dark.png Binary files differnew file mode 100644 index 00000000..37ea9a33 --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable-mdpi/ic_action_trending_down_dark.png diff --git a/org.fox.ttrss/src/main/res/drawable-mdpi/ic_action_trending_flat.png b/org.fox.ttrss/src/main/res/drawable-mdpi/ic_action_trending_flat.png Binary files differnew file mode 100644 index 00000000..7b47abd1 --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable-mdpi/ic_action_trending_flat.png diff --git a/org.fox.ttrss/src/main/res/drawable-mdpi/ic_action_trending_flat_dark.png b/org.fox.ttrss/src/main/res/drawable-mdpi/ic_action_trending_flat_dark.png Binary files differnew file mode 100644 index 00000000..d9251d44 --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable-mdpi/ic_action_trending_flat_dark.png diff --git a/org.fox.ttrss/src/main/res/drawable-mdpi/ic_action_trending_up.png b/org.fox.ttrss/src/main/res/drawable-mdpi/ic_action_trending_up.png Binary files differnew file mode 100644 index 00000000..fe3218cf --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable-mdpi/ic_action_trending_up.png diff --git a/org.fox.ttrss/src/main/res/drawable-mdpi/ic_action_trending_up_dark.png b/org.fox.ttrss/src/main/res/drawable-mdpi/ic_action_trending_up_dark.png Binary files differnew file mode 100644 index 00000000..5af3c92e --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable-mdpi/ic_action_trending_up_dark.png diff --git a/org.fox.ttrss/src/main/res/drawable-xhdpi/ic_action_trending_down.png b/org.fox.ttrss/src/main/res/drawable-xhdpi/ic_action_trending_down.png Binary files differnew file mode 100644 index 00000000..53ff92a2 --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable-xhdpi/ic_action_trending_down.png diff --git a/org.fox.ttrss/src/main/res/drawable-xhdpi/ic_action_trending_down_dark.png b/org.fox.ttrss/src/main/res/drawable-xhdpi/ic_action_trending_down_dark.png Binary files differnew file mode 100644 index 00000000..0f15737f --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable-xhdpi/ic_action_trending_down_dark.png diff --git a/org.fox.ttrss/src/main/res/drawable-xhdpi/ic_action_trending_flat.png b/org.fox.ttrss/src/main/res/drawable-xhdpi/ic_action_trending_flat.png Binary files differnew file mode 100644 index 00000000..33d96f00 --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable-xhdpi/ic_action_trending_flat.png diff --git a/org.fox.ttrss/src/main/res/drawable-xhdpi/ic_action_trending_flat_dark.png b/org.fox.ttrss/src/main/res/drawable-xhdpi/ic_action_trending_flat_dark.png Binary files differnew file mode 100644 index 00000000..8c1ea784 --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable-xhdpi/ic_action_trending_flat_dark.png diff --git a/org.fox.ttrss/src/main/res/drawable-xhdpi/ic_action_trending_up.png b/org.fox.ttrss/src/main/res/drawable-xhdpi/ic_action_trending_up.png Binary files differnew file mode 100644 index 00000000..33b01737 --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable-xhdpi/ic_action_trending_up.png diff --git a/org.fox.ttrss/src/main/res/drawable-xhdpi/ic_action_trending_up_dark.png b/org.fox.ttrss/src/main/res/drawable-xhdpi/ic_action_trending_up_dark.png Binary files differnew file mode 100644 index 00000000..ec479dbf --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable-xhdpi/ic_action_trending_up_dark.png diff --git a/org.fox.ttrss/src/main/res/drawable-xxhdpi/ic_action_trending_down.png b/org.fox.ttrss/src/main/res/drawable-xxhdpi/ic_action_trending_down.png Binary files differnew file mode 100644 index 00000000..c2ec115e --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable-xxhdpi/ic_action_trending_down.png diff --git a/org.fox.ttrss/src/main/res/drawable-xxhdpi/ic_action_trending_down_dark.png b/org.fox.ttrss/src/main/res/drawable-xxhdpi/ic_action_trending_down_dark.png Binary files differnew file mode 100644 index 00000000..02183b60 --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable-xxhdpi/ic_action_trending_down_dark.png diff --git a/org.fox.ttrss/src/main/res/drawable-xxhdpi/ic_action_trending_flat.png b/org.fox.ttrss/src/main/res/drawable-xxhdpi/ic_action_trending_flat.png Binary files differnew file mode 100644 index 00000000..7b51ffcc --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable-xxhdpi/ic_action_trending_flat.png diff --git a/org.fox.ttrss/src/main/res/drawable-xxhdpi/ic_action_trending_flat_dark.png b/org.fox.ttrss/src/main/res/drawable-xxhdpi/ic_action_trending_flat_dark.png Binary files differnew file mode 100644 index 00000000..f55069c1 --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable-xxhdpi/ic_action_trending_flat_dark.png diff --git a/org.fox.ttrss/src/main/res/drawable-xxhdpi/ic_action_trending_up.png b/org.fox.ttrss/src/main/res/drawable-xxhdpi/ic_action_trending_up.png Binary files differnew file mode 100644 index 00000000..dd732d55 --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable-xxhdpi/ic_action_trending_up.png diff --git a/org.fox.ttrss/src/main/res/drawable-xxhdpi/ic_action_trending_up_dark.png b/org.fox.ttrss/src/main/res/drawable-xxhdpi/ic_action_trending_up_dark.png Binary files differnew file mode 100644 index 00000000..f8d6b481 --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable-xxhdpi/ic_action_trending_up_dark.png diff --git a/org.fox.ttrss/src/main/res/drawable-xxxhdpi/ic_action_trending_down.png b/org.fox.ttrss/src/main/res/drawable-xxxhdpi/ic_action_trending_down.png Binary files differnew file mode 100644 index 00000000..ef0c2a10 --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable-xxxhdpi/ic_action_trending_down.png diff --git a/org.fox.ttrss/src/main/res/drawable-xxxhdpi/ic_action_trending_down_dark.png b/org.fox.ttrss/src/main/res/drawable-xxxhdpi/ic_action_trending_down_dark.png Binary files differnew file mode 100644 index 00000000..7dd24dcd --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable-xxxhdpi/ic_action_trending_down_dark.png diff --git a/org.fox.ttrss/src/main/res/drawable-xxxhdpi/ic_action_trending_flat.png b/org.fox.ttrss/src/main/res/drawable-xxxhdpi/ic_action_trending_flat.png Binary files differnew file mode 100644 index 00000000..26cffdf5 --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable-xxxhdpi/ic_action_trending_flat.png diff --git a/org.fox.ttrss/src/main/res/drawable-xxxhdpi/ic_action_trending_flat_dark.png b/org.fox.ttrss/src/main/res/drawable-xxxhdpi/ic_action_trending_flat_dark.png Binary files differnew file mode 100644 index 00000000..bd78a122 --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable-xxxhdpi/ic_action_trending_flat_dark.png diff --git a/org.fox.ttrss/src/main/res/drawable-xxxhdpi/ic_action_trending_up.png b/org.fox.ttrss/src/main/res/drawable-xxxhdpi/ic_action_trending_up.png Binary files differnew file mode 100644 index 00000000..0d020b1f --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable-xxxhdpi/ic_action_trending_up.png diff --git a/org.fox.ttrss/src/main/res/drawable-xxxhdpi/ic_action_trending_up_dark.png b/org.fox.ttrss/src/main/res/drawable-xxxhdpi/ic_action_trending_up_dark.png Binary files differnew file mode 100644 index 00000000..7a750aa4 --- /dev/null +++ b/org.fox.ttrss/src/main/res/drawable-xxxhdpi/ic_action_trending_up_dark.png diff --git a/org.fox.ttrss/src/main/res/layout/activity_subscribe.xml b/org.fox.ttrss/src/main/res/layout/activity_subscribe.xml index 8027faf4..11a5c334 100644 --- a/org.fox.ttrss/src/main/res/layout/activity_subscribe.xml +++ b/org.fox.ttrss/src/main/res/layout/activity_subscribe.xml @@ -59,7 +59,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="0.5" - android:text="Update categories" /> + android:text="@string/update_categories" /> <Button style="?android:attr/buttonBarButtonStyle" diff --git a/org.fox.ttrss/src/main/res/layout/drawer_header.xml b/org.fox.ttrss/src/main/res/layout/drawer_header.xml index d39cdad0..dd72e68c 100755 --- a/org.fox.ttrss/src/main/res/layout/drawer_header.xml +++ b/org.fox.ttrss/src/main/res/layout/drawer_header.xml @@ -2,6 +2,7 @@ <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="120dp" + xmlns:tools="http://schemas.android.com/tools" android:orientation="vertical" android:weightSum="1" android:clickable="false"> @@ -47,7 +48,7 @@ android:layout_height="wrap_content" android:layout_marginLeft="16dp" android:textColor="@android:color/primary_text_dark" - android:text="test" + tools:text="test" android:textSize="14sp" android:textStyle="bold" @@ -60,7 +61,7 @@ android:textColor="@android:color/primary_text_dark" android:layout_marginLeft="16dp" android:layout_marginTop="5dp" - android:text="example.org" + tools:text="example.org" android:textSize="14sp" android:textStyle="normal" diff --git a/org.fox.ttrss/src/main/res/layout/feeds_row_selected.xml b/org.fox.ttrss/src/main/res/layout/feeds_row_selected.xml index 9e14e56e..a6aa2599 100755 --- a/org.fox.ttrss/src/main/res/layout/feeds_row_selected.xml +++ b/org.fox.ttrss/src/main/res/layout/feeds_row_selected.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" android:id="@+id/feeds_row" android:layout_width="match_parent" android:layout_height="wrap_content" @@ -33,7 +34,7 @@ android:ellipsize="end" android:paddingLeft="35dp" android:singleLine="true" - android:text="Feed" + tools:text="Feed" android:paddingBottom="2dp" android:textColor="?feedlistSelectedTextColor" android:textSize="14sp" /> @@ -45,7 +46,7 @@ android:layout_height="wrap_content" android:layout_weight="0" android:singleLine="true" - android:text="3200" + tools:text="3200" android:layout_marginLeft="16dp" android:textColor="?unreadCounterColor" android:textSize="14sp" /> diff --git a/org.fox.ttrss/src/main/res/layout/feeds_row_toggle.xml b/org.fox.ttrss/src/main/res/layout/feeds_row_toggle.xml index 86875240..32ef6756 100755 --- a/org.fox.ttrss/src/main/res/layout/feeds_row_toggle.xml +++ b/org.fox.ttrss/src/main/res/layout/feeds_row_toggle.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" android:id="@+id/feeds_row" android:layout_width="match_parent" android:layout_height="wrap_content" @@ -31,7 +32,7 @@ android:ellipsize="end" android:paddingLeft="35dp" android:singleLine="true" - android:text="Feed" + tools:text="Feed" android:paddingBottom="2dp" android:textColor="?feedlistTextColor" android:textSize="14sp" /> diff --git a/org.fox.ttrss/src/main/res/layout/fragment_article.xml b/org.fox.ttrss/src/main/res/layout/fragment_article.xml index 0dd14149..eb2511d9 100755 --- a/org.fox.ttrss/src/main/res/layout/fragment_article.xml +++ b/org.fox.ttrss/src/main/res/layout/fragment_article.xml @@ -46,6 +46,17 @@ android:textSize="18sp" /> <ImageView + android:id="@+id/score" + android:layout_width="wrap_content" + android:layout_height="24dp" + android:layout_weight="0" + android:background="@drawable/ripple" + android:clickable="true" + android:layout_marginLeft="8dp" + android:src="?ic_action_trending_flat" + android:layout_gravity="center_vertical|right" /> + + <ImageView android:id="@+id/attachments" android:background="@drawable/ripple" android:layout_width="wrap_content" diff --git a/org.fox.ttrss/src/main/res/layout/headlines_row.xml b/org.fox.ttrss/src/main/res/layout/headlines_row.xml index 97684a94..41f4ee81 100755 --- a/org.fox.ttrss/src/main/res/layout/headlines_row.xml +++ b/org.fox.ttrss/src/main/res/layout/headlines_row.xml @@ -3,8 +3,7 @@ xmlns:tools="http://schemas.android.com/tools" android:id="@+id/headlines_row" android:layout_width="wrap_content" - android:layout_height="wrap_content" - tools:ignore="HardcodedText"> + android:layout_height="wrap_content"> <TableLayout android:layout_width="fill_parent" @@ -86,11 +85,10 @@ android:background="@drawable/ripple" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_span="2" android:gravity="center_vertical" android:paddingBottom="8dp" android:singleLine="false" - android:text="Sample entry title" + tools:text="Sample entry title" android:textColor="?headlineExcerptTextColor" android:textSize="18sp" android:textStyle="normal" @@ -113,7 +111,7 @@ android:fontFamily="sans-serif-light" android:gravity="center_vertical" android:singleLine="true" - android:text="Example Feed AAA AAA AAAAAA AAAA AAAAA AA A A AA AA" + tools:text="Example Feed AAA AAA AAAAAA AAAA AAAAA AA A A AA AA" android:textColor="?headlineSecondaryTextColor" android:textSize="12sp" /> @@ -126,7 +124,7 @@ android:fontFamily="sans-serif-light" android:gravity="right|center_vertical" android:singleLine="true" - android:text="Jan 01, 12:00, 1970" + tools:text="Jan 01, 12:00, 1970" android:textColor="?headlineSecondaryTextColor" android:textSize="12sp" /> @@ -165,7 +163,8 @@ android:layout_gravity="bottom|right" android:elevation="4dp" android:tint="?colorAccent" - android:layout_marginBottom="10dp" /> + android:layout_marginBottom="10dp" + tools:targetApi="lollipop" /> </FrameLayout> </TableRow> @@ -183,7 +182,7 @@ android:lineSpacingExtra="2sp" android:maxLines="5" android:padding="16dp" - android:text="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." + tools:text="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." android:textColor="?headlineExcerptTextColor" android:textSize="13sp" /> </TableRow> @@ -217,12 +216,23 @@ android:fontFamily="sans-serif-light" android:gravity="center_vertical" android:singleLine="true" - android:text="by Author" + tools:text="by Author" android:textColor="?headlineSecondaryTextColor" android:textSize="12sp" android:textStyle="italic" /> <ImageView + android:id="@+id/score" + android:layout_width="wrap_content" + android:layout_height="24dp" + android:layout_weight="0" + android:background="@drawable/ripple" + android:clickable="true" + android:paddingLeft="4dp" + android:paddingRight="4dp" + android:src="?ic_action_trending_flat" /> + + <ImageView android:id="@+id/attachments" android:layout_width="wrap_content" android:layout_height="24dp" diff --git a/org.fox.ttrss/src/main/res/layout/headlines_row_unread.xml b/org.fox.ttrss/src/main/res/layout/headlines_row_unread.xml index d44e016a..02fea821 100755 --- a/org.fox.ttrss/src/main/res/layout/headlines_row_unread.xml +++ b/org.fox.ttrss/src/main/res/layout/headlines_row_unread.xml @@ -4,8 +4,7 @@ android:id="@+id/headlines_row" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:background="?headlineUnreadBackground" - tools:ignore="HardcodedText"> + android:background="?headlineUnreadBackground"> <TableLayout android:layout_width="fill_parent" @@ -14,7 +13,6 @@ android:shrinkColumns="0,1" android:stretchColumns="0,1"> - <TableRow android:layout_width="fill_parent" android:layout_height="wrap_content"> @@ -114,7 +112,7 @@ android:fontFamily="sans-serif-light" android:gravity="center_vertical" android:singleLine="true" - android:text="Example Feed AAA AAA AAAAAA AAAA AAAAA AA A A AA AA" + tools:text="Example Feed AAA AAA AAAAAA AAAA AAAAA AA A A AA AA" android:textColor="?headlineSecondaryTextColor" android:textSize="12sp" /> @@ -127,7 +125,7 @@ android:fontFamily="sans-serif-light" android:gravity="right|center_vertical" android:singleLine="true" - android:text="Jan 01, 12:00, 1970" + tools:text="Jan 01, 12:00, 1970" android:textColor="?headlineSecondaryTextColor" android:textSize="12sp" /> @@ -163,8 +161,10 @@ android:paddingRight="4dp" android:src="@drawable/ic_dots_vertical_circle" android:layout_gravity="bottom|right" + android:elevation="4dp" android:tint="?colorAccent" - android:layout_marginBottom="10dp" /> + android:layout_marginBottom="10dp" + tools:targetApi="lollipop" /> </FrameLayout> </TableRow> @@ -182,7 +182,7 @@ android:lineSpacingExtra="2sp" android:maxLines="5" android:padding="16dp" - android:text="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." + tools:text="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." android:textColor="?headlineExcerptTextColor" android:textSize="13sp" /> </TableRow> @@ -216,12 +216,23 @@ android:fontFamily="sans-serif-light" android:gravity="center_vertical" android:singleLine="true" - android:text="by Author" + tools:text="by Author" android:textColor="?headlineSecondaryTextColor" android:textSize="12sp" android:textStyle="italic" /> <ImageView + android:id="@+id/score" + android:layout_width="wrap_content" + android:layout_height="24dp" + android:layout_weight="0" + android:background="@drawable/ripple" + android:clickable="true" + android:paddingLeft="4dp" + android:paddingRight="4dp" + android:src="?ic_action_trending_flat" /> + + <ImageView android:id="@+id/attachments" android:layout_width="wrap_content" android:layout_height="24dp" diff --git a/org.fox.ttrss/src/main/res/values-night/style.xml b/org.fox.ttrss/src/main/res/values-night/style.xml index e9b143df..3c15a0fd 100644 --- a/org.fox.ttrss/src/main/res/values-night/style.xml +++ b/org.fox.ttrss/src/main/res/values-night/style.xml @@ -57,6 +57,9 @@ <item name="ic_dots_vertical_circle">@drawable/ic_dots_vertical_circle</item> <item name="ic_attachment">@drawable/ic_attachment</item> <item name="ic_attachment_vert">@drawable/ic_attachment_vert</item> + <item name="ic_action_trending_up">@drawable/ic_action_trending_up</item> + <item name="ic_action_trending_flat">@drawable/ic_action_trending_flat</item> + <item name="ic_action_trending_down">@drawable/ic_action_trending_down</item> <item name="drawer_header">@drawable/drawer_header_dark</item> </style> diff --git a/org.fox.ttrss/src/main/res/values/attrs.xml b/org.fox.ttrss/src/main/res/values/attrs.xml index cc0f84b6..93892545 100755 --- a/org.fox.ttrss/src/main/res/values/attrs.xml +++ b/org.fox.ttrss/src/main/res/values/attrs.xml @@ -53,4 +53,7 @@ <attr name="drawer_header" format="reference" /> <attr name="ic_restore" format="reference" /> <attr name="ic_inbox" format="reference" /> + <attr name="ic_action_trending_up" format="reference" /> + <attr name="ic_action_trending_flat" format="reference" /> + <attr name="ic_action_trending_down" format="reference" /> </resources>
\ No newline at end of file diff --git a/org.fox.ttrss/src/main/res/values/strings.xml b/org.fox.ttrss/src/main/res/values/strings.xml index ef0013ea..f4d0119c 100755 --- a/org.fox.ttrss/src/main/res/values/strings.xml +++ b/org.fox.ttrss/src/main/res/values/strings.xml @@ -293,4 +293,8 @@ <string name="img_share_url">Share URL</string> <string name="img_share_image">Share image</string> <string name="img_share_failed_to_load">Failed to load image for sharing</string> + <string name="update_categories">Update categories</string> + <string name="score_for_this_article">Score for this article</string> + <string name="set_score">Set score</string> + <string name="score_invalid">Invalid score</string> </resources> diff --git a/org.fox.ttrss/src/main/res/values/style.xml b/org.fox.ttrss/src/main/res/values/style.xml index ecc13527..033a9492 100755 --- a/org.fox.ttrss/src/main/res/values/style.xml +++ b/org.fox.ttrss/src/main/res/values/style.xml @@ -63,6 +63,9 @@ <item name="ic_dots_vertical_circle">@drawable/ic_dots_vertical_circle_dark</item> <item name="ic_attachment">@drawable/ic_attachment_dark</item> <item name="ic_attachment_vert">@drawable/ic_attachment_vert_dark</item> + <item name="ic_action_trending_up">@drawable/ic_action_trending_up_dark</item> + <item name="ic_action_trending_flat">@drawable/ic_action_trending_flat_dark</item> + <item name="ic_action_trending_down">@drawable/ic_action_trending_down_dark</item> <item name="drawer_header">@drawable/drawer_header</item> </style> |