diff --git a/libs/android-support-v4.jar b/libs/android-support-v4.jar index 6080877d..187bdf48 100644 Binary files a/libs/android-support-v4.jar and b/libs/android-support-v4.jar differ diff --git a/project.properties b/project.properties index 1b18cf3a..9b10e91b 100644 --- a/project.properties +++ b/project.properties @@ -8,10 +8,9 @@ # project structure. # Project target. -target=android-17 +target=android-19 android.library.reference.1=..\\Android-ViewPagerIndicator\\library -android.library.reference.2=..\\ActionBarSherlock\\actionbarsherlock -android.library.reference.3=..\\SlidingMenu\\library +android.library.reference.2=..\\tasker-locale-api +android.library.reference.3=..\\appcompat android.library.reference.4=..\\ActionBar-PullToRefresh\\library -android.library.reference.5=..\\ActionBar-PullToRefresh\\extras\\pulltorefresh-actionbarsherlock -android.library.reference.6=../tasker-locale-api +android.library.reference.5=../SlidingMenu/library diff --git a/res/menu/article_content_img_context_menu.xml b/res/menu/article_content_img_context_menu.xml index 128a21df..691a1401 100644 --- a/res/menu/article_content_img_context_menu.xml +++ b/res/menu/article_content_img_context_menu.xml @@ -1,26 +1,26 @@ - + diff --git a/res/menu/article_link_context_menu.xml b/res/menu/article_link_context_menu.xml index 21fa3f76..8317d5e0 100644 --- a/res/menu/article_link_context_menu.xml +++ b/res/menu/article_link_context_menu.xml @@ -1,13 +1,13 @@ - + \ No newline at end of file diff --git a/res/menu/headlines_action_menu.xml b/res/menu/headlines_action_menu.xml index f6e97d93..462fac40 100644 --- a/res/menu/headlines_action_menu.xml +++ b/res/menu/headlines_action_menu.xml @@ -1,21 +1,21 @@ - + \ No newline at end of file diff --git a/res/menu/headlines_context_menu.xml b/res/menu/headlines_context_menu.xml index d50fac1d..de930a23 100644 --- a/res/menu/headlines_context_menu.xml +++ b/res/menu/headlines_context_menu.xml @@ -1,41 +1,41 @@ - + diff --git a/res/menu/main_menu.xml b/res/menu/main_menu.xml index b6708983..e4a9776b 100644 --- a/res/menu/main_menu.xml +++ b/res/menu/main_menu.xml @@ -1,4 +1,4 @@ - + @@ -7,74 +7,74 @@ --> @@ -82,53 +82,53 @@ diff --git a/res/menu/offline_menu.xml b/res/menu/offline_menu.xml index 90e2e4aa..a1bbf222 100644 --- a/res/menu/offline_menu.xml +++ b/res/menu/offline_menu.xml @@ -1,64 +1,64 @@ - + @@ -66,22 +66,22 @@ \ No newline at end of file diff --git a/res/menu/share_menu.xml b/res/menu/share_menu.xml index 7eb79800..f2cb8145 100644 --- a/res/menu/share_menu.xml +++ b/res/menu/share_menu.xml @@ -1,9 +1,9 @@ - + \ No newline at end of file diff --git a/res/values-v14/arrays.xml b/res/values-v14/arrays.xml deleted file mode 100644 index 349182f2..00000000 --- a/res/values-v14/arrays.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - @string/theme_dark - @string/theme_dark_gray - @string/theme_light - @string/theme_sepia - @string/theme_system - - - THEME_DARK - THEME_DARK_GRAY - THEME_LIGHT - THEME_SEPIA - THEME_SYSTEM - - \ No newline at end of file diff --git a/res/values/style.xml b/res/values/style.xml index f5cdda92..0d2a1153 100644 --- a/res/values/style.xml +++ b/res/values/style.xml @@ -1,5 +1,5 @@ - - - - - diff --git a/src/org/fox/ttrss/CommonActivity.java b/src/org/fox/ttrss/CommonActivity.java index a844df39..ec8e75e2 100644 --- a/src/org/fox/ttrss/CommonActivity.java +++ b/src/org/fox/ttrss/CommonActivity.java @@ -8,15 +8,14 @@ import android.database.sqlite.SQLiteDatabase; import android.graphics.Point; import android.os.Bundle; import android.preference.PreferenceManager; +import android.support.v7.app.ActionBarActivity; import android.util.Log; import android.view.Display; import android.view.View; import android.widget.TextView; import android.widget.Toast; -import com.actionbarsherlock.app.SherlockFragmentActivity; - -public class CommonActivity extends SherlockFragmentActivity { +public class CommonActivity extends ActionBarActivity { private final String TAG = this.getClass().getSimpleName(); public final static String FRAG_HEADLINES = "headlines"; @@ -184,8 +183,6 @@ public class CommonActivity extends SherlockFragmentActivity { if (prefs.getString("theme", defaultTheme).equals("THEME_DARK")) { setTheme(R.style.DarkTheme); - } else if (prefs.getString("theme", defaultTheme).equals("THEME_SYSTEM")) { - setTheme(R.style.SystemTheme); } else if (prefs.getString("theme", defaultTheme).equals("THEME_SEPIA")) { setTheme(R.style.SepiaTheme); } else if (prefs.getString("theme", defaultTheme).equals("THEME_DARK_GRAY")) { diff --git a/src/org/fox/ttrss/FeedsActivity.java b/src/org/fox/ttrss/FeedsActivity.java index 2e1a55e5..fd283369 100644 --- a/src/org/fox/ttrss/FeedsActivity.java +++ b/src/org/fox/ttrss/FeedsActivity.java @@ -12,20 +12,17 @@ import org.fox.ttrss.util.AppRater; import android.animation.ObjectAnimator; import android.annotation.SuppressLint; -import android.content.ComponentName; import android.content.Intent; -import android.content.Intent.ShortcutIconResource; import android.content.SharedPreferences; import android.os.Bundle; import android.os.Handler; -import android.os.Parcelable; import android.preference.PreferenceManager; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentTransaction; import android.util.Log; +import android.view.MenuItem; import android.widget.LinearLayout; -import com.actionbarsherlock.view.MenuItem; import com.google.gson.JsonElement; import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu; diff --git a/src/org/fox/ttrss/HeadlinesActivity.java b/src/org/fox/ttrss/HeadlinesActivity.java index e96f15a2..4eead0ec 100644 --- a/src/org/fox/ttrss/HeadlinesActivity.java +++ b/src/org/fox/ttrss/HeadlinesActivity.java @@ -4,8 +4,6 @@ import org.fox.ttrss.types.Article; import org.fox.ttrss.types.ArticleList; import org.fox.ttrss.types.Feed; -import com.actionbarsherlock.view.MenuItem; - import android.annotation.SuppressLint; import android.content.Intent; import android.content.SharedPreferences; @@ -14,6 +12,7 @@ import android.os.Handler; import android.preference.PreferenceManager; import android.support.v4.app.FragmentTransaction; import android.util.Log; +import android.view.MenuItem; import android.view.View; public class HeadlinesActivity extends OnlineActivity implements HeadlinesEventListener { diff --git a/src/org/fox/ttrss/OnlineActivity.java b/src/org/fox/ttrss/OnlineActivity.java index c082e797..a854f39a 100644 --- a/src/org/fox/ttrss/OnlineActivity.java +++ b/src/org/fox/ttrss/OnlineActivity.java @@ -17,8 +17,7 @@ import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.select.Elements; -import uk.co.senab.actionbarpulltorefresh.extras.actionbarsherlock.PullToRefreshAttacher; -import android.animation.ObjectAnimator; +import uk.co.senab.actionbarpulltorefresh.library.PullToRefreshAttacher; import android.annotation.TargetApi; import android.app.AlertDialog; import android.app.Dialog; @@ -37,20 +36,18 @@ import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.preference.PreferenceManager; -import android.support.v4.app.FragmentTransaction; +import android.support.v7.view.ActionMode; import android.util.Log; import android.view.KeyEvent; +import android.view.Menu; +import android.view.MenuInflater; +import android.view.MenuItem; import android.view.View; import android.view.Window; import android.widget.EditText; -import android.widget.FrameLayout; import android.widget.SearchView; import android.widget.TextView; -import com.actionbarsherlock.view.ActionMode; -import com.actionbarsherlock.view.Menu; -import com.actionbarsherlock.view.MenuInflater; -import com.actionbarsherlock.view.MenuItem; import com.google.gson.Gson; import com.google.gson.JsonElement; import com.google.gson.JsonObject; @@ -124,7 +121,7 @@ public class OnlineActivity extends CommonActivity { @Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { - MenuInflater inflater = getSupportMenuInflater(); + MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.headlines_action_menu, menu); return true; @@ -1259,7 +1256,7 @@ public class OnlineActivity extends CommonActivity { @Override public boolean onCreateOptionsMenu(Menu menu) { - MenuInflater inflater = getSupportMenuInflater(); + MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.main_menu, menu); m_menu = menu; @@ -1572,7 +1569,7 @@ public class OnlineActivity extends CommonActivity { if (hf != null) { if (hf.getSelectedArticles().size() > 0 && m_headlinesActionMode == null) { - m_headlinesActionMode = startActionMode(m_headlinesActionModeCallback); + m_headlinesActionMode = startSupportActionMode(m_headlinesActionModeCallback); } else if (hf.getSelectedArticles().size() == 0 && m_headlinesActionMode != null) { m_headlinesActionMode.finish(); } @@ -1580,38 +1577,41 @@ public class OnlineActivity extends CommonActivity { if (!isCompatMode()) { SearchView searchView = (SearchView) search.getActionView(); - searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() { - private String query = ""; - - @Override - public boolean onQueryTextSubmit(String query) { - HeadlinesFragment frag = (HeadlinesFragment) getSupportFragmentManager() - .findFragmentByTag(FRAG_HEADLINES); + + if (searchView != null) { + searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() { + private String query = ""; - if (frag != null) { - frag.setSearchQuery(query); - this.query = query; - } - - return false; - } - - @Override - public boolean onQueryTextChange(String newText) { - if (newText.equals("") && !newText.equals(this.query)) { + @Override + public boolean onQueryTextSubmit(String query) { HeadlinesFragment frag = (HeadlinesFragment) getSupportFragmentManager() .findFragmentByTag(FRAG_HEADLINES); if (frag != null) { - frag.setSearchQuery(newText); - this.query = newText; + frag.setSearchQuery(query); + this.query = query; } + + return false; } - return false; - } - }); - } + @Override + public boolean onQueryTextChange(String newText) { + if (newText.equals("") && !newText.equals(this.query)) { + HeadlinesFragment frag = (HeadlinesFragment) getSupportFragmentManager() + .findFragmentByTag(FRAG_HEADLINES); + + if (frag != null) { + frag.setSearchQuery(newText); + this.query = newText; + } + } + + return false; + } + }); + } + } } } diff --git a/src/org/fox/ttrss/offline/OfflineActivity.java b/src/org/fox/ttrss/offline/OfflineActivity.java index c879b0b1..fd05b596 100644 --- a/src/org/fox/ttrss/offline/OfflineActivity.java +++ b/src/org/fox/ttrss/offline/OfflineActivity.java @@ -21,19 +21,18 @@ import android.net.Uri; import android.os.Bundle; import android.preference.PreferenceManager; import android.provider.BaseColumns; +import android.support.v7.view.ActionMode; import android.util.Log; import android.view.KeyEvent; +import android.view.Menu; +import android.view.MenuInflater; +import android.view.MenuItem; import android.view.View; import android.view.Window; import android.widget.EditText; import android.widget.SearchView; import android.widget.TextView; -import com.actionbarsherlock.view.ActionMode; -import com.actionbarsherlock.view.Menu; -import com.actionbarsherlock.view.MenuInflater; -import com.actionbarsherlock.view.MenuItem; - public class OfflineActivity extends CommonActivity { private final String TAG = this.getClass().getSimpleName(); @@ -62,7 +61,7 @@ public class OfflineActivity extends CommonActivity { @Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { - MenuInflater inflater = getSupportMenuInflater(); + MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.headlines_action_menu, menu); return true; @@ -572,7 +571,7 @@ public class OfflineActivity extends CommonActivity { @Override public boolean onCreateOptionsMenu(Menu menu) { - MenuInflater inflater = getSupportMenuInflater(); + MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.offline_menu, menu); m_menu = menu; @@ -593,7 +592,7 @@ public class OfflineActivity extends CommonActivity { if (hf != null) { if (hf.getSelectedArticleCount() > 0 && m_headlinesActionMode == null) { - m_headlinesActionMode = startActionMode(m_headlinesActionModeCallback); + m_headlinesActionMode = startSupportActionMode(m_headlinesActionModeCallback); } else if (hf.getSelectedArticleCount() == 0 && m_headlinesActionMode != null) { m_headlinesActionMode.finish(); } @@ -628,37 +627,40 @@ public class OfflineActivity extends CommonActivity { MenuItem search = m_menu.findItem(R.id.search); SearchView searchView = (SearchView) search.getActionView(); - searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() { - private String query = ""; - - @Override - public boolean onQueryTextSubmit(String query) { - OfflineHeadlinesFragment frag = (OfflineHeadlinesFragment) getSupportFragmentManager() - .findFragmentByTag(FRAG_HEADLINES); + + if (searchView != null) { + searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() { + private String query = ""; - if (frag != null) { - frag.setSearchQuery(query); - this.query = query; - } - - return false; - } - - @Override - public boolean onQueryTextChange(String newText) { - if (newText.equals("") && !newText.equals(this.query)) { + @Override + public boolean onQueryTextSubmit(String query) { OfflineHeadlinesFragment frag = (OfflineHeadlinesFragment) getSupportFragmentManager() .findFragmentByTag(FRAG_HEADLINES); if (frag != null) { - frag.setSearchQuery(newText); - this.query = newText; + frag.setSearchQuery(query); + this.query = query; } + + return false; } - return false; - } - }); + @Override + public boolean onQueryTextChange(String newText) { + if (newText.equals("") && !newText.equals(this.query)) { + OfflineHeadlinesFragment frag = (OfflineHeadlinesFragment) getSupportFragmentManager() + .findFragmentByTag(FRAG_HEADLINES); + + if (frag != null) { + frag.setSearchQuery(newText); + this.query = newText; + } + } + + return false; + } + }); + } } } } diff --git a/src/org/fox/ttrss/offline/OfflineFeedsActivity.java b/src/org/fox/ttrss/offline/OfflineFeedsActivity.java index ac5ed128..c8a9cfc1 100644 --- a/src/org/fox/ttrss/offline/OfflineFeedsActivity.java +++ b/src/org/fox/ttrss/offline/OfflineFeedsActivity.java @@ -3,6 +3,8 @@ package org.fox.ttrss.offline; import org.fox.ttrss.GlobalState; import org.fox.ttrss.R; +import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu; + import android.animation.LayoutTransition; import android.annotation.SuppressLint; import android.content.Intent; @@ -14,12 +16,10 @@ import android.provider.BaseColumns; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentTransaction; import android.util.Log; +import android.view.MenuItem; import android.view.ViewGroup; import android.widget.LinearLayout; -import com.actionbarsherlock.view.MenuItem; -import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu; - public class OfflineFeedsActivity extends OfflineActivity implements OfflineHeadlinesEventListener { private final String TAG = this.getClass().getSimpleName(); diff --git a/src/org/fox/ttrss/offline/OfflineHeadlinesActivity.java b/src/org/fox/ttrss/offline/OfflineHeadlinesActivity.java index 644b7c61..128a5919 100644 --- a/src/org/fox/ttrss/offline/OfflineHeadlinesActivity.java +++ b/src/org/fox/ttrss/offline/OfflineHeadlinesActivity.java @@ -3,8 +3,6 @@ package org.fox.ttrss.offline; import org.fox.ttrss.GlobalState; import org.fox.ttrss.R; -import com.actionbarsherlock.view.MenuItem; - import android.annotation.SuppressLint; import android.content.Intent; import android.content.SharedPreferences; @@ -16,6 +14,7 @@ import android.provider.BaseColumns; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentTransaction; import android.util.Log; +import android.view.MenuItem; import android.view.View; public class OfflineHeadlinesActivity extends OfflineActivity implements OfflineHeadlinesEventListener {