Category:

ToolBar menu with Image,Text and CheckBox

Here is a simple XML menu file in which help to add icon, text and checkbox in your toolbar menu in your android application. <?xml version=”1.0″ encoding=”utf-8″?> <menu xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:app=”http://schemas.android.com/apk/res-auto”> <!– Settings, should always be in the overflow –> <item android:id=”@+id/action_settings” android:icon=”@drawable/ic_cutlery_white_26_32″ android:title=”” app:showAsAction=”always”> <menu> <group android:checkableBehavior=”all”> <item android:id=”@+id/top” android:checked=”true” android:enabled=”true” android:icon=”@drawable/ic_chef_cap_red_26_32″ android:title=”Cooking Now” app:showAsAction=”always|withText” /> <item android:id=”@+id/bottom” […]

Continue Reading
Posted On :
Category:

Print form input key value using javascript

This is a a simple code to check form input fields names and its value using javascript for( var i=0; i<document.forms.FORM_NAME.length; i++ ) { var fieldName = document.forms.FORM_NAME[i].name; var fieldValue = document.forms.FORM_NAME[i].value; // use the fields, put them in a array, etc. // or, add them to a key-value pair strings, // as in regular […]

Continue Reading
Posted On :
Category:

Clear back stack in android

In some of application we need to implement logout functionality this is one of very easy way to clear all history in your application of activity. Intent i= new Intent(MainActivity.this, Login.class); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); startActivity(i); finish(); 🙂  

Continue Reading
Posted On :
Category:

Animation between login and forgot screen android

Last updated on March 13th, 2020 at 12:02 pmIn this tip i am going to share a simple and use full code which help you to save extra screen and also a simple animation between layout in android Layout Code <FrameLayout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:tools=”http://schemas.android.com/tools” android:layout_width=”match_parent” android:layout_height=”match_parent” android:background=”@color/colorPrimaryDark” android:orientation=”vertical” android:paddingBottom=”@dimen/activity_vertical_margin” android:paddingLeft=”@dimen/activity_horizontal_margin” android:paddingRight=”@dimen/activity_horizontal_margin” android:paddingTop=”@dimen/activity_vertical_margin”> <LinearLayout android:layout_width=”match_parent” android:layout_height=”wrap_content” android:orientation=”vertical”> […]

Continue Reading
Posted On :
Category:

Create round image by code android

In this i tip i am going to sharing some useful code to create round  or circle image in android and set on imageview or image button. Convert Image to Bitmap and Crop image if you want to set image in specific view public Bitmap localImageToBitmap(int source, int THUMBNAIL_SIZE) { int size = THUMBNAIL_SIZE; Bitmap […]

Continue Reading
Posted On :
Category:

Fix toolbar spacing android

In this tip i show you how you can remove spacing from custom toolbar android To remove left and right side space from toolbar try this <android.support.v7.widget.Toolbar xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:app=”http://schemas.android.com/apk/res-auto” android:id=”@+id/menuToolbar” android:layout_width=”match_parent” android:layout_height=”wrap_content” android:layout_margin=”0dp” android:background=”@color/white” android:contentInsetLeft=”10dp” android:contentInsetRight=”10dp” android:contentInsetStart=”10dp” android:minHeight=”?attr/actionBarSize” android:padding=”0dp” app:contentInsetLeft=”10dp” app:contentInsetRight=”10dp” app:contentInsetStart=”10dp”> /* — Your Stuff —*/ </android.support.v7.widget.Toolbar> Use contentInsetStart to set spacing in your custom […]

Continue Reading
Posted On :