A few improvements
authorGustavo Martin Morcuende <gu.martinm@gmail.com>
Thu, 1 Sep 2016 22:15:57 +0000 (00:15 +0200)
committerGustavo Martin Morcuende <gu.martinm@gmail.com>
Thu, 1 Sep 2016 22:15:57 +0000 (00:15 +0200)
app/src/main/java/name/gumartinm/weather/information/activity/AboutActivity.java
app/src/main/java/name/gumartinm/weather/information/activity/LicensesActivity.java
app/src/main/java/name/gumartinm/weather/information/activity/MainTabsActivity.java
app/src/main/java/name/gumartinm/weather/information/activity/MapActivity.java
app/src/main/java/name/gumartinm/weather/information/activity/SpecificActivity.java
app/src/main/res/values-v11/styles.xml
app/src/main/res/values-v14/styles.xml
app/src/main/res/values/styles.xml

index 80d3709..6ef65d0 100644 (file)
@@ -29,14 +29,13 @@ public class AboutActivity extends AppCompatActivity {
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
+        this.setContentView(R.layout.weather_about);
 
         final ActionBar actionBar = this.getSupportActionBar();
         actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE, ActionBar.DISPLAY_SHOW_TITLE);
         actionBar.setDisplayHomeAsUpEnabled(true);
         actionBar.setDisplayShowHomeEnabled(true);
         actionBar.setIcon(R.drawable.ic_launcher);
-
-        setContentView(R.layout.weather_about);
     }
 
     @Override
index 324d495..411723c 100644 (file)
@@ -39,6 +39,7 @@ public class LicensesActivity extends AppCompatActivity {
     @Override
     public void onCreate(final Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
+        this.setContentView(R.layout.weather_licenses);
 
         final ActionBar actionBar = this.getSupportActionBar();
         actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE, ActionBar.DISPLAY_SHOW_TITLE);
@@ -46,8 +47,6 @@ public class LicensesActivity extends AppCompatActivity {
         actionBar.setDisplayShowHomeEnabled(true);
         actionBar.setIcon(R.drawable.ic_launcher);
 
-        setContentView(R.layout.weather_licenses);
-
         mWebView = (WebView) this.findViewById(R.id.weather_licenses);
     }
 
index 4bacd09..85090a9 100644 (file)
@@ -15,7 +15,6 @@
  */
 package name.gumartinm.weather.information.activity;
 
-import android.content.Context;
 import android.content.Intent;
 import android.content.SharedPreferences;
 import android.os.Bundle;
index 77f4306..8550807 100644 (file)
@@ -71,14 +71,13 @@ public class MapActivity extends AppCompatActivity implements
     @Override
     protected void onCreate(final Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
+        this.setContentView(R.layout.weather_map);
 
         final ActionBar actionBar = this.getSupportActionBar();
         actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE, ActionBar.DISPLAY_SHOW_TITLE);
         actionBar.setDisplayHomeAsUpEnabled(true);
         actionBar.setDisplayShowHomeEnabled(true);
         actionBar.setIcon(R.drawable.ic_launcher);
-
-        this.setContentView(R.layout.weather_map);
         
         // Acquire a reference to the system Location Manager
         this.mLocationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);
index 8189d06..be25b0e 100644 (file)
@@ -38,7 +38,6 @@ public class SpecificActivity extends AppCompatActivity {
         actionBar.setDisplayHomeAsUpEnabled(true);
         actionBar.setDisplayShowHomeEnabled(true);
         actionBar.setIcon(R.drawable.ic_launcher);
-
     }
 
     @Override
index 5e8e931..175d9eb 100644 (file)
@@ -27,6 +27,7 @@
     <style name="Divider">
         <item name="android:layout_width">match_parent</item>
         <item name="android:layout_height">1dp</item>
+        <!-- TODO: API 11 layout_marginStart and layout_marginEnd do not exist -->
         <item name="android:layout_marginStart">20dp</item>
         <item name="android:layout_marginEnd">20dp</item>
         <item name="android:background">?android:attr/listDivider</item>
index 2e89c9b..4fb0b9c 100644 (file)
@@ -28,6 +28,7 @@
     <style name="Divider">
         <item name="android:layout_width">match_parent</item>
         <item name="android:layout_height">1dp</item>
+        <!-- TODO: API 11 layout_marginStart and layout_marginEnd do not exist -->
         <item name="android:layout_marginStart">20dp</item>
         <item name="android:layout_marginEnd">20dp</item>
         <item name="android:background">?android:attr/listDivider</item>
index 9a32ea4..8d14eff 100644 (file)
@@ -36,6 +36,7 @@
     <style name="Divider">
         <item name="android:layout_width">match_parent</item>
         <item name="android:layout_height">1dp</item>
+        <!-- TODO: API 11 layout_marginStart and layout_marginEnd do not exist -->
         <item name="android:layout_marginStart">20dp</item>
         <item name="android:layout_marginEnd">20dp</item>
         <item name="android:background">?android:attr/listDivider</item>