Class ForecastAdapter
- java.lang.Object
-
- BaseAdapter
-
- de.kaffeemitkoffein.tinyweatherforecastgermany.ForecastAdapter
-
public class ForecastAdapter extends BaseAdapter
-
-
Field Summary
Fields Modifier and Type Field Description long
creationTime
-
Constructor Summary
Constructors Constructor Description ForecastAdapter(Context context, java.util.ArrayList<Weather.WeatherInfo> weatherForecasts, java.util.ArrayList<Weather.WeatherInfo> weatherForecasts_hourly, Weather.WeatherLocation weatherLocation)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
calculateInSampleSize(BitmapFactory.Options options, int widthRequired, int heightRequired)
static int
calculateInSampleSize(BitmapFactory.Options options, ImageView imageView)
void
clearBitmapCache()
int
determineExpectedPixelHeightOfForecastElement()
int
determineExpectedPixelHeightOfForecastElementOld()
static float
DPtoPX(int dp, DisplayMetrics displayMetrics)
static java.lang.String
formatDistanceNumberToString(double d)
int
getCount()
float
getDMax(float value)
java.lang.Object
getItem(int i)
long
getItemId(int i)
View
getView(int i, View view, ViewGroup viewGroup)
static java.lang.CharSequence
getVisibilityBelow1kmCharSequence(Weather.WeatherInfo weatherInfo)
static java.lang.CharSequence
getVisibilityCharSequence(Weather.WeatherInfo weatherInfo, int display_distance_unit)
static java.lang.CharSequence
getVisibilityString(Weather.WeatherInfo weatherInfo, int display_distance_unit)
java.util.ArrayList<WeatherWarning>
getWarnings()
void
setWarnings(java.util.ArrayList<WeatherWarning> warnings)
float
SPtoDP(float value)
-
-
-
Constructor Detail
-
ForecastAdapter
public ForecastAdapter(Context context, java.util.ArrayList<Weather.WeatherInfo> weatherForecasts, java.util.ArrayList<Weather.WeatherInfo> weatherForecasts_hourly, Weather.WeatherLocation weatherLocation)
-
-
Method Detail
-
setWarnings
public void setWarnings(java.util.ArrayList<WeatherWarning> warnings)
-
getWarnings
public java.util.ArrayList<WeatherWarning> getWarnings()
-
clearBitmapCache
public void clearBitmapCache()
-
getCount
public int getCount()
-
getItem
public java.lang.Object getItem(int i)
-
getItemId
public long getItemId(int i)
-
getView
public View getView(int i, View view, ViewGroup viewGroup)
-
formatDistanceNumberToString
public static java.lang.String formatDistanceNumberToString(double d)
-
getVisibilityCharSequence
public static java.lang.CharSequence getVisibilityCharSequence(Weather.WeatherInfo weatherInfo, int display_distance_unit)
-
getVisibilityBelow1kmCharSequence
public static java.lang.CharSequence getVisibilityBelow1kmCharSequence(Weather.WeatherInfo weatherInfo)
-
getVisibilityString
public static java.lang.CharSequence getVisibilityString(Weather.WeatherInfo weatherInfo, int display_distance_unit)
-
DPtoPX
public static float DPtoPX(int dp, DisplayMetrics displayMetrics)
-
getDMax
public float getDMax(float value)
-
SPtoDP
public float SPtoDP(float value)
-
determineExpectedPixelHeightOfForecastElement
public int determineExpectedPixelHeightOfForecastElement()
-
determineExpectedPixelHeightOfForecastElementOld
public int determineExpectedPixelHeightOfForecastElementOld()
-
calculateInSampleSize
public static int calculateInSampleSize(BitmapFactory.Options options, int widthRequired, int heightRequired)
-
calculateInSampleSize
public static int calculateInSampleSize(BitmapFactory.Options options, ImageView imageView)
-
-