Posts

Showing posts from 2013

Create a Poker Game in Android

Firstly i told you a very true its my first running project. When i create that project in beginning i have no basic idea in android. But devloper.android.com its very helpful for me to understand this topic and that subject. In that project you have lots import these thing like bundle, handler, Message, Activity, Resources, Draw able, Log, Menu, View,and etc. In that project you know how to handle of C because if you don't have knowledge of  C then firstly you learn the C, XML, Java. Then we come to my project and get the random number. And i told you in this project i take 56 cards in that project because it have 52 cads of different suits and four joker because in the champion poker game make a pair joker, four pair of joker and if joker came then payment is double. First you create a project Poker Game in Eclipse Go to file section and click on  New Android Project And fill the section. And t...

Implement A Image Listener In Android

In the ANDROID development you use this code. It's helpful for you. If you use any image like button then by java coding you use that implement. It is call a image listener. Firstly you have a project in android application who called package com.example.imagebutton (example) then you export these things like Bundle, Activity, Menu, Motion event (Because on touch you call the listener) , View (for image) , On touch listener and etc. Then u use that Java code and enjoy you first app using image listener. package com.example.imagebutton; import android.os.Bundle; import android.app.Activity; import android.view.Menu; import android.view.MotionEvent; import android.view.View; import android.view.View.OnTouchListener; import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; public class Imagebutton extends Activity { ImageView ivCard; TextView editText; boolean isPressed=false; @Override protected void onC...

How to Call a Image as a Button in Android

In this project how i call a image as a button . Then i use the  button and in this button i call the touch listener who call the image on the screen then you already use that code it is tested. You believe that. package com.example.imagebutton; import android.view.View; import android.view.View.OnTouchListener; import android.widget.ImageButton; import android.widget.ImageView; public class Imagebutton extends Activity { ImageView ivCard; boolean isPressed=false; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_imagebutton); addListenerOnImage(); } public void addListenerOnImage()  { // TODO Auto-generated method stub ivCard=(ImageView)findViewById(R.id.imageView1); ivCard.setOnTouchListener(new OnTouchListener()             { @Override public boolean onTouch(View v, MotionEvent event...

How to Draw a Image on Android

Hello friends Its very use full code for you when you are starting learner in android tutorial. Because you  never start without How to draw a image on android. First you create a project Camera testing in Eclipse Go to file section and click on  New Android Project And fill the section. Then work on activity.xml. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="fill_parent"     android:layout_height="fill_parent"     android:orientation="vertical" >    <ImageView         android:id="@+id/imageView1"         android:layout_width="wrap_content"         android:layout_height="wrap_content"          /> <ImageView         android:id="@+id/imageView2"         android:layout_width="wr...