Enabled Holo theme for devices api 11+
closes #44 Signed-off-by: Ricky Barrette <rickbarrette@gmail.com>
This commit is contained in:
@@ -36,7 +36,8 @@
|
||||
|
||||
<application
|
||||
android:icon="@drawable/icon"
|
||||
android:label="@string/app_name" >
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/Theme.Custom" >
|
||||
<activity
|
||||
android:name="LocationRinger"
|
||||
android:configChanges="keyboard|orientation"
|
||||
@@ -83,13 +84,11 @@
|
||||
<service
|
||||
android:name=".services.LocationService"
|
||||
android:enabled="true"
|
||||
android:exported="true"
|
||||
android:process=":LocationService" >
|
||||
</service>
|
||||
<service
|
||||
android:name=".services.RingerProcessingService"
|
||||
android:enabled="true"
|
||||
android:exported="true"
|
||||
android:process=":RingerProcessingService" >
|
||||
</service>
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" >
|
||||
@@ -10,35 +9,32 @@
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/search_progress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/search_progress"
|
||||
android:visibility="invisible"
|
||||
android:layout_alignParentRight="true"
|
||||
/>
|
||||
android:visibility="invisible" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/ok"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@android:string/ok"
|
||||
android:id="@+id/ok"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_toLeftOf="@id/search_progress"
|
||||
|
||||
/>
|
||||
android:text="@android:string/ok" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/address"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/address"
|
||||
android:id="@+id/address"
|
||||
android:layout_toLeftOf="@id/ok"
|
||||
android:hint="@string/address"
|
||||
android:inputType="textPostalAddress" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ListView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/address_list"
|
||||
/>
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
||||
10
LocationRinger/res/values-v11/theme.xml
Normal file
10
LocationRinger/res/values-v11/theme.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="Theme.Custom" parent="android:Theme.Holo"></style>
|
||||
|
||||
<style name="Theme.Custom.NoTitleBar" parent="android:Theme.Holo.NoActionBar"></style>
|
||||
|
||||
<style name="Theme.Custom.Fullscreen" parent="android:Theme.Holo.NoActionBar.Fullscreen"></style>
|
||||
|
||||
</resources>
|
||||
10
LocationRinger/res/values-v14/theme.xml
Normal file
10
LocationRinger/res/values-v14/theme.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="Theme.Custom" parent="android:Theme.DeviceDefault"></style>
|
||||
|
||||
<style name="Theme.Custom.NoTitleBar" parent="android:Theme.DeviceDefault.NoActionBar"></style>
|
||||
|
||||
<style name="Theme.Custom.Fullscreen" parent="android:Theme.DeviceDefault.NoActionBar.Fullscreen"></style>
|
||||
|
||||
</resources>
|
||||
10
LocationRinger/res/values/theme.xml
Normal file
10
LocationRinger/res/values/theme.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="Theme.Custom" parent="android:Theme.Black"></style>
|
||||
|
||||
<style name="Theme.Custom.NoTitleBar" parent="android:Theme.Black.NoTitleBar"></style>
|
||||
|
||||
<style name="Theme.Custom.Fullscreen" parent="android:Theme.Black.NoTitleBar.Fullscreen"></style>
|
||||
|
||||
</resources>
|
||||
@@ -46,6 +46,7 @@ public class ListActivity extends Activity implements OnItemClickListener, OnCli
|
||||
private SharedPreferences mSettings;
|
||||
private ProgressDialog mProgress;
|
||||
|
||||
public static final String NO_SPLASH = "no splash";
|
||||
public static final String KEY_RINGER = "key_ringer";
|
||||
public static final String KEY_INFO = "key_info";
|
||||
public static final String KEY_IS_DEFAULT = "key_is_default";
|
||||
@@ -130,6 +131,7 @@ public class ListActivity extends Activity implements OnItemClickListener, OnCli
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.ringer_list);
|
||||
this.setTitle(R.string.app_name);
|
||||
this.mDb = new RingerDatabase(this, this);
|
||||
this.mListView = (ListView) findViewById(R.id.ringer_list);
|
||||
this.mListView.setOnItemClickListener(this);
|
||||
@@ -146,6 +148,7 @@ public class ListActivity extends Activity implements OnItemClickListener, OnCli
|
||||
new SkyHookRegistration(this).registerNewUser(this);
|
||||
}
|
||||
|
||||
if(!this.getIntent().hasExtra(NO_SPLASH))
|
||||
this.startActivity(new Intent(this, Splash.class));
|
||||
}
|
||||
|
||||
|
||||
@@ -23,8 +23,9 @@ import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
|
||||
import com.TwentyCodes.android.LocationRinger.EnableScrollingListener;
|
||||
import com.TwentyCodes.android.LocationRinger.R;
|
||||
import com.TwentyCodes.android.LocationRinger.LocationRinger;
|
||||
import com.TwentyCodes.android.LocationRinger.OnContentChangedListener;
|
||||
import com.TwentyCodes.android.LocationRinger.R;
|
||||
import com.TwentyCodes.android.LocationRinger.db.RingerDatabase;
|
||||
import com.TwentyCodes.android.LocationRinger.debug.Debug;
|
||||
import com.TwentyCodes.android.LocationRinger.ui.fragments.AboutRingerFragment;
|
||||
@@ -54,6 +55,13 @@ public class RingerInformationActivity extends FragmentActivity implements OnCon
|
||||
super.onCreate(arg0);
|
||||
setContentView(R.layout.ringer_information_activity);
|
||||
|
||||
|
||||
/*
|
||||
* Set up the action bar if required
|
||||
*/
|
||||
if(Integer.valueOf(android.os.Build.VERSION.SDK_INT) > 11)
|
||||
getActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
this.mData = new Intent().putExtras(RingerInformationActivity.this.getIntent());
|
||||
|
||||
this.mRinger = this.mData.getParcelableExtra(ListActivity.KEY_RINGER);
|
||||
@@ -147,11 +155,15 @@ public class RingerInformationActivity extends FragmentActivity implements OnCon
|
||||
* @author ricky barrette
|
||||
*/
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
public boolean onOptionsItemSelected(final MenuItem item) {
|
||||
switch(item.getItemId()){
|
||||
case SAVE_ID:
|
||||
save();
|
||||
break;
|
||||
case android.R.id.home:
|
||||
final Intent intent = new Intent(this, LocationRinger.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP).putExtra(ListActivity.NO_SPLASH, ListActivity.NO_SPLASH);
|
||||
startActivity(intent);
|
||||
return true;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user