How to get the rotation of image then assign to listview in Android
<p>I'm trying to load all the records in my database then assign them to my listview. But there are some photos will not be loaded in the right rotation. All I want to do is check the rotation of the photos before assigning them to the list view. But I don't know how to do it. Please help me out. Thank you very much. 
My code below: </p>

<pre><code>public void onCreate(Bundle b) {
    super.onCreate(b);

    db = new DBAdapter(this); 
    db.open(); 

    c = db.getAllRecords(); 

    if (c.moveToFirst()){

        startManagingCursor(c);

        SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
        R.layout.list_item_layout, 
        c, new String[] { "ItemName","Address", "Price","Date","PhotoPath"},
        new int[] { R.id.itemName, R.id.itemAddress, R.id.itemPrice, R.id.date, R.id.icon});
        setListAdapter(adapter);

    }
}
</code></pre>
