Class ForecastAdapter
BaseAdapter
de.kaffeemitkoffein.tinyweatherforecastgermany.ForecastAdapter
public class ForecastAdapter extends BaseAdapter
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionForecastAdapter(Context context, ArrayList<Weather.WeatherInfo> weatherForecasts, ArrayList<Weather.WeatherInfo> weatherForecasts_hourly, Weather.WeatherLocation weatherLocation) -
Method Summary
Modifier and TypeMethodDescriptionstatic intcalculateInSampleSize(BitmapFactory.Options options, int widthRequired, int heightRequired) static intcalculateInSampleSize(BitmapFactory.Options options, ImageView imageView) voidintintstatic floatDPtoPX(int dp, DisplayMetrics displayMetrics) static StringformatDistanceNumberToString(double d) intgetCount()floatgetDMax(float value) getItem(int i) longgetItemId(int i) ViewgetView(int i, View view, ViewGroup viewGroup) static CharSequencegetVisibilityBelow1kmCharSequence(Weather.WeatherInfo weatherInfo) static CharSequencegetVisibilityCharSequence(Weather.WeatherInfo weatherInfo, int display_distance_unit) static CharSequencegetVisibilityString(Weather.WeatherInfo weatherInfo, int display_distance_unit) voidsetWarnings(ArrayList<WeatherWarning> warnings) floatSPtoDP(float value)
-
Field Details
-
creationTime
public long creationTime
-
-
Constructor Details
-
ForecastAdapter
public ForecastAdapter(Context context, ArrayList<Weather.WeatherInfo> weatherForecasts, ArrayList<Weather.WeatherInfo> weatherForecasts_hourly, Weather.WeatherLocation weatherLocation)
-
-
Method Details
-
setWarnings
-
getWarnings
-
clearBitmapCache
public void clearBitmapCache() -
getCount
public int getCount() -
getItem
-
getItemId
public long getItemId(int i) -
getView
public View getView(int i, View view, ViewGroup viewGroup) -
formatDistanceNumberToString
-
getVisibilityCharSequence
public static CharSequence getVisibilityCharSequence(Weather.WeatherInfo weatherInfo, int display_distance_unit) -
getVisibilityBelow1kmCharSequence
-
getVisibilityString
public static 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)
-