diff options
-rw-r--r-- | src/github/daneren2005/dsub/fragments/SubsonicFragment.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java index e8ae6f1e..07aed372 100644 --- a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java +++ b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java @@ -28,6 +28,7 @@ import android.content.pm.PackageManager; import android.content.pm.ResolveInfo;
import android.media.MediaMetadataRetriever;
import android.net.Uri;
+import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;
@@ -361,6 +362,10 @@ public class SubsonicFragment extends Fragment { }
protected int getNewId() {
+ if(rootView != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
+ return rootView.generateViewId();
+ }
+
for (;;) {
final int result = nextGeneratedId.get();
// aapt-generated IDs have the high byte nonzero; clamp to the range under that.
|