Posts

Showing posts from June, 2018

Screen Size in Android

drawable-ldpi        //240x320 drawable-mdpi        //320x480 drawable-hdpi        //480x800 drawable-xhdpi       //720x1280 drawable-xxhdpi      //1080X1920 drawable-xxxhdpi     //1440X2560

Google Map Api Places AutoComplete Implementation in Android

Google Map Api Places AutoComplete Implementation : - 1)Create Google Map Api key from : - https://console.developers.google.com/apis/credentials ->Select The Project ->Create Credentials ->Select API key The API Key is Generated : - Its Looks Like : - AIz****O_AamI*******rBC_hL*******BU 2)Now Select Map Api For Places : - ->From Home Select Api & Services. ->Select Library : - ->Enable Places Sdk For Android ->Enable Places Api Now the api generated For Searching is : - ->https://maps.googleapis.com/maps/api/place/autocomplete/json?components=country:in&input=gandhidham&key=AIz****O_AamI*******rBC_hL*******BU Change you api key. Ex From : -https://examples.javacodegeeks.com/android/android-google-places-autocomplete-api-example/ 3)Now Come back in Android Studio : - 1)->In activity_main.xml Add this : - <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="h

Code For Round Image in Android

ImageView imageView = (ImageView)findViewById(R.id.imageView); Bitmap avatar = BitmapFactory.decodeResource(getResources(), R.drawable.background); RoundedBitmapDrawable roundDrawable =                                                           RoundedBitmapDrawableFactory.create(getResources(), avatar); roundDrawable.setCircular(true); imageView.setImageDrawable(roundDrawable);

MediaPlayer Life-Cycle in Android

Image
Media Player Life-Cycle

Library To Load Html Content In Android TextView in Android

//Html Viewer     compile 'org.sufficientlysecure:html-textview:3.5' Tags supported by Android Working Things : - <p> <div> handled exactly like <p> <br> <b> <i> <strong> (bug on some Android versions: generates italic) <em> (bug on some Android versions: generates bold) <u> <strike> <tt> <dfn> <sub> <sup> <blockquote> <cite> <big> <small> <font size="..." color="..." face="..."> <h1>, <h2>, <h3>, <h4>, <h5>, <h6> <a href="..."> <img src="..."> ----->Extended support by HtmlTextView <ul> <ol> <dd> <li> <code> <center>

How to Fix ‘This file name is too long’ Error?

The solution to this stupid error is also a bit silly. However, it is tried and it worked on every time. You just need to follow the following steps: Open the folder that contains the long name error file. Go to the first parent folder (the folder containing this file) and rename the folder to a very short name, 2 or 3 characters are enough. For Example, the problematic file named ‘our_intro.mp4’ exists in the folder ‘Chapter_01 A Brief Introduction of Our Well Known Well Established Company’. You need to change this folder name to some very short name such as ‘Int’ or any other short name. Now open the file, and it should open without any problem or error message.