by android-newbie » Thu, 03 Dec 2009 07:21:43 GMT

Sponsored Links

I have been looking at LayerBase::drawWithOpenGL() and trying to
figure out if the scaling being done in this function is performing a
"stretch" or "crop", but not able to figure that out yet.

Can someone please let me know if LayerBase::drawWithOpenGL() is doing
"stretching" or "cropping" for scaling operation?

Thank you so much for your help,



by Dianne Hackborn » Thu, 03 Dec 2009 08:30:53 GMT

 Hi, questions about the non-public implementation of Android should be on
android-porting; thanks.


Sponsored Links

Other Threads

1. Simple question... how do I open the browser?

You need to use an intent

startActivity(new Intent(Intent.ACTION_VIEW, newUri ));


2. retrive checked CheckBoxes鈥檚 items in Listview


Ive got ListActivity and i am using custom CursorAdapter.

in my list view i have items. in each item i got also a checkbox.

the listview is binded to database via CursorAdapter.

I want on a button press, to retrieve all items which thire checkboxes
status is CHECKED.

how can i retrive all the checked ones?

ive done focusable:false, so i can use OnClickListener, but i dont
know how farther then this..

but in other hand:
protected void onListItemClick(android.widget.ListView l, View v,
                int position, long id)

donesnt realy resdpond:

some code:

this is in my ListActivity class:

    final String columns[] = new String[] { MyUsers.User._ID,
            MyUsers.User.MSG, MyUsers.User.LOCATION };

    int[] to = new int[] {,,,};

    Uri myUri = Uri

    Cursor cursor = getContentResolver().query(myUri, columns, null,
null, null);


    ListCursorAdapter myCursorAdapter=new ListCursorAdapter(this,
            R.layout.listitem, cursor, columns, to);

and this is my Custom Cursor adapter class:

public class ListCursorAdapter extends SimpleCursorAdapter


     private Context context;
private int layout;

public ListCursorAdapter(Context context, int layout, Cursor c,
        String[] from, int[] to)
    super(context, layout, c, from, to);

    this.context = context;

    this.layout = layout;


public View newView(Context context, Cursor cursor, ViewGroup parent)

    Cursor c = getCursor();

    final LayoutInflater inflater = LayoutInflater.from(context);
    View v = inflater.inflate(layout, parent, false);
               return v;

public void bindView(View v, Context context, Cursor c)
    TextView topText = (TextView) v.findViewById(;
    if (topText != null)

    int nameCol = c.getColumnIndex(MyUsers.User.MSG);
    String name = c.getString(nameCol);
    TextView buttomTxt = (TextView) v.findViewById(;
    if (buttomTxt != null)
        buttomTxt.setText("Message: "+name);

    nameCol = c.getColumnIndex(MyUsers.User.LOCATION);
    name = c.getString(nameCol);
    TextView location = (TextView) v.findViewById(;
    if (locationLinkTxt != null)




3. Application flow/interaction graphing

4. Dalvik Turbo

5. Hey Mr or Ms Moderator...

6. Share intent

7. Acne Treatement