Remove all getActionBar occurences, temporary fix for overlap

here
Lem Dulfo 2016-04-10 06:13:25 +08:00 committed by cpfeiffer
parent 83e6e6b85f
commit 70ed14243f
10 changed files with 36 additions and 40 deletions

View File

@ -96,8 +96,6 @@ public abstract class AbstractSettingsActivity extends PreferenceActivity {
super.onPostCreate(savedInstanceState);
getDelegate().onPostCreate(savedInstanceState);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
for (String prefKey : getPreferenceKeysWithSummary()) {
final Preference pref = findPreference(prefKey);
if (pref != null) {

View File

@ -53,7 +53,6 @@ public class AppBlacklistActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_appblacklist);
getActionBar().setDisplayHomeAsUpEnabled(true);
final PackageManager pm = getPackageManager();
sharedPrefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());

View File

@ -134,7 +134,6 @@ public class AppManagerActivity extends AppCompatActivity {
sharedPrefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
setContentView(R.layout.activity_appmanager);
getActionBar().setDisplayHomeAsUpEnabled(true);
ListView appListView = (ListView) findViewById(R.id.appListView);
mGBDeviceAppAdapter = new GBDeviceAppAdapter(this, appList);

View File

@ -1,11 +1,12 @@
package nodomain.freeyourgadget.gadgetbridge.activities;
import android.app.ListActivity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;
import android.widget.ListView;
import java.util.Arrays;
import java.util.HashSet;
@ -20,7 +21,7 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBAlarm;
import static nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBandConst.PREF_MIBAND_ALARMS;
public class ConfigureAlarms extends ListActivity {
public class ConfigureAlarms extends AppCompatActivity {
private static final int REQ_CONFIGURE_ALARM = 1;
@ -33,7 +34,6 @@ public class ConfigureAlarms extends ListActivity {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_configure_alarms);
getActionBar().setDisplayHomeAsUpEnabled(true);
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
preferencesAlarmListSet = sharedPrefs.getStringSet(PREF_MIBAND_ALARMS, new HashSet<String>());
@ -45,7 +45,8 @@ public class ConfigureAlarms extends ListActivity {
mGBAlarmListAdapter = new GBAlarmListAdapter(this, preferencesAlarmListSet);
setListAdapter(mGBAlarmListAdapter);
ListView listView = (ListView) findViewById(R.id.alarm_list);
listView.setAdapter(mGBAlarmListAdapter);
updateAlarmsFromPrefs();
}

View File

@ -81,7 +81,6 @@ public class DebugActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_debug);
getActionBar().setDisplayHomeAsUpEnabled(true);
IntentFilter filter = new IntentFilter();
filter.addAction(GBApplication.ACTION_QUIT);

View File

@ -61,7 +61,6 @@ public class ExternalPebbleJSActivity extends AppCompatActivity {
}
setContentView(R.layout.activity_external_pebble_js);
getActionBar().setDisplayHomeAsUpEnabled(true);
WebView myWebView = (WebView) findViewById(R.id.configureWebview);
myWebView.clearCache(true);

View File

@ -113,7 +113,7 @@ public class FwAppInstallerActivity extends AppCompatActivity implements Install
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_appinstaller);
getActionBar().setDisplayHomeAsUpEnabled(true);
GBDevice dev = getIntent().getParcelableExtra(GBDevice.EXTRA_DEVICE);
if (dev != null) {
device = dev;

View File

@ -1,4 +1,4 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
@ -10,7 +10,7 @@
android:descendantFocusability="blocksDescendants"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@android:id/list"
android:id="@+id/alarm_list"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />
</RelativeLayout>
</FrameLayout>

View File

@ -1,58 +1,59 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context="nodomain.freeyourgadget.gadgetbridge.activities.ControlCenter">
<ImageView
android:id="@+id/no_items_bg"
android:layout_centerInParent="true"
android:src="@drawable/gadgetbridge_img"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:src="@drawable/gadgetbridge_img" />
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/controlcenter_swipe_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="0px"
android:paddingLeft="0px"
android:paddingRight="0px"
android:paddingTop="0px"
android:paddingBottom="0px"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:paddingTop="0px">
<ListView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/deviceListView"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_above="@+id/hintTextView" />
</android.support.v4.widget.SwipeRefreshLayout>
<TextView
tools:text="Hint here"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:id="@+id/hintTextView"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:textStyle="italic" />
android:layout_above="@+id/hintTextView"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />
</android.support.v4.widget.SwipeRefreshLayout>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_add_black"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_gravity="bottom|end"
android:src="@drawable/ic_add_black"
app:elevation="6dp"
app:pressedTranslationZ="12dp"/>
<TextView
android:id="@+id/hintTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/fab"
android:layout_centerHorizontal="true"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textStyle="italic"
android:text="@string/tap_connected_device_for_app_mananger" />
</RelativeLayout>

View File

@ -83,8 +83,8 @@
<string name="this_is_a_test_notification_from_gadgetbridge">This is a Test Notification from Gadgetbridge</string>
<string name="bluetooth_is_not_supported_">Bluetooth is not supported.</string>
<string name="bluetooth_is_disabled_">Bluetooth is disabled.</string>
<string name="tap_connected_device_for_app_mananger">tap connected device for App Mananger</string>
<string name="tap_a_device_to_connect">tap a device to connect</string>
<string name="tap_connected_device_for_app_mananger">Tap connected device for App Manager</string>
<string name="tap_a_device_to_connect">Tap a device to connect</string>
<string name="cannot_connect_bt_address_invalid_">Cannot connect. BT address invalid?</string>
<string name="gadgetbridge_running">Gadgetbridge running</string>
<string name="installing_binary_d_d">installing binary %1$d/%2$d</string>