diff options
author | blafoo <github@blafoo.de> | 2012-05-10 10:52:55 +0200 |
---|---|---|
committer | blafoo <github@blafoo.de> | 2012-05-10 20:30:51 +0200 |
commit | eb92a136754b4cdd8ce2c6ad94881460d0378ad7 (patch) | |
tree | 12df9dfdda22b0522b587f582242024625ff7f06 /main/src | |
parent | 7554613d6ba3b61aac86575667e661ca8548af86 (diff) | |
download | cgeo-eb92a136754b4cdd8ce2c6ad94881460d0378ad7.zip cgeo-eb92a136754b4cdd8ce2c6ad94881460d0378ad7.tar.gz cgeo-eb92a136754b4cdd8ce2c6ad94881460d0378ad7.tar.bz2 |
Removed deprecated warnings
Diffstat (limited to 'main/src')
-rw-r--r-- | main/src/cgeo/geocaching/CacheDetailActivity.java | 4 | ||||
-rw-r--r-- | main/src/cgeo/geocaching/cgeocoords.java | 2 | ||||
-rw-r--r-- | main/src/cgeo/geocaching/compatibility/Compatibility.java | 2 | ||||
-rw-r--r-- | main/src/cgeo/geocaching/maps/CGeoMap.java | 2 | ||||
-rw-r--r-- | main/src/cgeo/geocaching/network/HtmlImage.java | 4 | ||||
-rw-r--r-- | main/src/cgeo/geocaching/ui/CacheListAdapter.java | 2 | ||||
-rw-r--r-- | main/src/cgeo/geocaching/ui/DateDialog.java | 2 |
7 files changed, 9 insertions, 9 deletions
diff --git a/main/src/cgeo/geocaching/CacheDetailActivity.java b/main/src/cgeo/geocaching/CacheDetailActivity.java index 1cb219a..62f946a 100644 --- a/main/src/cgeo/geocaching/CacheDetailActivity.java +++ b/main/src/cgeo/geocaching/CacheDetailActivity.java @@ -1175,7 +1175,7 @@ public class CacheDetailActivity extends AbstractActivity { private ViewGroup createAttributeIconsLayout(int parentWidth) { final LinearLayout rows = new LinearLayout(CacheDetailActivity.this); - rows.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); + rows.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT)); rows.setOrientation(LinearLayout.VERTICAL); LinearLayout attributeRow = newAttributeIconsRow(); @@ -1223,7 +1223,7 @@ public class CacheDetailActivity extends AbstractActivity { private LinearLayout newAttributeIconsRow() { LinearLayout rowLayout = new LinearLayout(CacheDetailActivity.this); - rowLayout.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, + rowLayout.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT)); rowLayout.setOrientation(LinearLayout.HORIZONTAL); return rowLayout; diff --git a/main/src/cgeo/geocaching/cgeocoords.java b/main/src/cgeo/geocaching/cgeocoords.java index 0ad2e81..0aaea2a 100644 --- a/main/src/cgeo/geocaching/cgeocoords.java +++ b/main/src/cgeo/geocaching/cgeocoords.java @@ -67,7 +67,7 @@ public class cgeocoords extends Dialog { try { requestWindowFeature(Window.FEATURE_NO_TITLE); - getWindow().setLayout(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT); + getWindow().setLayout(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT); } catch (Exception e) { // nothing } diff --git a/main/src/cgeo/geocaching/compatibility/Compatibility.java b/main/src/cgeo/geocaching/compatibility/Compatibility.java index e646348..f88ec2d 100644 --- a/main/src/cgeo/geocaching/compatibility/Compatibility.java +++ b/main/src/cgeo/geocaching/compatibility/Compatibility.java @@ -16,7 +16,7 @@ import android.widget.EditText; public final class Compatibility { - private final static int sdkVersion = Integer.parseInt(Build.VERSION.SDK); + private final static int sdkVersion = Build.VERSION.SDK_INT; private final static boolean isLevel8 = sdkVersion >= 8; private final static boolean isLevel5 = sdkVersion >= 5; diff --git a/main/src/cgeo/geocaching/maps/CGeoMap.java b/main/src/cgeo/geocaching/maps/CGeoMap.java index 0618872..20c77f9 100644 --- a/main/src/cgeo/geocaching/maps/CGeoMap.java +++ b/main/src/cgeo/geocaching/maps/CGeoMap.java @@ -1541,7 +1541,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto public View makeView() { ImageView imageView = new ImageView(activity); imageView.setScaleType(ScaleType.CENTER); - imageView.setLayoutParams(new ImageSwitcher.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); + imageView.setLayoutParams(new ImageSwitcher.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); return imageView; } diff --git a/main/src/cgeo/geocaching/network/HtmlImage.java b/main/src/cgeo/geocaching/network/HtmlImage.java index 6c76eff..51f7ea8 100644 --- a/main/src/cgeo/geocaching/network/HtmlImage.java +++ b/main/src/cgeo/geocaching/network/HtmlImage.java @@ -71,7 +71,7 @@ public class HtmlImage implements Html.ImageGetter { public BitmapDrawable getDrawable(final String url) { // Reject empty and counter images URL if (StringUtils.isBlank(url) || isCounter(url)) { - return new BitmapDrawable(getTransparent1x1Image()); + return new BitmapDrawable(resources, getTransparent1x1Image()); } final boolean shared = url.contains("/images/icons/icon_"); @@ -143,7 +143,7 @@ public class HtmlImage implements Html.ImageGetter { height = imgHeight; } - final BitmapDrawable image = new BitmapDrawable(imagePre); + final BitmapDrawable image = new BitmapDrawable(resources, imagePre); image.setBounds(new Rect(0, 0, width, height)); return image; diff --git a/main/src/cgeo/geocaching/ui/CacheListAdapter.java b/main/src/cgeo/geocaching/ui/CacheListAdapter.java index 69125b4..391e9ac 100644 --- a/main/src/cgeo/geocaching/ui/CacheListAdapter.java +++ b/main/src/cgeo/geocaching/ui/CacheListAdapter.java @@ -556,7 +556,7 @@ public class CacheListAdapter extends ArrayAdapter<cgCache> { public TouchListener(final cgCache cache) { this.cache = cache; final FlingGesture dGesture = new FlingGesture(cache); - gestureDetector = new GestureDetector(dGesture); + gestureDetector = new GestureDetector(getContext(), dGesture); } // tap on item diff --git a/main/src/cgeo/geocaching/ui/DateDialog.java b/main/src/cgeo/geocaching/ui/DateDialog.java index 03786b3..5dfd9b9 100644 --- a/main/src/cgeo/geocaching/ui/DateDialog.java +++ b/main/src/cgeo/geocaching/ui/DateDialog.java @@ -34,7 +34,7 @@ public class DateDialog extends Dialog { try { requestWindowFeature(Window.FEATURE_NO_TITLE); - getWindow().setLayout(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT); + getWindow().setLayout(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT); } catch (Exception e) { // nothing } |