in my code i'm using the a function with "query text change" but it's only supported from android 11 this is a simple search bar. how to verify the current version of android, and show a different activity? thanks!
How to use a function only if the version is 11+
15.3k Views Asked by Lele At
2
There are 2 best solutions below
Related Questions in ANDROID
- Delay in loading Html Page(WebView) from assets folder in real android device
- MPAndroidChart method setWordWrapEnabled() not found
- Designing a 'new post' android activity
- Android :EditText inside ListView always update first item in the listview
- Android: Transferring Data via ContentIntent
- Wrong xml being inflated android
- AsyncTask Class
- Unable to receive extras in Android Intent
- Website zoomed out on Android default browser
- Square FloatingActionButton with Android Design Library
- Google Maps API Re-size
- Push toolbar content below statusbar
- Android FragmentPagerAdapter Circular listview
- Layout not shifting up when keyboard is open
- auDIO_OUTPUT_FLAG_FAST denied by client can't connect to localhost
Related Questions in VERSION
- How to handle distro versions in Yocto
- Updating project version: Composer
- Updating app icon and screenshots
- Git shortlog exclude comments starting with string
- JPA Version column isn't updating after merge()
- Version Comparison using KSH
- When i run the below query in MySQL 5.6 it shows 141000 records. but when i run this on MySQL 5.0 it fetches only 91 records
- bash 4.2 / 4.3: Different behavior in C-style loop
- How can I install ruby 2.2.1 if I am on 2.2.2?
- Points to be looked into while upgrading from redis-2.8.19 to redis-3.0.2
- How to force a jar to run in java 7?
- UniServer Coral and UniServerZ Running Wrong PHP Version
- Can you update QPython3 version of Python3?
- How to add user into specific branch in svn subversion (batch script or api)
- Reactjs Methods in React Native to Find DOM Node Dimensions
Related Questions in ANDROID-4.0-ICE-CREAM-SANDWICH
- How to highlight a pressed cardView on IceCreamSandwich (Android 4.0.4)
- JS ReferenceError on Android WebView for api level 15
- How to use Gallery with ice cream sandwich
- How to remove the border for Share button in Action Bar?
- Android 4.1.1 not playing mp4 Video
- Data transfer performance between ICS and Jelly Bean
- AVD for API 14 (Android 4.0) simply doesn't work
- Background not blur activity in ICS api level 14 when open dialog in android
- Android App with SQLite runs in ICS but not Jelly Bean - IllegalStateException
- How to use a function only if the version is 11+
- Different behavior between ICS and Jelly Bean when using Window's FLAG_FULLSCREEN
- OpenGL ES 1.0 GL_TRIANGLES working on Android 2.3 but not on 3.x/4.x
- Is it possible to use Android 4 features on older versions?
- Handling the missing MENU button in new versions of Android (3.x and up)
- ellipse ice cream sandwich adds [
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
There are many questions about that. Check Get Android API level of phone currently running my application and Programmatically obtain the Android API level of a device? . In these answers, you might see something like:
But
.SDKhas been deprecated. UseSDK_INTinsteadSee Build.VERSION.html#SDK_INT for more.
Update:
As kcoppock has nicely suggested, you may want to use something like: