Using java Syntax Highlighting
- @Override
- protected boolean onTap(int index) {
- final int tmpIndex= index;
- new Thread(new Runnable() {
- public void run() {
- final LinearLayout table = (LinearLayout)inflater.inflate(R.layout.infooverlay, null);
- table.setWillNotDraw(false);
- final ImageView image= (ImageView)table.findViewById(R.id.HomeImage);
- image.setImageBitmap(new CustomHTTPBitmap("http://www.onlineilan.com/media/adimg/norm/t0/norm_125_0ADGHSUVZ.jpg").GetBitmap());
- final TextView text = (TextView)table.findViewById(R.id.Details);
- text.setText("Moda Caddesi Ağabey Sokak No:13-15 D:1 Moda/Kadıköy 100.000TL");
- final Button b = (Button)table.findViewById(R.id.btndetails);
- b.setText("Detaylar");
- b.setWillNotDraw(false);
- GeoPoint gp=createItem(tmpIndex).getPoint();
- Point p= new Point();
- Projection projection= mapview.getProjection();
- p=projection.toPixels(gp, p);
- p.y-=40;
- GeoPoint g= projection.fromPixels(p.x, p.y);
- final MapView.LayoutParams lp2 = new MapView.LayoutParams(MapView.LayoutParams.WRAP_CONTENT,MapView.LayoutParams.WRAP_CONTENT, g,MapView.LayoutParams.BOTTOM_CENTER);
- //It throws error after this line
- mapview.addView(table,lp2);//Problem starts here
- mapview.postInvalidate();
- mapview.MapController.animateTo(gp);
- }
- }).start();
- return super.onTap(index);
- }
Parsed in 0.036 seconds, using GeSHi 1.0.8.4
So where is the problem?


