Posts

Showing posts with the label android studio

How to Add Git to Android Studio Projects and pushed it to (or) share it to GitHub

Image
To add version control such as git to your Android Studio Projects and then sharing it to Github follow the below steps: First, create the android project Then go to VCS  --> Import into Version Control  --> Create Git Repository Please find the image below for the reference Then select the root of your project for git init, refer to the image below Then go to Android Studio select root of project , right click and then select Git --> Add, refer to the image below Now again right click project name and select Git-->Commit, refer to the image below once you select commit you will be presented with another screen where you can write commit message and select commit Now our project has been added to the git any changes from now on will be tracked and added to the version control Share Project on GitHub To share the project on GitHub follows the below steps: Go to VCS --> Import into Version Control --> Share Project on GitHub, refer the image below ...

Android:How to parse JSON using Okhttp Library Example with Custom View (ImageView + TextView)

Hello to everyone, Today I am posting about JSON Parsing in Android using OkHttp Library. I went through many post for parsing json but there aren't any useful (or) detailed approach (or) step by step approach, so I decided to make a project with git and detailed every step in it.  You can get the whole code on GitHub JSONParsingUsingOkhttp .  Here each and every commit describe the steps I have taken to build the project, just import this project into the Android Studio and navigate through each and every commit to know the steps.  If you find it useful just share this project.

To Show (or) Hide the Keyboard When User Launches the Activity

If you are developing an Android Application which make use of EditText view, which every developer make use of one way (or) other, here is tip to load the keyboard as soon as you enter the activity (or) disable and show only when user places the cursor on the EditText TIP 4:            To show the keyboard as soon as the user launches the activity (or) enters the screen which contains EditText fields, Add the below line of code to AndroidManifest.xml file inside the tag : android :windowSoftInputMode= "adjustResize|stateHidden"             To disable the keyboard and show only when user places the cursor use the below line of code: android :windowSoftInputMode= "adjustResize|stateVisible"

How to move between Edittexts using Android Softkeyboard

So, you are developing a Login Screen (or) Registration Screen in which you allowed the user to type their details (or) credentials one by one, so instead of placing the cursor in each of the fields, we can as a developer give them the option of navigating the fields through the inbuilt keyboard TIP 3:              To navigate (or) switch through the fields in the Login form (or) Registration from (or) Any other form just add the below attribute to every view android:imeOptions="actionNext"

How to Install Both Android Studio and Eclipse with a Single SDK

To install both Android Studio and Eclipse with a standalone SDK follow the steps as described below First let us download our new editor for building apps code-named Android Studio from this link  Download Android Studio  the latest build. Secondly Download the Eclipse ADT package bundle that includes Eclipse IDE, ADT plugin from Android and Android SDK. Unzip the Eclipse ADT package and run the eclipse, make sure you have Java installed i.e; the minimum recommended is Java 1.7 After successfully starting the eclipse, move the SDK folder out of eclipse Now go to eclipse add the SDK path by visiting Windows >>> Preferences >>> Android >>> SDK Location. Now when you Launch Android Studio , you will be prompted to enter the SDK location (OR) Launch the SDK manager and set the Android SDK Location field to your installed SDK path Now When you update the SDK tools,  either through Eclipse (or) Android Studio you will have the latest SDK to both t...

How to Resize the Image and preserve its aspect ratio when downloading image from the internet in Android

When loading Images from the network, we'll need to set a specific flag, adjustViewBounds to our layout TIP 2: To re-size the image and preserve its aspect ratio among many android devices while downloading it from the network (or) internet, just add the following attribute to the Imageview android:adjustViewBounds="true"

How to Capitalized the first letter in Edit Text in Android

Many of us building Android Apps Nowadays and they need some tips (or) guidelines also some sample code's to carry on their work and serve the community, so I thought why not I share some tips regarding android apps which I came across. TIP 1 :                 To capitalized first alphabet of any word in Edit Text, just add the following attribute to your xml of EditText View android:inputType="textCapWords"

Android Studio 1.0 Finally Released

Finally, some good news for Android Developer's as Google officially released the stable version of Android Studio(IDE) which was in beta for last two years so head over and download android studio and start building applications to share it with the rest of World. For Full Feature set of Android Studio be sure to check out Android Studio Page As you know Android Studio has new build system called Gradle-based build system , so you can learn all the basics, advanced topics on the official website of Gradle For all tips and tricks of Android Studio be sure to check out this Android tips and tricks page To learn more about the IDE which is based on Intellij IDEA Community Edition you can head over to the their Website. To learn more specific to our Android, they have made some Getting Started document , be sure to check it out that as well If you want be more familiar with the User Interface of Intellij IDEA, they have made separate section of User Interface for you guys to get acc...

How to import android existing android project (or) non gradle project (or) android example project in android studio

So you have downloaded some sample android project , trying it to import into Android Studio to run it right, however android studio doesn't import so easily, you have make some customization to run it, follow these below steps to import non-gradle project into gradle project First Download any sample project unzip it and copy to our workspace folder Then, go to Android Studio click file --> import project --> select your downloaded folder --> ok Then, make a settings.gradle file and copy this include ':Name of your project' Then, make a local.properties file to include your sdk path, all projects in my android studio link to below sdk path, so edit and change this to your path sdk.dir=/home/umidtech/android-studio/sdk Then,last but not the least make a build.gradle file and copy this buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.7.0' } } apply plugin: 'android...