This article shows how you can do simple image scaling in Android. Here I have a simple class that Scales the image. The Utility class Layout The layout which shows the image for scaling. Set the above xml as layout for the Activity. Activity Please leave your comments at the end of the post.
The popup windows is a floating container that appears on top of the current activity. Layout for PopUp Below is the layout for the popup window. Layout for Activity Create another layout for the activity activity_main.xml Implementation The activity which implements the popup.
Hi all, Today I will show you how you can implement Client-Server architecture in an Android environment. What is a socket? An interface between application and network The application creates a socket The socket type dictates the style of communication reliable vs. best effort connection-oriented vs. connectionless Once configured the application can pass data to… Read More »
Using Shelvesets in TFS we can set aside pending changes in Visual Studio 2015. We can set aside a batch of pending changes from our current work space temporarily using the feature Shelvesets . We can later restore these changes into our work space or can into work space of another user. Read more from… Read More »
AngularJS provides filters to transform data: currency Format a number to a currency format. date Format a date to a specified format. filter Select a subset of items from an array. json Format an object to a JSON string. limitTo Limits an array/string, into a specified number of elements/characters. lowercase Format a string to lower… Read More »
Hello everyone, Here in this tutorial I will show you how you can create a Custom View for Timer without any layout in Swift. Custom Timer Class Our Custom timer class will look like this Here I am passing the superview in which timerview is going to be placed as the parameter. Then I am… Read More »
Automated testing processes are now a common thing in every project. Lets see some of them MonkeyRunner You can checkout more from here Advantages Low Level tool Does not have to do coding to automate tests Written in Python It can run test cases on rela devices connected to a PC/Emulators. APIs available for controlling… Read More »
It allows developers to filter images in their apps. Advantages Core Image supplies 90+ filters. Powerful image filtering capabilities Core Image includes APIs for face detection Automatic image enhancements Custom effects through “chained” filters. You can get all kinds of effects, such as modifying the vibrance, hue, or exposure. It uses either the CPU or… Read More »
The android.telephony.TelephonyManager class provides information about the telephony services such as subscriber id, sim serial number, phone network type etc.You can also determine the phone state etc. Permission Before Starting, make sure you add the permission in the Android Manifest. Android Source Code Below code gets the information from the Android Telephony Manager and displays… Read More »
Below code explains how you can place a view to the centre of the layout using Autolayout in iOS.
Your application peformance should be upto the mark. But it should perform differently not on the front end , but on the back end when it the device is connected to a power source or charging. Charging could be of from USB and from wire cable. When your device is charging itself , it is… Read More »
Well, its really easy for recording audio in an iOS application. We will decalre two variables in our View Controller Request Permisson from the User Start Recording Set Delegate Finish Recording Note : Sometimes iOS Stops the recording when a phone call comes. In that case we need to handle this. Since the delegate is… Read More »
Android provides two main API’s for playing sounds. SoundPool MediaPlayer SoundPool SoundPool can be used for small audio clips. It can repeat sounds and play several sounds simultaneously. The sound files played with SoundPool should not exceed 1 MB. SoundPool does load the file asynchronously. As of Android API8 it is possible to check if… Read More »
Using data binding, you can also handle events right from the layout xml using either Method references, or Listener bindings. For this we can create a seperate Class named “MyHandler”. Event Handler Class MyHandler.java Like my previous examples you have to initialize the listener in the Activity. Layout Now the layout that has a button… Read More »
As I shown in the previous post where we used BaseObservable and ObservableField to update UI when binding object is changed, this post will show you another simple way to achieve this. Do Check my previous posts for better understanding of DataBinding and methods used in DataBinding. http://www.coderzheaven.com/2017/01/15/simple-databinding-in-android-example/ http://www.coderzheaven.com/2017/01/20/data-binding-in-android-using-observables/ http://www.coderzheaven.com/2017/01/25/data-binding-in-android-using-observablefield-to-update-ui-automatically/ Here is another way to… Read More »
As I shown in the previous post where we used BaseObservable to update UI when binding object is changed, this post will show you another simple way to achieve this. Do Check my previous posts for better understanding of DataBinding and methods used in DataBinding. http://www.coderzheaven.com/2017/01/15/simple-databinding-in-android-example/ http://www.coderzheaven.com/2017/01/20/data-binding-in-android-using-observables/ Here is another way to do it. In… Read More »
In the last example, you may have got an idea of what DataBinding is. If not please check my tutorial here… Simple DataBinding in Android Example. Updating Objects using Observables. In the last tutorial you may have noticed, if you update the object which is data binded, the change is not reflected in the UI… Read More »
GSON is open source Java library developed by Google. It is an API for converting a Java object to json representation and viceversa. Uses Converts any Java object i.e new object or any existing/legacy object, to JSON and vice-versa. Finest support for generic objects Simple, convenient methods for conversions No need of any annotation for… Read More »
Navigation Drawer helps developers for creating easy menus in an application. Lets start to see how it works. We will start by creating a new project with a navigation drawer activity. Adding Navigation Drawer Activity If you want to add Navigation Drawer Activity to your existing project you can simply add it by going to… Read More »
This is a latest technique in Android where the UI is updated when the data bind to it changes, which is called databinding. DataBinding DataBinding has its own expression language for layout files. It corresponds to Java expressions and has quite impressive capabilities. Below you can see the list of all available operators: mathematical operators;… Read More »
Material design has changed the way user interact with apps. Below is one such UI design which we all will love. We will create a collapsable AppBar which scrolls from center of the screen to the AppBar. Check out the video below to see how it looks. All the magic happens in the XML layout.… Read More »
I think everyone has checked my previous post on how to improve Android WebView performance. If not, check it here Improve Android WebView Perfomance Now we will see how we can load a webpage textfields with our custom values in Android WebView. For this I am using a sample HTML file which is stored in… Read More »