Class MainActivity
- java.lang.Object
-
- Activity
-
- de.kaffeemitkoffein.tinyweatherforecastgermany.MainActivity
-
public class MainActivity extends Activity
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MainActivity.SpinnerListener
-
Field Summary
Fields Modifier and Type Field Description static boolean
API_TESTING_ENABLED
java.text.SimpleDateFormat
hourMinuteSecondMilliSecDateFormat
static java.lang.String
MAINAPP_CUSTOM_REFRESH_ACTION
static java.lang.String
MAINAPP_HIDE_PROGRESS
static java.lang.String
MAINAPP_SHOW_PROGRESS
static java.lang.String
MAINAPP_SSL_ERROR
-
Constructor Summary
Constructors Constructor Description MainActivity()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
askDialog(Context context, java.lang.Integer icon, java.lang.String title, java.lang.String[] text, DialogInterface.OnClickListener positiveListener)
static void
deleteAreaDatabase(Context context)
void
displayUpdateTime(CurrentWeatherInfo currentWeatherInfo)
void
displayWeatherForecast()
void
displayWeatherForecast(CurrentWeatherInfo weatherCard)
void
forcedWeatherUpdate()
static int
getColorFromResource(Context context, int id)
void
getWeatherForecast()
void
loadStationsData()
protected void
onCreate(Bundle savedInstanceState)
boolean
onCreateOptionsMenu(Menu menu)
protected void
onDestroy()
boolean
onMenuOpened(int featureID, Menu menu)
boolean
onOptionsItemSelected(MenuItem mi)
void
onOptionsMenuClosed(Menu menu)
protected void
onPause()
void
onRequestPermissionsResult(int permRequestCode, java.lang.String[] perms, int[] grantRes)
void
onRestoreInstanceState(Bundle restoreInstanceState)
protected void
onResume()
void
onSaveInstanceState(Bundle savedInstanceState)
void
onTrimMemory(int level)
static void
setOverflowMenuItemColor(Context context, Menu menu, int id, int string_id)
void
showAboutDialog()
void
showWhatsNewDialog()
java.lang.String
standardizeGeo(java.lang.String s)
-
-
-
Field Detail
-
MAINAPP_CUSTOM_REFRESH_ACTION
public static final java.lang.String MAINAPP_CUSTOM_REFRESH_ACTION
- See Also:
- Constant Field Values
-
MAINAPP_SSL_ERROR
public static final java.lang.String MAINAPP_SSL_ERROR
- See Also:
- Constant Field Values
-
MAINAPP_SHOW_PROGRESS
public static final java.lang.String MAINAPP_SHOW_PROGRESS
- See Also:
- Constant Field Values
-
MAINAPP_HIDE_PROGRESS
public static final java.lang.String MAINAPP_HIDE_PROGRESS
- See Also:
- Constant Field Values
-
API_TESTING_ENABLED
public static final boolean API_TESTING_ENABLED
- See Also:
- Constant Field Values
-
hourMinuteSecondMilliSecDateFormat
public final java.text.SimpleDateFormat hourMinuteSecondMilliSecDateFormat
-
-
Method Detail
-
onPause
protected void onPause()
-
onSaveInstanceState
public void onSaveInstanceState(Bundle savedInstanceState)
-
onRestoreInstanceState
public void onRestoreInstanceState(Bundle restoreInstanceState)
-
onResume
protected void onResume()
-
onDestroy
protected void onDestroy()
-
onCreate
protected void onCreate(Bundle savedInstanceState)
-
loadStationsData
public void loadStationsData()
-
displayUpdateTime
public void displayUpdateTime(CurrentWeatherInfo currentWeatherInfo)
-
displayWeatherForecast
public void displayWeatherForecast(CurrentWeatherInfo weatherCard)
-
displayWeatherForecast
public void displayWeatherForecast()
-
getWeatherForecast
public void getWeatherForecast()
-
forcedWeatherUpdate
public void forcedWeatherUpdate()
-
getColorFromResource
public static int getColorFromResource(Context context, int id)
-
setOverflowMenuItemColor
public static void setOverflowMenuItemColor(Context context, Menu menu, int id, int string_id)
-
onCreateOptionsMenu
public boolean onCreateOptionsMenu(Menu menu)
-
onMenuOpened
public boolean onMenuOpened(int featureID, Menu menu)
-
onOptionsMenuClosed
public void onOptionsMenuClosed(Menu menu)
-
onOptionsItemSelected
public boolean onOptionsItemSelected(MenuItem mi)
-
showAboutDialog
public void showAboutDialog()
-
showWhatsNewDialog
public void showWhatsNewDialog()
-
deleteAreaDatabase
public static void deleteAreaDatabase(Context context)
-
askDialog
public static void askDialog(Context context, java.lang.Integer icon, java.lang.String title, java.lang.String[] text, DialogInterface.OnClickListener positiveListener)
-
onRequestPermissionsResult
public void onRequestPermissionsResult(int permRequestCode, java.lang.String[] perms, int[] grantRes)
-
onTrimMemory
public void onTrimMemory(int level)
-
standardizeGeo
public java.lang.String standardizeGeo(java.lang.String s)
-
-