Skip to main content

Posts

How to make a Text to Speech Application Android? - ABNHive

Reading the tiny text on a mobile screen is never a fun experience. That text reading done by your android application is another level of experience. Now, get ready to make a Text to speech application. Now Open Android Studio and create a project. After creating the project, you can open the  activity_main.xml file in res/layout  and type the following code. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#3498db" android:weightSum="1" android:orientation="vertical" > <EditText android:id="@+id/text_enter" android:layout_width="match_parent" android:layout_weight=".5" android:background="#fff" android:textColor="#2c3e50&quo
Recent posts

These codes helps you to boost android skills - ABNHive

Read Code Write Code! Reading helps you to feed the brain easily. Here is a list of codes which helps you to understand the working of great Android apps. You can read the codes and try to practise and develop more apps. Click the links to get the codes. You can try these apps directly from the Play Store to have a hands-on experience. Beginner Projects LeafPic Simple Calendar Easy Sound Recorder MLManager PhotoAffix Minimal ToDo InstaMaterial CoCoin Clip Stack Wally Intermediate  Projects Amaze File Manager MovieGuide AnExplorer AnotherMonitor OmniNotes Travel Mate KISS Turbo Editor Advanced  Projects Timber Super Clean Master Pedometer - Aswin Bhim Nath

Linear Layout in Android - ABNHive

Linear Layout arranges other views either horizontally in a single column or vertically in a single row. It arranges its elements sequentially Attributes android: orientation —Used for arranging the controls in the container in horizontal or vertical order android:layout_width —Used for defining the width of a control android:layout_height —Used for defining the height of a control android:padding —Used for increasing the whitespace between the boundaries of the control and its actual content android:layout_weight —Used for shrinking or expanding the size of the control to consume the extra space relative to the other controls in the container android:gravity —Used for aligning content within a control android:layout_gravity —Used for aligning the control within the container Example <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_widt

An Introduction to Layouts in Android - ABNHive

There is a number of Layouts provided by Android which you will use in almost all the Android applications to provide a different view, look and feel. Linear Layout - LinearLayout is a view group that aligns all children in a single direction, vertically or horizontally. Linear layout is used to place one element on each line. So, all the elements will be placed in an orderly top-to-bottom fashion. Relative Layout - RelativeLayout is a view group that displays child views in relative positions. Using relative layout, we can specify the position of the elements in relation to other elements, or in relation to the parent container. Table Layout - TableLayout is a view that groups view into rows and columns.  Absolute Layout - In AbsoluteLayout we can specify the exact coordinates of each control that we want to place. In absolute layout, we will give the exact X and Y coordinates of each control. Frame Layout - It is used when you want to show one item on each screen. Li

Shortcuts in Android Studio for Android Developers - ABNHive

I hope these shortcuts will definitely help you to increase the productivity level. Search for command: cmd + shift + a ( Windows / Linux : ctrl +  shift + a) You just type: close and you’ll get a proper shortcut/command. Choose from the last copy / pastes : cmd +  shift  + v ( Windows / Linux : Ctrl + Shift + v). By default, there are 5 last copy/paste items. Enable mulmulti cursorature: ctrl + g (alt + j for Windows / Linux ). Open a class: cmd + o ( Windows / Linux : ctrl + n). Open any file: cmd + shift + o ( Windows / Linux : ctrl + shift + n) Open symbol:  cmd + option + o ( Windows / Linux : alt + shift + n). Go to implementation: cmd + option + b ( Windows / Linux : ctrl + alt + b). Go to declaration: cmd + b ( Windows / Linux : ctrl + b).  Go to type declaration: control + shift + b ( Windows / Linux : ctrl + shift + b).  Go to super: cmd + u ( Windows / Linux : ctrl + u).  Move between tabs: cmd + shift + [ (move left) or cmd + shift + ] (move right) ( W

Thread vs Service in Android - ABNHive

The thread is part of your program functionality that can run in parallel with the main application execution process (or thread). It runs withing a process. The process may contain only, and that’s rare one thread and mostly contains multiple threads. Threads share the same resources and memory. Creating new thread need very less work that creating a new process. Use a Thread when The app is required to be visible when the operation occurs. background operation is relatively short running (less than a minute or two) the activity/screen/app is highly coupled with the background operation, the user usually 'waits' for this operation to finish before doing anything else in the app. Using a thread in these cases leads to cleaner, more readable & maintainable code. That being said its possible to use a Service( or IntentService). Use a Service when The app could be invisible when the operation occurs (Features like Foreground service could help with operations b

Content Providers in Android - ABNHive

Content providers - The name indicates all.  It provides contents or data to applications. In Android, Content Providers are used to sharing data between the applications.  The android.content Package The android.content package contains classes for accessing and publishing data. The Android framework enforces a robust and secure data sharing model. Applications are not allowed direct access to other application’s internal data. Two classes in the package help enforce this requirement: the ContentResolver and the ContentProvider. Functions in a Content Provider How to ensure smooth database functionality? Make a Content Provider:- This will be a full Content Management System with methods to add, update, delete new data. It will establish a unique address (URI) for the databases in your application. Use a Content Resolver:- Given the address (URI) it will resolve the particular address and ask the associated database living there. (Content Provider). All method