Android

Kotlin Basics and Installation Guide using Android Studio

What is Kotlin? Kotlin is JVM language. It is based on both object oriented and functional language. Can create classes, objects, Methods and also instances like object oriented language. As a Functional language supports creating higher order functions, collection of functions, passing function as parameter in other functions, returns functions…

google maps v2 illegalStateException

java.lang.IllegalStateException: Not connected. Call connect() and wait for onConnected() to be called. This happens when you request for locationupdates before the actual location connection is established. Instead use a boolean variable to check if connection is established or call for locationupdates as below in onConnected. @Override         public void…

Creating HyperLinks in Large Text (TextView) - Android

String.xml Hello World ` public void hyperlinkWordsInText() { Spanned sequence = html.fromhtml (context.getstring (r.string.totalText)); Spanablestringbuilder strbuilder = new Spanablestringbuilder(sequence); Underlinespan [] underlines = strbuilder.getspans (0, sequence.length (), Underlinespan.class); For (Underlinespan span : underlines) { int start = strBuilder.getSpanStart(span); int end = strBuilder.getSpanEnd(span); int flags = strBuilder.getSpanFlags(span); ClickableSpan…

Reading styled data from String.xml - Android

<string name="my_text"> <![CDATA[ <b>Autor:</b>Prashanth Madi<br/> <b>Contact:</b>prm0080@gmail.com<br/> <i>Copyright © 2012-2013 </i> ]]></string> From our Java code we…

List of Good Android Stuff (Tutorials)

http://www.vogella.de/android.html http://www.droidnova.com/first-list-application,37.html http://www.youtube.com/watch?v=QL5uaaOJQiE&feature=mfuinorder&list=UL ^ really good tutorial http://www.learn-android.com/2010/01/05/android-layout-tutorial/2/ free icon : http://www.softicons.com/free-icons/computer-icons/iphone-4g-icons-by-mike-demetriou/ iphone-4g-headphones-icon Different layouts:…

Changing Size of SeekBar programatically in android

I had a scienario to change size of seekbar by changing the visibility of surrounding views. Took a while but below is small code snipped which may be helpful for sme1... RelativeLayout.LayoutParams abc=new RelativeLayout.LayoutParams(526,30); abc.addRule(RelativeLayout.CENTER_VERTICAL); abc.addRule(RelativeLayout.RIGHT_OF,R.…