Short Notes

Passing data to Activity and Fragment in Android

Send value to another activity

Sometimes we need to send some valuable data to another activity or fragment, So, when passing data to an activity or a fragment in Android, the Bundle is used to contain the data and ship it to the a...

How do I programmatically 'restart' an Android app

Android restart app programmatically

Sometimes we need to restart our Android app between the code execution, In that case, we have to use some set of code to perform this action. Now we will learn How do I programmatically restart an An...

Exception handling in php

Different error handling methods

Exception handling is used to change the normal flow of the code execution if a specified error (exceptional) condition occurs. This condition is called an exception. PHP has an exception model simila...

How to call a method after a delay with handler

How to use handler in andorid

Hi, sometimes we need to execute my method or we can say my function after a time delay. In that situation what can I do? So the answer is - Use Handler() for that. A Handler is a utili...


How to justify content in div

Just set your inner div in center

You can justify the content of your page or content within the layout. The justify-content property aligns the flexible container's items when the items do not use all available space on the main-axis...

Spinner with search option in android

How to create searchable spinner in android

Hello, Let's see the above example for your awesome dropdown list to search. Searchable Spinner is a dialog spinner with the search feature which allows to search the items loaded in th...

How to open link externally from android webview

Android open url external browser and internal WebView

You can open link of the WebView externally from android webview without leaving the app. For this action you need to set a WebViewClient class in your WebView. No n...

How do I hide an element when printing a web page

Hide specific elements while printing web page

Sometime we need to show all content on the web page but hide some content for the print. So, you can use this trick for that. Hide specific elements while printing web page: To hide an element, you...


Top