From: Gustavo Martin Morcuende Date: Tue, 18 Nov 2014 04:02:34 +0000 (+0100) Subject: Update layout file names: weather_main_tabs.xml and weather_notification.xml X-Git-Tag: weatherinformation-1.0~43 X-Git-Url: https://git.gumartinm.name/?a=commitdiff_plain;h=7b6ac22006eacedce365801635033e5d0880a772;p=AndroidWeatherInformation Update layout file names: weather_main_tabs.xml and weather_notification.xml --- diff --git a/app/src/main/java/name/gumartinm/weather/information/activity/MainTabsActivity.java b/app/src/main/java/name/gumartinm/weather/information/activity/MainTabsActivity.java index d3951cf..3e9956f 100644 --- a/app/src/main/java/name/gumartinm/weather/information/activity/MainTabsActivity.java +++ b/app/src/main/java/name/gumartinm/weather/information/activity/MainTabsActivity.java @@ -47,7 +47,7 @@ public class MainTabsActivity extends FragmentActivity { @Override protected void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); - this.setContentView(R.layout.fragment_pager); + this.setContentView(R.layout.weather_main_tabs); this.mPager = (ViewPager)this.findViewById(R.id.pager); this.mPager.setAdapter(new TabsAdapter(this.getSupportFragmentManager())); diff --git a/app/src/main/java/name/gumartinm/weather/information/notification/NotificationIntentService.java b/app/src/main/java/name/gumartinm/weather/information/notification/NotificationIntentService.java index 932b49c..59d6637 100644 --- a/app/src/main/java/name/gumartinm/weather/information/notification/NotificationIntentService.java +++ b/app/src/main/java/name/gumartinm/weather/information/notification/NotificationIntentService.java @@ -195,7 +195,7 @@ public class NotificationIntentService extends IntentService { final String country = weatherLocation.getCountry(); // 4. Insert data in RemoteViews. - final RemoteViews remoteView = new RemoteViews(this.getApplicationContext().getPackageName(), R.layout.notification); + final RemoteViews remoteView = new RemoteViews(this.getApplicationContext().getPackageName(), R.layout.weather_notification); remoteView.setImageViewBitmap(R.id.weather_notification_image, picture); remoteView.setTextViewText(R.id.weather_notification_temperature_max, tempMax); remoteView.setTextViewText(R.id.weather_notification_temperature_min, tempMin); @@ -204,9 +204,7 @@ public class NotificationIntentService extends IntentService { // 5. Activity launcher. final Intent resultIntent = new Intent(this.getApplicationContext(), MainTabsActivity.class); - // The PendingIntent to launch our activity if the user selects this notification -// final PendingIntent contentIntent = PendingIntent.getActivity( -// this.getApplicationContext(), 0, resultIntent, PendingIntent.FLAG_UPDATE_CURRENT); + // The PendingIntent to launch our activity if the user selects this notification. // The stack builder object will contain an artificial back stack for the started Activity. // This ensures that navigating backward from the Activity leads out of // your application to the Home screen. diff --git a/app/src/main/res/layout/fragment_pager.xml b/app/src/main/res/layout/fragment_pager.xml deleted file mode 100644 index 272fc03..0000000 --- a/app/src/main/res/layout/fragment_pager.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - diff --git a/app/src/main/res/layout/notification.xml b/app/src/main/res/layout/notification.xml deleted file mode 100644 index b6a4fba..0000000 --- a/app/src/main/res/layout/notification.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/layout/weather_main_tabs.xml b/app/src/main/res/layout/weather_main_tabs.xml new file mode 100644 index 0000000..272fc03 --- /dev/null +++ b/app/src/main/res/layout/weather_main_tabs.xml @@ -0,0 +1,29 @@ + + + + + + + + diff --git a/app/src/main/res/layout/weather_notification.xml b/app/src/main/res/layout/weather_notification.xml new file mode 100644 index 0000000..b6a4fba --- /dev/null +++ b/app/src/main/res/layout/weather_notification.xml @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +