• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Creating android

Hi,

I am a beginner for android development. i have a some doubts about to create android program.....for example how to store some fields by using SQL.
So i need what they are steps to create this one.....Please give me some steps...
 
Hi Sir,

I have a more doubt about the android development and i am also struggle with the creating android. So if you have a any books to easily understanding android development please send me the following mail id

mani.vann07@gmail.com

thanks and regards,
Manivannan C
 
Dear sir,

i have struggle with the creating grid view in android. I have created a example program of the more than one image button by using grid view method. How to create a new intent when i clicked the image buttons.
I am also attaching example program of grid view in this post. Please find it out and tell me...

MainActivity.java


package pete.android.study;

import java.util.ArrayList;
import java.util.List;

import pate.android.study.R;
import pete.android.study.AppInfoAdapter.ViewHolder;


import android.app.Activity;
import android.content.res.Resources;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.GridView;
import android.widget.Toast;

public class MainActivity extends Activity {

private GridView mGridMain;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

mGridMain = (GridView)findViewById(R.id.gvMain);
Resources res = getResources();
List<AppInfo> listAppInfo = new ArrayList<AppInfo>();
listAppInfo.add(new AppInfo(BitmapFactory.decodeResource(res, R.drawable.app_browser), "Internet"));
listAppInfo.add(new AppInfo(BitmapFactory.decodeResource(res, R.drawable.app_clock), "Clock"));
listAppInfo.add(new AppInfo(BitmapFactory.decodeResource(res, R.drawable.app_display), "Display"));
listAppInfo.add(new AppInfo(BitmapFactory.decodeResource(res, R.drawable.app_favorite), "Favorite"));
listAppInfo.add(new AppInfo(BitmapFactory.decodeResource(res, R.drawable.app_home), "Home"));
listAppInfo.add(new AppInfo(BitmapFactory.decodeResource(res, R.drawable.app_mail), "Mail"));
listAppInfo.add(new AppInfo(BitmapFactory.decodeResource(res, R.drawable.app_media), "Media"));
mGridMain.setAdapter(new AppInfoAdapter(this, listAppInfo));

mGridMain.setOnItemClickListener(mItemClickListener); // add a ItemClickListener

}
// our handle for listener
private OnItemClickListener mItemClickListener = new OnItemClickListener() {

@Override
public void onItemClick(AdapterView<?> parent, View view, int pos, long id) {
ViewHolder holder = (ViewHolder)view.getTag();
if(holder == null) {
return;
}
Toast.makeText(MainActivity.this, "You have clicked on item '" + holder.tvName.getText() + "'", Toast.LENGTH_SHORT).show();
}
};

}
 
Back
Top Bottom