Class ForecastAdapter
- java.lang.Object
-
- BaseAdapter
-
- de.kaffeemitkoffein.tinyweatherforecastgermany.ForecastAdapter
-
public class ForecastAdapter extends BaseAdapter
-
-
Field Summary
Fields Modifier and Type Field Description longcreationTime
-
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 intcalculateInSampleSize(BitmapFactory.Options options, int widthRequired, int heightRequired)static intcalculateInSampleSize(BitmapFactory.Options options, ImageView imageView)voidclearBitmapCache()intdetermineExpectedPixelHeightOfForecastElement()intdetermineExpectedPixelHeightOfForecastElementOld()static floatDPtoPX(int dp, DisplayMetrics displayMetrics)static java.lang.StringformatDistanceNumberToString(double d)intgetCount()floatgetDMax(float value)java.lang.ObjectgetItem(int i)longgetItemId(int i)ViewgetView(int i, View view, ViewGroup viewGroup)static java.lang.CharSequencegetVisibilityBelow1kmCharSequence(Weather.WeatherInfo weatherInfo)static java.lang.CharSequencegetVisibilityCharSequence(Weather.WeatherInfo weatherInfo, int display_distance_unit)static java.lang.CharSequencegetVisibilityString(Weather.WeatherInfo weatherInfo, int display_distance_unit)java.util.ArrayList<WeatherWarning>getWarnings()voidsetWarnings(java.util.ArrayList<WeatherWarning> warnings)floatSPtoDP(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)
-
-