Cropping an image

by MartyParty » Tue, 25 Jan 2011 02:53:13 GMT


Sponsored Links
 Hi,

My application currently takes a picture, stores it on the SD card,
and then displays the picture to the screen.  Now I want to be able to
crop it (this is for making someone's profile picture).

I've been reading a lot on here about the Intent
"com.android.camera.action.CROP"  yet I don't see any official
documentation on this, so I don't know how to get started other than
by looking at the code posted here.

Does Android officially support this?  Did they at one time, and no
longer?  I don't get it.

Is the work flow of my application compatible with this Intent?

Marty

-- 



Other Threads

1. SQLite db limitations for Android app

Our Android application will read data from our own SQLite db which is
around 3GB in size.

What is the maximum storage limit for db that is specific to a single
app? (The specs say that the device's internal memory supports 256MB,
so does it include storing the app's db? If yes, then, is there an
optimal way to store DBs of apps that are huge in size? )

Thanks in advance!!

-- 

2. why do I get null pointer with findWiewById ?

Hi all,

I'm working on an application where I want to add adWhirl to manage
adds.
The app is working fine until I tryed to use adWhirl. I have try to
get the view created with setContentView(R.layout.main) by calling
LinearLayout layout = (LinearLayout)findViewById(R.layout.main);

and the pointer layout is null !

Here is my code :

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

                //for AdWhirl Ads
                LinearLayout layout = (LinearLayout)findViewById(R.layout.main);

                AdWhirlLayout adWhirlLayout = new AdWhirlLayout(this,
"93b8db24920a42b297769f38d89304ba");
                RelativeLayout.LayoutParams adWhirlLayoutParams = new
RelativeLayout.LayoutParams(320, 52);
                layout.addView(adWhirlLayout, adWhirlLayoutParams);
                layout.invalidate();
...
}

and the main.xml :

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">

<RelativeLayout
        android:id="@+id/titre"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="#dcdcdc">
    <ImageButton
                        android:id="@+id/info"
                        android:background="@null"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentLeft="true"
                        android:padding="5sp"
                        android:src="@drawable/info"/>

    <TextView
                android:paddingTop="5sp"
                android:paddingBottom="5sp"
                android:gravity="center"
                android:textSize="20sp"
        android:background="#dcdcdc"
        android:textColor="#000000"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_toRightOf="@id/info"
        android:text="@string/app_name"
        />
</RelativeLayout>

<TableLayout
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:stretchColumns="0,1,2">

    <TableRow>
            <LinearLayout
                android:orientation="vertical"
                    android:layout_marginTop="30px"
                    android:layout_marginBottom="15px"
                    android:layout_width="100px"
                    android:layout_height="wrap_content"
                    android:gravity="left">

                    <Spinner
                        android:id="@+id/spinner1"
                        android:layout_width="fill_parent"
                        android:layout_height="wrap_content"
                        android:prompt="@string/devise_prompt"
                    />
            </LinearLayout>

            <LinearLayout
                android:orientation="vertical"
                android:layout_marginTop="30px"
                    android:layout_marginBottom="15px"
                    android:layout_width="100px"
                    android:layout_height="wrap_content"
                    android:gravity="right">

                    <Spinner
                        android:id="@+id/spinner2"
                        android:layout_width="fill_parent"
                        android:layout_height="wrap_content"
                        android:prompt="@string/devise_prompt"
                    />
                </LinearLayout>
        </TableRow>
</TableLayout>

<TableLayout
        android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:stretchColumns="0,1,2">
        <TableRow>
                <TextView
                android:id="@+id/amount1"
                android:gravity="left"
                android:paddingLeft="30px"
                android:paddingBottom="15px"
                android:text="@string/devise_amount"
                android:textStyle="bold"
                />
                <TextView
                android:id="@+id/amount"
                android:textStyle="bold"
                />
                <TextView
                android:id="@+id/amount2"
                android:gravity="right"
                android:paddingRight="30px"
                android:paddingBottom="15px"
                android:text="@string/devise_amount"
                android:textStyle="bold"
                />
        </TableRow>

    <TableRow>
        <EditText
                android:id="@+id/edit_amount1"
                android:layout_width="100px"
                android:layout_height="wrap_content"
                android:layout_marginBottom="10px"
                android:gravity="left"
                android:inputType="numberDecimal"/>

                <ImageButton
                        android:id="@+id/egal"
                        android:background="@null"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_centerHorizontal="true"
                        android:layout_marginBottom="10px"
                        android:src="@drawable/equal"/>

            <EditText
                android:id="@+id/edit_amount2"
                android:layout_width="100px"
                android:layout_height="wrap_content"
                android:layout_marginBottom="10px"
                android:gravity="right"
                android:inputType="numberDecimal" />
    </TableRow>

</TableLayout>

<ImageButton
                        android:id="@+id/mataf"
                        android:background="@null"
                        android:layout_width="fill_parent"
                        android:layout_height="wrap_content"
                        android:layout_centerHorizontal="true"
                        android:layout_marginTop="20px"
                        android:src="@drawable/mataf"/>
<TextView
        android:id="@+id/lien"
        android:paddingTop="20sp"
                android:textSize="15sp"
                android:gravity="center"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/siteweb"/>


</LinearLayout>

Does someone have any idea ???
Thank you for any help

-- 

3. How to override methods for existing framework classes

4. connectionless WAP Push (SMS Push)

5. How global is the app market?

6. Associate Browser to File Type

7. Determine notification bar height from a service