TutorialKart is an ensemble of tutorials and is growing day by day with its additions of useful and informative tutorials.
Don't wanna be here? Send us removal request.
Link
0 notes
Text
Kotlin Android - WebView - Example
Kotlin Android – WebView – Example
Kotlin Android – WebView
Android AlertDialog class is used to display a web page embedded in the Android Activity. The web page could be displayed in the same Android Application, without opening a browser window.
WebView could be used in your Android Application like any other View (say TextView, Button, etc.).
To display WebView in your Android Activity
Add permission for INTERNET in…
View On WordPress
0 notes
Photo
Kotlin Android – Alert Dialog – Example Kotlin Android - Alert Dialog Android AlertDialog class is used to display a dialog box to alert the user with positive and negative buttons.
0 notes
Text
Kafka Streams Tutorial
Kafka Streams
Kafka Streams Tutorial : In this tutorial, we shall get you introduced to the Streams API for Apache Kafka, how Kafka Streams API has evolved, its architecture, how Streams API is used for building Kafka Applications and many more.
Kafka Streams API is a part of the open-source Apache Kafka project.
How Streams API evolved
If you are curious enough to know how Streams API has…
View On WordPress
0 notes
Text
Kotlin Android - Floating Label in EditText using TextInputLayout - Example
Kotlin Android – Floating Label in EditText using TextInputLayout – Example
Android – Floating Label in EditText using TextInputLayout
In Android, Floating Label / Text could be displayed when EditText is in focus using TextInputLayout. When the EditText is not in focus the hint text is displayed as hint in EditText. When user enters a value, and the focus is changed to other input field, the floating label is still displayed.
To display a Floating Text or Label when…
View On WordPress
0 notes
Text
Android - All support libraries must use the exact same version specification
Android – All support libraries must use the exact same version specification
Android – All com.android.support libraries must use the exact same version specification
If you have encountered a notification similar to the following
“All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 27.1.1, 27.1.0. Examples include com.android.support:animated-vector-drawable:27.1.1 and…
View On WordPress
0 notes
Text
Kotlin Android Snackbar - Change Text Color, Background Color, Action Button Color
Kotlin Android Snackbar – Change Text Color, Background Color, Action Button Color
Android Snackbar – Change Text Color, Background Color, Action Button Color
Snackbar’s Text Color, Background Color, Action Button Color could be changed using view.setBackgroundColor(), snack.view.snackbar_text.setTextColor() and setActionTextColor() respectively.
To change Snackbar’s Text Color snack.view.setBackgroundColor(Color.parseColor(“#FFFFFF”))
To change Snackbar’s Background Color
val…
View On WordPress
0 notes
Text
Kotlin Android - Snackbar - Set Action - Example
Kotlin Android – Snackbar – Set Action – Example
Android – Snackbar setAction
An action could be set to Snackbar using Snackbar.setAction() method. setAction takes View.OnClickListener as second argument and you may write your set of instructions to perform the action.
Following variants are available for setAction method.
setAction(int resId, View.OnClickListener listener)
Set the action to be displayed in this BaseTransientBottomBar.…
View On WordPress
0 notes
Text
Kotlin Android - Snackbar - Example
Kotlin Android – Snackbar – Example
Android Snackbar
Android Snackbar is a material design component introduced with API 22.2.0. The functionality would resemble Android Toast, but with Snackbar, Snackbar could be dismissed by user or an action listener could be setup to respond to user actions.
Snackbar when shown, is displayed at the bottom of the screen, with background color “#323232” and text color “#FFFFFF“.
Important Note:…
View On WordPress
0 notes
Text
Kotlin Android - TextView - Basic Example
Kotlin Android – TextView – Basic Example
Android TextView
Android TextView is an user interface element that helps to display text in an activity.
Create an Android Application, named TextViewExample, with empty activity and just run the Android Application.
“Hello World!” being displayed at the center of the Activity is a TextView.
Open activity_main.xml (layout for the MainActivity.kt) file.
View On WordPress
0 notes
Text
Basic walk through Android Studio IDE
Basic walk through Android Studio IDE
Android Studio IDE
In this section, we shall learn some of the Android Studio features and windows. The base of Android Studio is IntelliJ IDEA. If you have already worked with IntelliJ IDEA, then most of the Android Studio would be familiar.
Android Studio provides Menus and ToolBars to run android applications, debug android applications, modify project structure, manage Android Virtual…
View On WordPress
0 notes
Text
Kotlin Android - Draw SVG to Canvas - Example
Kotlin Android – Draw SVG to Canvas – Example
Android Draw SVG to Canvas
ImageView is used to display Bitmap, Drawable or such image sources.
SVG (Scalable Vector Graphics) is used to define vector-based graphics. SVG defines the graphics in XML format and when rendered the picture do not degrade in quality if they are zoomed or resized. Although it is commonly used on web, with the advantages it has, we may render and use it on Android.
In…
View On WordPress
0 notes
Text
Android Studio - Add External Jar to Library/Dependencies
Android Studio – Add External Jar to Library/Dependencies
Android Studio – Add External Jar to Library (Project Dependencies)
There are many external libraries available that make many specific tasks simple and easy with the APIs and Classes they provide. In this tutorial, we shall learn how to import an External Jar file to the Project Module Dependencies in Android Studio.
For the demo purpose, we shall take a jar file named svg-android-1.1.jar.
To…
View On WordPress
0 notes
Text
Kotlin Android - Get screen Width and Height programmatically - Example
Kotlin Android – Get screen Width and Height programmatically – Example
Android – Get screen width and height
In Android, WindowManager is available to every Activity. Through WindowManager, we can get the metrics of default display in which the activity is being shown.
To get Android screen width and height programmatically,
Create a DispalyMetrics() object.
Pass the displayMetrics object to getMetrics() method of Display class. WindowManager.defaultDisplay()…
View On WordPress
0 notes
Text
Kotlin Android - Draw Circle Border - Paint, Canvas - Example
Kotlin Android – Draw Circle Border – Paint, Canvas – Example
Android – Draw Circle Border
To draw a circle border to Canvas using Paint :
Initialize a Paint Object
Set AntiAlias and Dither effects to true, to get a smooth drawing effect of circle.
Set paint style to STROKE. Geometry and text drawn with this style will be stroked, respecting the stroke-related fields on the paint.
Set stroke width. Provide a float value.
Set the color.
Draw Circle using…
View On WordPress
0 notes
Text
Kotlin Android - Draw Shape (Rect, Oval) to Canvas - Example
Kotlin Android – Draw Shape (Rect, Oval) to Canvas – Example
Draw Shape to Canvas
Drawing to a Canvas gives you full control of drawing shapes or bitmaps than drawing on to a View object in a layout.
To draw shape onto Canvas :
Create a ShapeDrawable object with required shape.
ShapeDrawable(OvalShape()) to draw Oval Shape
ShapeDrawable(RectShape()) to draw Rectangle Shape
Set bounds to the ShapeDrawable object. shapeDrawable.setBounds( left, top, right,…
View On WordPress
0 notes