Use target api instead of new api

This commit is contained in:
Bennet Brunsen committed 2015-08-13 15:11:56 +02:00
1 parent e7f985eb38
commit 7547a315f7
1 file changed
+4 -2
@@ -1,6 +1,7 @@
package com.sap.sailing.android.tracking.app.ui.fragments;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
@@ -9,6 +10,7 @@ import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.provider.MediaStore;
import android.view.LayoutInflater;
@@ -115,7 +117,7 @@ public class RegattaFragment extends BaseFragment implements OnClickListener {
}
@SuppressWarnings("deprecation")
@SuppressLint("NewApi")
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
private void switchToThankYouScreen() {
showingThankYouNote = true;
@@ -124,7 +126,7 @@ public class RegattaFragment extends BaseFragment implements OnClickListener {
Button startTrackingButton = (Button) getActivity().findViewById(R.id.start_tracking);
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
startTrackingButton.setBackgroundDrawable(getResources().getDrawable(R.drawable.rounded_btn_yellow));
} else {
startTrackingButton.setBackground(getResources().getDrawable(R.drawable.rounded_btn_yellow));