Tag Archives: CENTER

GridView Demo in Flutter

By | October 10, 2018

Hi Friends, Today we will see how to implement GridView in Flutter.     We are going to use this service for the data First we will create a Model for the Grid Cell [java] class HomeCellVO { int id; String title; String icon; HomeCellVO({this.id, this.title, this.icon}); factory HomeCellVO.fromJson(Map<String, dynamic> json) { return HomeCellVO( id: json[‘id’] as int,… Read More »

Doing HTTP Calls in Flutter and Parsing Data

By | October 7, 2018

Here is a simple example of doing Http calls in Flutter. In this example we will try to fetch some JSON value from the below url https://jsonplaceholder.typicode.com/posts/1 You can read more from here. Add Dependencies First you need to add the http plugin in dependencies. [java] dependencies: http: <latest_version> [/java] The latest version of http can be found… Read More »

Show Alert in cocos2D Android.

By | February 4, 2012

Here is a simple example showing alert in android cocos2D. For this I am using an example from my previous android cocos2D tutorial.. So please read that tutorial before reading this because the I am using the classes and files from it. I am only changing the Gamelayer.java file to show an Alert Dialog when the sprite move… Read More »

Central aligning the default message text in AlertDialog in android.

By | January 30, 2012

Hello all.. Today I will show you how to align the message text to center in an AlertDialog. By default it is left aligned, so we have to get a reference to it to align it to center.This is how we do it. [java] AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("My Title"); builder.setMessage("CoderzHeaven, Heaven of all working codes."); builder.setPositiveButton("OK",… Read More »