Parses a specific value from string against a specific key for xml format data l̥ private String getValueFromString(String key, String input) { if (!AppUtility.isNullOrEmpty(input)) { try { String match = key.toLowerCase() + "=\""; String[] dataArray1 = input.split(match); String[] dataArray2; if (dataArray1 != null && (dataArray1.length > 0)) { int size = dataArray1.length; if (size > 1) { dataArray2 = dataArray1[1].split("\""); return dataArray2[0].trim(); } else { match = key.toUpperCase() + "=\""; dataArray1 = input.split(match); if (dataArray1 != null && (dataArray1.length > 0)) { size = dataArray1.length; if (size > 1) { dataArray2 = dataArray1[1].split("\""); return dataArray2[0].trim(); } } } } } catch (Exception e) { e.printStackTrace(); } } return " ";/*empty string*/ }
Android Tutorial -Learn Android Programming and how to develop android application,activity,lifecycle,service,layout,architecture,debugging,bugs ,handling event others.
- HOME
- JAVA
- ANDROID
- 1.Material Search View (google play store search bar)
- 2.RecyclerView with a SearchView with filter
- 3.Speed Up android studio process Class
- 4.load url image from the network by asych task
- 5.Convert string to MD5
- 6.pass arraylist through intent
- 7.Bitmap to base64 convert
- 8.Snackbar Getview
- 9.load images from url and load into ViewPager with json
- 10.Splash Screen with timer
- 11.java could not reserve enough space
- 12.Cannot load project java.lang.NullPointerException
- 13.selecting pic from gallery or camera through intent
- 14.View Pager with Circle Indicator(Image slider show)
- 15.Internet Connection Detector
- 16.WebView with Progress Dialog
- 17.Created animated GIF with images
- 18.Reduce Android Studio Project Size
- 19.unable to resolve dependency
- 20.call Fragment method in Main Activity by interface
- 21.Get RecyclerViewAdapter onclick postion in main activity
- 22.Circle ImageView
- Flutter
- C#
- 1.Array
- 2.Jagged Array
- 3.Small Application program
- 4.Inheritance hybrid
- 5.ReferenceType:PassByVal and PassByRef
- 6.PlaceHolder
- 7.Interface:Implementing Multiple Inheritance
- 8.Collections: ArrayList,HashTable,Stack
- 9.Scope Test
- 10.Boxing and Unboxing
- 11.Constructors
- 12.Polymorphism: Overload / Override
- UNIX
- Videos
- Download
- About
- Github
- Youtube
Thursday, 9 May 2019
Parses a specific value from string against a specific key for xml format data l̥
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment