Wednesday, April 8, 2015

Android - Get Image from Canvas

Overview:  We can create an image that canvas draw in view.

1. Draw Something: First, we going to draw some shapes such as a circle by using canvas.



Now Launching Application.


2.Creating imageNow we going to create an image from draw view. Let see the following snippet




Above Snippet, we have created a bitmap with required image width and height. After that draw bitmap by using canvas. At the end, we draw a circle on canvas and return createBitmap object.





















Share:

Android - Infinite GridView

Introduction: The sort definition of infinite GridView is that we will draw bitmap and user can move (Scroll) in any direction in our custom surface view. 

We can view such kind of application on google play store:https://play.google.com/store/apps/details?id=com.HBO&hl=en

Infinite GridView 


Here I am going to share the overall logic of this view. We have achieved it by using canvas ( 2D ) in android. We drawing each bitmap with a label in Android Surface View.The view contains a bunch of bitmaps that circulate when view move in any direction. 


You can get the code from GitHub.
Share:

We're Social

Link

Categories

Ad here

  • Cover art Blend

    Blend app is very advanced app there are lots of features like shayari, status, chat, feed....