combined mode tweaks

This commit is contained in:
Andrew Dolgov 2011-12-03 22:09:51 +03:00
parent 34f6e76f4f
commit e057f881b1
3 changed files with 9 additions and 2 deletions

View File

@ -9,7 +9,7 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application android:icon="@drawable/icon" android:hardwareAccelerated="true" android:label="@string/app_name"> <application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".LoginActivity" <activity android:name=".LoginActivity"
android:label="@string/app_name"> android:label="@string/app_name">
</activity> </activity>

View File

@ -27,6 +27,7 @@ import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.View.OnClickListener; import android.view.View.OnClickListener;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.webkit.WebSettings;
import android.webkit.WebView; import android.webkit.WebView;
import android.widget.AbsListView; import android.widget.AbsListView;
import android.widget.AbsListView.OnScrollListener; import android.widget.AbsListView.OnScrollListener;
@ -427,6 +428,9 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
int webColor = tv.data; int webColor = tv.data;
web.setBackgroundColor(webColor); web.setBackgroundColor(webColor);
//WebSettings ws = web.getSettings();
//ws.setBlockNetworkLoads(true);
if (m_prefs.getString("theme", "THEME_DARK").equals("THEME_DARK")) { if (m_prefs.getString("theme", "THEME_DARK").equals("THEME_DARK")) {
cssOverride = "body { background : transparent; color : #e0e0e0}\n"; cssOverride = "body { background : transparent; color : #e0e0e0}\n";

View File

@ -737,12 +737,14 @@ public class MainActivity extends FragmentActivity implements FeedsFragment.OnFe
findViewById(R.id.main).setAnimation(AnimationUtils.loadAnimation(this, R.anim.slide_right)); findViewById(R.id.main).setAnimation(AnimationUtils.loadAnimation(this, R.anim.slide_right));
} }
boolean browseCats = m_prefs.getBoolean("browse_cats_like_feeds", false);
if (m_smallScreenMode) { if (m_smallScreenMode) {
findViewById(R.id.article_fragment).setVisibility(View.GONE); findViewById(R.id.article_fragment).setVisibility(View.GONE);
findViewById(R.id.headlines_fragment).setVisibility(View.VISIBLE); findViewById(R.id.headlines_fragment).setVisibility(View.VISIBLE);
} else { } else {
findViewById(R.id.article_fragment).setVisibility(View.GONE); findViewById(R.id.article_fragment).setVisibility(View.GONE);
findViewById(R.id.feeds_fragment).setVisibility(View.VISIBLE); findViewById(browseCats ? R.id.cats_fragment : R.id.feeds_fragment).setVisibility(View.VISIBLE);
} }
m_selectedArticle = null; m_selectedArticle = null;
@ -1038,6 +1040,7 @@ public class MainActivity extends FragmentActivity implements FeedsFragment.OnFe
findViewById(R.id.article_fragment).setVisibility(View.VISIBLE); findViewById(R.id.article_fragment).setVisibility(View.VISIBLE);
} else { } else {
findViewById(R.id.feeds_fragment).setVisibility(View.GONE); findViewById(R.id.feeds_fragment).setVisibility(View.GONE);
findViewById(R.id.cats_fragment).setVisibility(View.GONE);
findViewById(R.id.article_fragment).setVisibility(View.VISIBLE); findViewById(R.id.article_fragment).setVisibility(View.VISIBLE);
} }