import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Vector;
import org.ksoap2.serialization.SoapObject;
import android.app.Activity;
import android.app.ActivityGroup;
import android.app.LocalActivityManager;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.ViewGroup.LayoutParams;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.ScrollView;
import android.widget.TextView;
public class DashBoard extends ActivityGroup//Activity
{
Intent intent;
Vector dashBoardImage;
//DashBoardSaveData dashboard;
SoapObject storeresponse[];
Bitmap bit[];
int
iconHori[]={R.drawable.icontrain,R.drawable.iconrestorent,R.drawable.iconcamera,R.drawable.iconmovie,R.drawable.icontrain,R.drawable.iconaeroplan
,R.drawable.icontrain,R.drawable.iconrestorent,R.drawable.iconcamera,R.drawable.iconmovie,R.drawable.icontrain,R.drawable.iconaeroplan};
@Override
protected void onCreate(Bundle savedInstanceState)
{
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
DashBoardSaveData d=new DashBoardSaveData();
DashBoardSaveData.setDashBoard(DashBoard.this);
dashBoardImage=d.image;
LocalActivityManager mag=getLocalActivityManager();
RelativeLayout rl=new RelativeLayout(this);
ImageView header1=new ImageView(this);
header1.setImageResource(R.drawable.header1);
RelativeLayout.LayoutParams lay1 = new
RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.FILL_PARENT,
RelativeLayout.LayoutParams.WRAP_CONTENT);
lay1.addRule(RelativeLayout.ALIGN_PARENT_TOP);
ImageView header2=new ImageView(this);
header2.setImageResource(R.drawable.header2);
RelativeLayout.LayoutParams lay2 = new
RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT,
RelativeLayout.LayoutParams.WRAP_CONTENT);
lay2.topMargin=24;
lay2.leftMargin=30;
LinearLayout ll1=new LinearLayout(this);
ll1.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,
LayoutParams.WRAP_CONTENT));
ll1.addView(mag.startActivity("topActivity", new
Intent(this,TopTab.class)).getDecorView());
RelativeLayout.LayoutParams lay = new
RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.FILL_PARENT,
RelativeLayout.LayoutParams.WRAP_CONTENT);
lay.topMargin=120;
lay.leftMargin=20;
lay.rightMargin=20;
//horizontal alignment
// ImageView leftarrow=new ImageView(this);
// leftarrow.setImageResource(R.drawable.leftarrow);
// RelativeLayout.LayoutParams layleftarrow = new
RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT,
RelativeLayout.LayoutParams.WRAP_CONTENT);
// layleftarrow.topMargin=162;
// //layleftarrow.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
// ImageView rightarrow=new ImageView(this);
// rightarrow.setImageResource(R.drawable.rightarrow);
// RelativeLayout.LayoutParams layrightarrow = new
RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT,
RelativeLayout.LayoutParams.WRAP_CONTENT);
// layrightarrow.topMargin=162;
// layrightarrow.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
// ScrollView sc=new ScrollView(this);
// LinearLayout lHorizontal=new LinearLayout(this);
// lHorizontal.setOrientation(LinearLayout.HORIZONTAL);
// for(int i=0;i<iconHori.length-1;i++)
// {
// ImageView horizin_i=new ImageView(this);
//
// horizin_i.setImageResource(iconHori[i]);
// horizin_i.setPadding(10, 0, 10,0);
// horizin_i.setLayoutParams(new LayoutParams(60, 60));
// lHorizontal.addView(horizin_i);
//
// }
Animatated anim=new Animatated(this);
RelativeLayout.LayoutParams horizontalLay = new
RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT,
RelativeLayout.LayoutParams.WRAP_CONTENT);
//horizontalLay.topMargin=162;
//horizontalLay.leftMargin=40;
//sc.addView(lHorizontal);
//end
ImageView searchback=new ImageView(this);
searchback.setImageResource(R.drawable.searchback);
RelativeLayout.LayoutParams lay3 = new
RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.FILL_PARENT,
RelativeLayout.LayoutParams.WRAP_CONTENT);
lay3.topMargin=243;
// ImageView searc=new ImageView(this);
// searc.setImageResource(R.drawable.search);
// RelativeLayout.LayoutParams lay4 = new
RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.FILL_PARENT,
RelativeLayout.LayoutParams.WRAP_CONTENT);
// lay4.topMargin=171;
//
EditText searchfield=new EditText(this);
searchfield.setHint("search");
//searc.setImageResource(R.drawable.search);
RelativeLayout.LayoutParams lay5 = new
RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.FILL_PARENT,
RelativeLayout.LayoutParams.WRAP_CONTENT);
lay5.topMargin=250;
LinearLayout ll2=new LinearLayout(this);
ll2.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,
LayoutParams.MATCH_PARENT));
ll2.addView(mag.startActivity("BottomActivity", new
Intent(this,Bottom_tab.class)).getDecorView());
RelativeLayout.LayoutParams p = new
RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT,
RelativeLayout.LayoutParams.WRAP_CONTENT);
//p.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
p.topMargin=640;
rl.addView(header1,lay1);
rl.addView(header2,lay2);
// rl.addView(searchback,lay3);
// //horizontal
// rl.addView(anim,horizontalLay);
// //end
//
// rl.addView(searchfield,lay5);
rl.addView(ll1, lay);
rl.addView(ll2, p);
setContentView(rl);
//parseData(dashBoardData);
//showImage();
}
@Override
public void onBackPressed()
{
finish();
System.exit(0);
System.out.println("finish ke andar aaya");
}
@Override
protected void onDestroy() {
// TODO Auto-generated method stub
super.onDestroy();
System.out.println("dashboard destroyed called");
}
}
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en