Posts

ButterKnife with Kotlin

Butter Knife With Kotlin (No Need) Butter Knife Butter knife is a little and light weight library used to inject android components using annotation processing If you android app using Kotlin then there is no need for butter knife or findviewbyid , we can simple use view id as view object as in example below   Textview layout < TextView android:id="@+id/textview" android:layout_width="match_parent" android:layout_height="55dp" android:gravity="center" android:text="Hello World!" android:textAlignment="center" android:textAllCaps="true" android:textColor="@color/colorPrimary"/> In the above textview we set textview as id for the textview view we can change color , settext etc,.   //you can use this on any methods in lifecycle no need to instantiate the view textview.setTextColor(Color. RED ) textview. text = "this text setted programati...

GESTURE DETECTOR ON VIEWS | IMAGEVIEW | TEXTVIEW | BUTTON | RELATIVELAYOUT

Gesture Detector         Gesture detector is used to find detect gestures like single tap,double tap, single tap confirmed, onfling , scrolling etc,.   activity_layout.xml < Button   android :textColor= "@android:color/white"     android :backgroundTint= "@android:color/holo_blue_dark"     android :text= "touch me "   android :layout_centerInParent= "true"     android :id= "@+id/button"   android :layout_width= "match_parent"   android :layout_height= "110dp" />   Declare gesture detector object   lateinit var mygestureDetector : GestureDetector   Define gesture detector object in oncreate mygestureDetector = GestureDetector ( this @MainActivity , MyGestureDetector())     Define touch listener object  var touchListener = View.OnTouchListener{ v,event-> mygestureD...

Share Text, Images, Multiple Images Using Kotlin

Image
Intent  Intent  object   provides us many functionalities Starting another activity  (eg., Login activity to MainActivity) Starting background service(eg., Download large files that run on background) Sending a Broadcast (eg., Firebase Messages to any alive activity) Intent types        Explicit Intent            Calling fully qualified targets like starting another activity within an app or starting a download progress by calling a service       Implicit Intent            It's like sharing a content or to ask another application to perform certain actions eg., opening a browser, opening images, playing a video by choosing player like MX player or vlc player or default Videos player Share Text val sendIntent = Intent() sendIntent.action = Intent.ACTION_SEND sendIntent.type = "text/plain" sendIntent.putExtra(Intent.EXTRA_TEXT, "http://g...
Image
Kotlin for Android Developers Antonio Leiva ebook https://drive.google.com/file/d/0BxH9rpPc1ztrVng4Y0lUZTJoWU0/view?usp=sharing 
Image
Mr. Kotlin Kotlin for Android developers by Marcin Moskala, Igor W ojda  ebook if u can't download just comment your  email,  I will send to your email https://drive.google.com/open?id=0BxH9rpPc1ztrMGRCSzJqWDJQRk0