Skip to main content

Posts

Change Android Studio editor's background color - Android Studio

You can change it by going  File     Settings  (Shortcut  CTRL +  ALT +  S ) , from Left panel Choose  Appearance   Now from Right Panel choose  theme . Android Studio 2.1 Preference -> Search for Appearance -> UI options , Click on DropDown  Theme Android 2.2 Android studio -> File -> Settings -> Appearance & Behavior -> Look for UI Options Import External Themes You can download custom theme from  this  website. Choose your theme, download it. To set theme Go to  Android studio -> File -> Import Settings ->  Choose the .jar  file downloaded. _____________________________________________________________________________ Happy Coding...

HAPTIC FEEDBACK - ANDROID TUTORIAL

Haptic Feedback ? Haptic feedback, often referred to as simply "haptics", is the use of the sense of touch in a user interface design to provide information to an end user. The resistive force that some "force feedback" joysticks and video game steering wheels provide is another form of haptic feedback. Haptic Feedback in Android??? Haptic feedback (commonly referred to as haptics) is the use of touchfeedback to the end user. You know how your Android phone vibrates a tiny bit when you tap one of the navigation buttons? That's haptics at work. How it works ? By default haptic feedback setter works only for long press.  Here we are implementing this haptic feedback in simple onClick You need to add the "android.permission.VIBRATE" permission to the program's manifest.  You can do so by adding the following to the "AndroidManifest.xml" file, <uses-permission android:name = "android.permission.VIBRATE"

Create RadioButton RadioGroup Dynamically - Android Tutorial

In this article, we took a look at how to create Radio Buttons Dynamically. Here I have created this example to create the number of time slots (slot select by Radio Button) in between two selected time. The final output looks like, Here I have selected the Start time as 10:00 AM and End time as 12:00 PM and the Time interval between two slots as 15 mins. Therefore the calculation will result as 8 slots. MainActivity Class Example shows the Radio group in Grid view -  Adding the values to an ArrayList, String slotscounts += " "+slotStartTime+ "-"+slotEndTime +","; ArrayList<String> slots = new ArrayList<>(); slots.add(slotscounts); Passing the value to an Adapter class(Base Adapter used) /*Call adapter to set_radiobuttons_for_timeSlots*/ GridSlotAdapter gridslotadapter = new GridSlotAdapter(MainActivity.this, slots); /*set an adapter in Gridview*/ slotGrid.setAdapter(gridslotadapter); Adapter Class Adapter layout