Posts

Showing posts from January, 2017

Program on Turning ON,OFF and Enable device Discoverable in Bluetooth on Android devices

Image
I have used button and switch . activity_main.xml(using Button) < RelativeLayout android :id= "@+id/activity_main" android :layout_width= "match_parent" android :layout_height= "match_parent" tools :context= ".MainActivity" > < TextView android :text= "" android :layout_width= "match_parent" android :layout_height= "100dp" android :layout_alignParentTop= "true" android :layout_marginTop= "281dp" android :id= "@+id/textView" /> < Button android :text= "TURN_ON" android :layout_width= "wrap_content" android :layout_height= "wrap_content" android :layout_marginTop= "41dp" android :id= "@+id/button" android :layout_alignParentTop= "true" android :layout_alignParentLeft= "true&quo
Image
Program on Alert Dialog and Progress Dialog in Android Studio. activity_main.xml xml version= "1.0" encoding= "utf-8" ?> < LinearLayout android :id= "@+id/activity_main" android :layout_width= "match_parent" android :orientation= "vertical" android :layout_height= "match_parent" t ools :context= ".MainActivity" > < Button android :text= "Normal Dialog Box" android :layout_width= "match_parent" android :layout_height= "wrap_content" android :id= "@+id/button" android :onClick= "onClick" /> < Button android :text= "Progressive Dialog Box" android :layout_width= "match_parent" android :layout_height= "wrap_content" android :id= "@+id/button2" android :onClick= "onClick2" /> < Bu