notify to configure application when needed
rebuild with ACP update ADT
This commit is contained in:
parent
e7a78d9a7a
commit
a0753dd5df
@ -5,5 +5,6 @@
|
|||||||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
|
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
|
||||||
<classpathentry kind="lib" path="lib/gson-1.7.1.jar"/>
|
<classpathentry kind="lib" path="lib/gson-1.7.1.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/jsoup-1.6.1.jar"/>
|
<classpathentry kind="lib" path="lib/jsoup-1.6.1.jar"/>
|
||||||
|
<classpathentry kind="lib" path="libs/android-support-v4.jar"/>
|
||||||
<classpathentry kind="output" path="bin/classes"/>
|
<classpathentry kind="output" path="bin/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.fox.ttrss"
|
package="org.fox.ttrss"
|
||||||
android:versionCode="1"
|
android:versionCode="2"
|
||||||
android:versionName="0.1">
|
android:versionName="0.1.1">
|
||||||
<uses-sdk android:minSdkVersion="11" />
|
<uses-sdk android:minSdkVersion="10" />
|
||||||
<supports-screens android:smallScreens="false" android:normalScreens="false" />
|
<supports-screens android:smallScreens="false" android:normalScreens="false" />
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
2
default.properties
Normal file
2
default.properties
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Project target.
|
||||||
|
target=android-10
|
BIN
libs/android-support-v4.jar
Normal file
BIN
libs/android-support-v4.jar
Normal file
Binary file not shown.
@ -6,10 +6,10 @@ import java.text.SimpleDateFormat;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Fragment;
|
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
|
import android.support.v4.app.Fragment;
|
||||||
import android.text.Html;
|
import android.text.Html;
|
||||||
import android.text.method.LinkMovementMethod;
|
import android.text.method.LinkMovementMethod;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
|
@ -7,14 +7,13 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Fragment;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import android.util.Log;
|
import android.support.v4.app.Fragment;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
@ -12,13 +12,13 @@ import java.util.TimeZone;
|
|||||||
import org.jsoup.Jsoup;
|
import org.jsoup.Jsoup;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Fragment;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
|
import android.support.v4.app.Fragment;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
@ -5,13 +5,12 @@ import java.util.Timer;
|
|||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
|
|
||||||
import android.animation.LayoutTransition;
|
import android.animation.LayoutTransition;
|
||||||
import android.app.Activity;
|
|
||||||
import android.app.FragmentTransaction;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import android.text.method.HideReturnsTransformationMethod;
|
import android.support.v4.app.FragmentActivity;
|
||||||
|
import android.support.v4.app.FragmentTransaction;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
@ -20,12 +19,11 @@ import android.view.MenuItem;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import com.google.gson.JsonElement;
|
import com.google.gson.JsonElement;
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
|
|
||||||
public class MainActivity extends Activity implements FeedsFragment.OnFeedSelectedListener, HeadlinesFragment.OnArticleSelectedListener {
|
public class MainActivity extends FragmentActivity implements FeedsFragment.OnFeedSelectedListener, HeadlinesFragment.OnArticleSelectedListener {
|
||||||
private final String TAG = this.getClass().getSimpleName();
|
private final String TAG = this.getClass().getSimpleName();
|
||||||
|
|
||||||
private SharedPreferences m_prefs;
|
private SharedPreferences m_prefs;
|
||||||
@ -47,7 +45,7 @@ public class MainActivity extends Activity implements FeedsFragment.OnFeedSelect
|
|||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void refreshFeeds() {
|
public synchronized void refreshFeeds() {
|
||||||
FeedsFragment frag = (FeedsFragment) getFragmentManager().findFragmentById(R.id.feeds_fragment);
|
FeedsFragment frag = (FeedsFragment) getSupportFragmentManager().findFragmentById(R.id.feeds_fragment);
|
||||||
|
|
||||||
Log.d(TAG, "Refreshing feeds..." + frag);
|
Log.d(TAG, "Refreshing feeds..." + frag);
|
||||||
|
|
||||||
@ -96,9 +94,11 @@ public class MainActivity extends Activity implements FeedsFragment.OnFeedSelect
|
|||||||
|
|
||||||
setContentView(R.layout.main);
|
setContentView(R.layout.main);
|
||||||
|
|
||||||
|
if (android.os.Build.VERSION.SDK_INT > 10) {
|
||||||
LayoutTransition transitioner = new LayoutTransition();
|
LayoutTransition transitioner = new LayoutTransition();
|
||||||
LinearLayout layout = (LinearLayout)findViewById(R.id.main);
|
LinearLayout layout = (LinearLayout)findViewById(R.id.main);
|
||||||
layout.setLayoutTransition(transitioner);
|
layout.setLayoutTransition(transitioner);
|
||||||
|
}
|
||||||
|
|
||||||
if (m_selectedArticle == null)
|
if (m_selectedArticle == null)
|
||||||
findViewById(R.id.article_fragment).setVisibility(View.GONE);
|
findViewById(R.id.article_fragment).setVisibility(View.GONE);
|
||||||
@ -334,7 +334,7 @@ public class MainActivity extends Activity implements FeedsFragment.OnFeedSelect
|
|||||||
|
|
||||||
FeedsFragment frag = new FeedsFragment();
|
FeedsFragment frag = new FeedsFragment();
|
||||||
|
|
||||||
FragmentTransaction ft = getFragmentManager().beginTransaction();
|
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
|
||||||
ft.replace(R.id.feeds_fragment, frag);
|
ft.replace(R.id.feeds_fragment, frag);
|
||||||
ft.commit();
|
ft.commit();
|
||||||
|
|
||||||
@ -382,7 +382,7 @@ public class MainActivity extends Activity implements FeedsFragment.OnFeedSelect
|
|||||||
|
|
||||||
HeadlinesFragment hf = new HeadlinesFragment();
|
HeadlinesFragment hf = new HeadlinesFragment();
|
||||||
|
|
||||||
FragmentTransaction ft = getFragmentManager().beginTransaction();
|
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
|
||||||
ft.replace(R.id.headlines_fragment, hf);
|
ft.replace(R.id.headlines_fragment, hf);
|
||||||
ft.commit();
|
ft.commit();
|
||||||
}
|
}
|
||||||
@ -394,7 +394,7 @@ public class MainActivity extends Activity implements FeedsFragment.OnFeedSelect
|
|||||||
|
|
||||||
ArticleFragment frag = new ArticleFragment();
|
ArticleFragment frag = new ArticleFragment();
|
||||||
|
|
||||||
FragmentTransaction ft = getFragmentManager().beginTransaction();
|
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
|
||||||
ft.replace(R.id.article_fragment, frag);
|
ft.replace(R.id.article_fragment, frag);
|
||||||
ft.commit();
|
ft.commit();
|
||||||
|
|
||||||
@ -443,6 +443,14 @@ public class MainActivity extends Activity implements FeedsFragment.OnFeedSelect
|
|||||||
|
|
||||||
logout();
|
logout();
|
||||||
|
|
||||||
|
if (m_prefs.getString("ttrss_url", null) == null ||
|
||||||
|
m_prefs.getString("login", null) == null ||
|
||||||
|
m_prefs.getString("password", null) == null) {
|
||||||
|
|
||||||
|
setLoadingStatus(R.string.login_need_configure, false);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
LoginRequest ar = new LoginRequest();
|
LoginRequest ar = new LoginRequest();
|
||||||
ar.setApi(m_prefs.getString("ttrss_url", null));
|
ar.setApi(m_prefs.getString("ttrss_url", null));
|
||||||
|
|
||||||
@ -459,3 +467,4 @@ public class MainActivity extends Activity implements FeedsFragment.OnFeedSelect
|
|||||||
setLoadingStatus(R.string.login_in_progress, true);
|
setLoadingStatus(R.string.login_in_progress, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user