Posts

Upload an Image to Firebase Android

Image
Firebase is a mobile platform that helps you to quickly develop high quality apps, grow user base, and earn more. Firebase provides a variety of features and services that you can implement within your app as and when required. Various services provided by Firebase are  Cloud Firestore, Firebase ML, Cloud Functions, Authentication, Hosting etc. Today, we will show you how you can upload an image file from within your app to Firebase Database. First, create the layout required to upload the image file. For that follow the below code: Once done, add the following code to the java file of your android project. Make sure you have connected your project with Firebase.  Output :    

Bottom Sheet Dialog in Andriod application .

Image
Bottom Sheet Dialog box :  Bottom Sheet Dialog is a component that slides up from the bottom of the screen. There are two types of bottom sheets Persistant Bottom Sheet and Modal Bottom Sheet. Persistant Bottom Sheet : This bottom sheet shows in-application content. It will be shown at the base of the screen with a portion of its part noticeable , it shows full substance in the wake of growing it. Modal Bottom Sheet : This bottom sheet functions as a menu or discourse with choices, it implies this replaces menu or exchange. It has a higher height than the determined base sheet. For the most part, they are utilized for incorporating profound connecting picker activities.  How to implement bottom sheet dialog box in Android  app ? Bottom Sheet Dialogs are very commonly used in a lot of applications today. Here we will be imitating a bottom sheet dialog like the  Whatsapp App tha...

Handling orientation changes in a WebView in Android

What is a WebView? The  WebView  framework allows you to specify viewport and style properties that make your web pages appear at the proper size and scale on all screen configurations for all major web browsers. You can even define an interface between your Android app and your web pages that allows JavaScript in the web pages to call upon APIs in your app—providing Android APIs to your web-based application. WebView objects allow you to display web content as part of your activity layout, but lack some of the features of fully-developed browsers. A WebView is useful when you need increased control over the UI and advanced configuration options that will allow you to embed web pages in a specially-designed environment for your app. Now it often happens that when the orientation of an app is changed by the user i.e the screen is rotated, the current progress of the WebView is lost and the Web Page reloads from the ...

Passing data between activities in Android Apps.

Image
In this blog post, we will demonstrate on how to pass data between activities in an android app in Android Studio. There are many ways to communicate data to different activities in an application, but today we will be passing the data using Intents.So whats an intent ? An Intent  is a messaging object you can use to request an action from another app component . Although intents facilitate communication between components in several ways, there are three fundamental use cases:  Starting an activity Starting a service  Delivering a broadcast There are two types of intents : Implicit Intents Explicit Intents Explicit Intents    specify which application will satisfy the intent, by supplying either the target app's package name or a fully-qualified component class name. You'll typically use an explicit...

Custom SeekBar in Android Studio .

Image
In this post, you will learn to create a custom seekbar   in android studio.  A SeekBar is an extension of ProgressBar that adds a draggable thumb. The user can touch the thumb and drag left or right to set the current progress level or use the arrow keys to do so. To create a custom seekbar need follow these steps .  Create a drawable resource file in the drawable folder. Name it whatever you want. In this we will create a custom appearance for the thumb of the seekbar .  Copy the following code in this drawable folder :   custom_thumb.xml: Now create another drawable resource file for the custom background of the seekbar . Paste in the following code in this. Now in your activity_main.xml file, copy this code : activity_main.xml: Output:

Implementing Simple CardView in android app with Android Studio .

Image
In this post, you will learn simple implementation of Cardview in android studio .Cardview is a widget which was introduced un Android 7.0 . Based on its elevation, cardview gives a shadow effect the makes the app UI more beautiful and appealing. CardView is mainly considered as a container as it wraps for each item within a ListView or a RecyclerView . Here is a simple way to implement CardView in your application. Add the following code to your xml file : <? xml version ="1.0" encoding ="utf-8" ?> <RelativeLayout xmlns: android ="http://schemas.android.com/apk/res/android" xmlns: app ="http://schemas.android.com/apk/res-auto" xmlns: tools ="http://schemas.android.com/tools" android :layout_width ="match_parent" android :layout_height ="match_parent" android :background ="#E5E5E5" tools :context =".MainActivity" > <androidx.cardview.widget.CardView ...