Revert all Light Theme changes

Should be done differently. Light theme before Holo is buggy.
This commit is contained in:
Daniel Martí 2013-09-01 14:03:55 +02:00
parent c2159456e2
commit 3741c0c62b
10 changed files with 11 additions and 89 deletions

View File

@ -29,7 +29,6 @@
android:name="FDroidApp"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme"
android:supportsRtl="false" >
<activity
android:name="FDroid"

View File

@ -1,11 +0,0 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="AppBaseTheme" parent="android:Theme.Holo">
<!-- API 11 theme customizations go here -->
</style>
<style name="AppBaseThemeLight" parent="android:Theme.Holo.Light">
<!-- API 11 theme customizations go here -->
</style>
</resources>

View File

@ -187,7 +187,5 @@
<string name="no_handler_app">You don\'t have any available app that can handle %s</string>
<string name="compactlayout">Compact Layout</string>
<string name="compactlayout_long">Only show app names and summaries in list</string>
<string name="lightTheme">Light Theme</string>
<string name="lightTheme_long">Use a light theme</string>
</resources>

View File

@ -1,19 +0,0 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="AppBaseTheme" parent="android:Theme.Black">
<!-- backward-compatibility theme options go here -->
</style>
<style name="AppBaseThemeLight" parent="android:Theme.Light">
<!-- backward-compatibility theme options go here -->
</style>
<style name="AppTheme" parent="AppBaseTheme">
<!-- customizations that are not API-level specific go here. -->
</style>
<style name="AppThemeLight" parent="AppBaseThemeLight">
<!-- customizations that are not API-level specific go here. -->
</style>
</resources>

View File

@ -23,9 +23,6 @@
<CheckBoxPreference android:title="@string/compactlayout"
android:defaultValue="false" android:summary="@string/compactlayout_long"
android:key="compactlayout"/>
<CheckBoxPreference android:title="@string/lightTheme"
android:defaultValue="false" android:summary="@string/lightTheme_long"
android:key="lightTheme"/>
</PreferenceCategory>
<PreferenceCategory android:title="@string/antifeatures">
<CheckBoxPreference android:title="@string/antiads"

View File

@ -186,10 +186,6 @@ public class AppDetails extends ListActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
if (PreferenceManager.getDefaultSharedPreferences(this)
.getBoolean("lightTheme", false))
setTheme(R.style.AppThemeLight);
super.onCreate(savedInstanceState);
ActionBarCompat abCompat = ActionBarCompat.create(this);
abCompat.setDisplayHomeAsUpEnabled(true);

View File

@ -33,7 +33,6 @@ import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.ResultReceiver;
import android.preference.PreferenceManager;
import android.support.v4.app.FragmentActivity;
import android.support.v4.view.ViewPager;
import android.util.Log;
@ -62,7 +61,6 @@ public class FDroid extends FragmentActivity {
private ProgressDialog pd;
private ViewPager viewPager;
private AppListFragmentPageAdapter viewPageAdapter;
private AppListManager manager = null;
@ -75,10 +73,6 @@ public class FDroid extends FragmentActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
if (PreferenceManager.getDefaultSharedPreferences(this)
.getBoolean("lightTheme", false))
setTheme(R.style.AppThemeLight);
super.onCreate(savedInstanceState);
manager = new AppListManager(this);
setContentView(R.layout.fdroid);
@ -248,13 +242,8 @@ public class FDroid extends FragmentActivity {
UpdateService.schedule(getBaseContext());
if (data != null && data.hasExtra("update")) {
updateRepos();
} else if (data != null && data.hasExtra("restart")) {
final Intent intent = getIntent();
overridePendingTransition(0, 0);
intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
finish();
overridePendingTransition(0, 0);
startActivity(intent);
} else {
repopulateViews();
}
break;
@ -263,7 +252,7 @@ public class FDroid extends FragmentActivity {
private void createViews() {
viewPager = (ViewPager)findViewById(R.id.main_pager);
viewPageAdapter = new AppListFragmentPageAdapter(this);
AppListFragmentPageAdapter viewPageAdapter = new AppListFragmentPageAdapter(this);
viewPager.setAdapter(viewPageAdapter);
viewPager.setOnPageChangeListener( new ViewPager.SimpleOnPageChangeListener() {
public void onPageSelected(int position) {

View File

@ -77,10 +77,6 @@ public class ManageRepo extends ListActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
if (PreferenceManager.getDefaultSharedPreferences(this)
.getBoolean("lightTheme", false))
setTheme(R.style.AppThemeLight);
super.onCreate(savedInstanceState);
setContentView(R.layout.repolist);

View File

@ -24,7 +24,6 @@ import android.app.ActionBar;
import android.content.Intent;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceManager;
import android.preference.PreferenceActivity;
import android.preference.Preference.OnPreferenceClickListener;
import android.widget.Toast;
@ -33,43 +32,25 @@ import org.fdroid.fdroid.compat.ActionBarCompat;
public class PreferencesActivity extends PreferenceActivity implements
OnPreferenceClickListener {
private boolean ignoreTouchscreenChanged = false;
private boolean lightThemeChanged = false;
Intent ret;
@Override
protected void onCreate(Bundle savedInstanceState) {
if (PreferenceManager.getDefaultSharedPreferences(this)
.getBoolean("lightTheme", false))
setTheme(R.style.AppThemeLight);
super.onCreate(savedInstanceState);
ActionBarCompat.create(this).setDisplayHomeAsUpEnabled(true);
addPreferencesFromResource(R.xml.preferences);
for (String prefkey : new String[] { "ignoreTouchscreen",
"lightTheme" }) {
Preference pref = findPreference(prefkey);
pref.setOnPreferenceClickListener(this);
}
ret = new Intent();
//for (String prefkey : new String[] { }) {
//Preference pref = findPreference(prefkey);
//pref.setOnPreferenceClickListener(this);
//}
}
@Override
public boolean onPreferenceClick(Preference preference) {
String key = preference.getKey();
if (key.equals("ignoreTouchscreen"))
ignoreTouchscreenChanged ^= true;
else
lightThemeChanged ^= true;
if (lightThemeChanged)
ret.putExtra("restart", true);
else if (ignoreTouchscreenChanged)
ret.putExtra("update", true);
// Currently no actions are returned
//String key = preference.getKey();
//if (key.equals("...")) {
Intent ret = new Intent();
setResult(RESULT_OK, ret);
return true;
}

View File

@ -52,10 +52,6 @@ public class SearchResults extends ListActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
if (PreferenceManager.getDefaultSharedPreferences(this)
.getBoolean("lightTheme", false))
setTheme(R.style.AppThemeLight);
super.onCreate(savedInstanceState);
ActionBarCompat.create(this).setDisplayHomeAsUpEnabled(true);
applist = new AvailableAppListAdapter(this);