Skip to main content

Posts

Featured Post

Cards : Material Design Tips

From Google material design documentation A card is a piece of paper with unique related data that serves as an entry point to more detailed information. For example, a card could contain a photo, text, and a link about a single subject. How to add? I. In your build.gradle include the cardview library: dependencies { compile 'com.android.support:cardview-v7:X.X.X'// where X.X.X version} II. Declare your card inside any layout.xml file and insert views inside it. <android.support.v7.widget.CardViewandroid:layout_width="match_parent"android:layout_height="200dp"><TextViewandroid:text="Hello World!"android:layout_width="wrap_content"android:layout_height="wrap_content"/></android.support.v7.widget.CardView> Use android:clipToPadding="false" on the card parent allows you to prevent posible clips in the outer shadows of the card. How to style? I. Declare your custom style in your styles.xml file. <st…
Recent posts

How to create Slanted TextView in Android | Android Studio | Stackoverflow

Android Slanted TextView .
Preview
Gradlecompile 'com.haozhang.libary:android-slanted-textview:1.1'
XML Layout<com.haozhang.lib.SlantedTextView android:layout_width="80dp" android:layout_height="80dp" android:gravity="center" app:slantedBackgroundColor="@color/secondary_text" app:slantedLength="40dp" app:slantedMode="left" app:slantedText="IOS" app:slantedTextColor="@color/primary" app:slantedTextSize="16sp"/>

How to launch Android app from Dialer

Android give facility to developer and user to use a flexible and open-source platform. In Android, you can take permission for use of Dialer and also the Broadcast Receiver for listening something happened or not.

So, today I am sharing with you how to open Apps through Dialer. Dailing some predefine code | Number which opens our Application.


Here Some Java code which listening...

publicclassDialReceiverextendsBroadcastReceiver{@Overridepublicvoid onReceive(Context context,finalIntent intent){if(intent.getAction().equals(android.content.Intent.ACTION_NEW_OUTGOING_CALL)){String phoneNumber = intent.getExtras.getString("Intent.EXTRA_PHONE_NUMBER");if(phoneNumber.equals("*#588637#")){//do your stuff}

How to know FingerPrint feature available in android? | FingerPrint Feature code too check your mobile Supported or not ?

In Android Version 6.0 Android Marshmallow FingerPrint Features Enable. So, how you code your device support or not ? How to check the FingerPrint code works or not here is the solution for the FingerPrint check is your mobile support or not ?


Google Official Announcement for Finger Print Official Documentation for Android FingerPrint API 

You know how to get all permission for FingerPrint and how to use but how to know devices support FingerPrint or not ? below is some of code which helps you to know device support or not ?



So, Let get Started for FingerPrint...

First, you have to get permission from the Manifest file..

<uses-permission android:name="android.permission.USE_FINGERPRINT"/>


Example 1
if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_FINGERPRINT)) {
    Toast.makeText(this, "Finger print not supported", Toast.LENGTH_SHORT).show();
}

Example 2
FingerprintManager fingerprintManager = (FingerprintManager) getSystemService(Context.FINGERPRINT_SE…

Floating Labels : Material Design Tips

From google material design documentation. When the user engages with the text input field, the floating inline labels move to float above the field. How to add? I. In your build.gradle add latest appcompat and design libraries. dependencies { compile 'com.android.support:appcompat-v7:X.X.X'// where X.X.X version compile 'com.android.support:design:X.X.X'// where X.X.X version} II. Make your activity extend android.support.v7.app.AppCompatActivity. publicclassMainActivityextendsAppCompatActivity{...} III. Declare your EditText inside any layout.xml file and wrap it with TextInputLayout. <android.support.design.widget.TextInputLayoutandroid:layout_width="match_parent"android:layout_height="wrap_content"><EditTextandroid:layout_width="match_parent"android:layout_height="wrap_content"android:hint="@string/Title"/></android.support.design.widget.TextInputLayout>

User Input Errors : Material Design Tips

From google material design documentation. Help users fix input errors as soon as they are detected. Disable the submission of a form if errors are detected, and if detected only after form submission, clearly explain the error and how to fix it. How to add? I. In your build.gradle add latest appcompat and design libraries. dependencies { compile 'com.android.support:appcompat-v7:X.X.X'// where X.X.X version compile 'com.android.support:design:X.X.X'// where X.X.X version} II. Make your activity extend android.support.v7.app.AppCompatActivity. publicclassMainActivityextendsAppCompatActivity{...} III. Declare your EditText inside any layout.xml file and wrap it with TextInputLayout. <android.support.design.widget.TextInputLayoutandroid:id="@+id/inputLayout"android:layout_width="match_parent"android:layout_height="wrap_content"app:errorEnabled="true"><EditTextandroid:layout_width="match_parent"android:lay…

Alerts : Material Design Tips

From Google material design documentation Alerts are urgent interruptions, requiring acknowledgement, that inform the user about a situation. How to add? I. In your build.gradle add latest appcompat library. dependencies { compile 'com.android.support:appcompat-v7:X.X.X'// where X.X.X version} II. Make your activity extend android.support.v7.app.AppCompatActivity. publicclassMainActivityextendsAppCompatActivity{...} III. To create your dialog use android.support.v7.app.AlertDialog.Builder. privatevoid showLocationDialog(){AlertDialog.Builder builder =newAlertDialog.Builder(MainActivity.this); builder.setTitle(getString(R.string.dialog_title)); builder.setMessage(getString(R.string.dialog_message));String positiveText = getString(android.R.str