public MapView(Context ctx, boolean allowNetAccess, int mode) {
    super(ctx);

    Display display;

    this.allowNetAccess = allowNetAccess;

    geoUtils = new GeoUtils(mode);

    setBackgroundColor(0xFF555570);
    display = ((WindowManager) ctx.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
    scrWidth = display.getWidth();
    scrHeight = display.getHeight();
    setMinimumHeight(scrWidth);
    setMinimumWidth(scrHeight);
    tileWidth = (int) Math.ceil(scrWidth / 256.0) + 1;
    tileHeight = (int) Math.ceil(scrHeight / 256.0) + 1;
    gestureDetector = new GestureDetector(ctx, new GestureListener());

    zoomOutButton = new Button(ctx);
    zoomOutButton.setText("  -  ");
    zoomOutButton.setOnClickListener(this);

    zoomInButton = new Button(ctx);
    zoomInButton.setText("  +  ");
    zoomInButton.setOnClickListener(this);

    updateUI(true);
    addView(zoomOutButton);
    addView(zoomInButton);
  }
示例#2
0
  private View getWorkingView(final View convertView) {
    View workingView = null;

    if (null == convertView) {
      final Context context = getContext();
      final LayoutInflater inflater =
          (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);

      workingView = inflater.inflate(itemsItemLayoutResource, null);
    } else {
      workingView = convertView;
    }

    return workingView;
  }
 public ReservationAdapter(Context context, Cursor cursor)
 {
     Log.d("smali", "Lcom/samsung/sec/mtv/ui/channelguide/MtvUiFragReservationList$ReservationAdapter;-><init>(Lcom/samsung/sec/mtv/ui/channelguide/MtvUiFragReservationList;Landroid/content/Context;Landroid/database/Cursor;)V");
     this$0 = MtvUiFragReservationList.this;
     super(context, cursor);
     int ai[] = new int[2];
     ai[0] = 2;
     ai[1] = 2;
     mIcon = (Drawable[][])Array.newInstance(android/graphics/drawable/Drawable, ai);
     mInflater = (LayoutInflater)context.getSystemService("layout_inflater");
     mIcon[1][0] = context.getResources().getDrawable(0x7f0200c0);
     mIcon[0][0] = context.getResources().getDrawable(0x7f0200bd);
     mIcon[1][1] = context.getResources().getDrawable(0x7f0200c1);
     mIcon[0][1] = context.getResources().getDrawable(0x7f0200be);
 }
 @Override
 public View getView(int position, View convertView, ViewGroup parent) {
   View v = convertView;
   if (v == null) {
     LayoutInflater vi =
         (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
     v = vi.inflate(R.layout.row, null);
   }
   Message m = items.get(position);
   // if (m != null) {
   m.createColorFromString(m.from);
   TextView tt = (TextView) v.findViewById(R.id.username);
   TextView bt = (TextView) v.findViewById(R.id.message);
   if (isMonospaced) {
     tt.setTypeface(Typeface.MONOSPACE);
     bt.setTypeface(Typeface.MONOSPACE);
   }
   tt.setText(m.getFrom());
   tt.setTextColor(m.color);
   bt.setText(m.getMessage());
   // }
   return v;
 }