import android.app.ActionBar;
import android.app.Activity;
-import android.content.ComponentName;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
}
public void onClickLegalInformation(final View view) {
- final Intent intent = new Intent("name.gumartinm.weather.information.WEATHERINFO")
- .setComponent(new ComponentName("name.gumartinm.weather.information",
- "name.gumartinm.weather.information.activity.LicensesActivity"));
+ final Intent intent = new Intent(this.getApplicationContext(), LicensesActivity.class);
this.startActivity(intent);
}
import android.app.ActionBar;
import android.app.ActionBar.Tab;
import android.app.FragmentTransaction;
-import android.content.ComponentName;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
Intent intent;
final int itemId = item.getItemId();
if (itemId == R.id.weather_menu_settings) {
- intent = new Intent("name.gumartinm.weather.information.WEATHERINFO")
- .setComponent(new ComponentName("name.gumartinm.weather.information",
- "name.gumartinm.weather.information.activity.PreferencesActivity"));
+ intent = new Intent(this.getApplicationContext(), PreferencesActivity.class);
this.startActivity(intent);
return true;
} else if (itemId == R.id.weather_menu_map) {
- intent = new Intent("name.gumartinm.weather.information.WEATHERINFO").
- setComponent(new ComponentName("name.gumartinm.weather.information",
- "name.gumartinm.weather.information.activity.MapActivity"));
+ intent = new Intent(this.getApplicationContext(), MapActivity.class);
this.startActivity(intent);
return true;
} else if (itemId == R.id.weather_menu_about) {
- intent = new Intent("name.gumartinm.weather.information.WEATHERINFO").
- setComponent(new ComponentName("name.gumartinm.weather.information",
- "name.gumartinm.weather.information.activity.AboutActivity"));
+ intent = new Intent(this.getApplicationContext(), AboutActivity.class);
this.startActivity(intent);
return true;
} else {
import org.apache.http.client.ClientProtocolException;
import android.content.BroadcastReceiver;
-import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import com.fasterxml.jackson.core.JsonParseException;
import name.gumartinm.weather.information.R;
+import name.gumartinm.weather.information.activity.SpecificActivity;
import name.gumartinm.weather.information.fragment.specific.SpecificFragment;
import name.gumartinm.weather.information.httpclient.CustomHTTPClient;
import name.gumartinm.weather.information.model.DatabaseQueries;
.getFragmentManager().findFragmentById(R.id.weather_specific_fragment);
if (fragment == null) {
// handset layout
- final Intent intent = new Intent("name.gumartinm.weather.information.WEATHERINFO")
- .setComponent(new ComponentName("name.gumartinm.weather.information",
- "name.gumartinm.weather.information.activity.SpecificActivity"));
+ final Intent intent = new Intent(this.getActivity().getApplicationContext(), SpecificActivity.class);
intent.putExtra("CHOSEN_DAY", (int) id);
OverviewFragment.this.getActivity().startActivity(intent);
} else {
final AppWidgetManager manager = AppWidgetManager.getInstance(this.getApplicationContext());
manager.updateAppWidget(appWidgetId, remoteView);
}
-
-// private void updateWidgets(final RemoteViews remoteView) {
-//
-// final ComponentName widgets = new ComponentName(this.getApplicationContext(), WidgetProvider.class);
-// final AppWidgetManager manager = AppWidgetManager.getInstance(this.getApplicationContext());
-// manager.updateAppWidget(widgets, remoteView);
-// }
}