Android: How to: display image from sdcard?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/6725718/android-display-image-from-sd-card">Android: Display Image from SD CARD</a>  </p>
</blockquote>



<p>Here's my current code:</p>

<pre><code>import android.app.Activity;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.widget.ImageView;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.RadioGroup.LayoutParams;

public class DisplayImageMapActivity extends Activity {
    ImageView iv;
    private final String FLOOR = "F";
    private final String storagePath = Environment.getExternalStorageDirectory() + "/AppH23";
    private final String localMapsPath = storagePath + "/localMaps";

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

        iv=(ImageView)findViewById(R.id.storageimage);

        RadioGroup levelRGroup = (RadioGroup) findViewById(R.id.level_rgroup);

        int levelSize = 8;
        for (int i = 0; i &lt; levelSize; i++) {
            RadioButton levelRButton = new RadioButton(this);
            if(i==0) {
                levelRButton.setText(new StringBuffer(i+1).append(FLOOR).append("(start)"));
            } else if (i==7) {
                levelRButton.setText(new StringBuffer(i+1).append(FLOOR).append("(end)"));
            }
            levelRButton.setTag((i+1) + FLOOR);
            levelRButton.setLayoutParams(
                    new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, 1));

            levelRGroup.addView(levelRButton);
        }

        levelRGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
            public void onCheckedChanged(RadioGroup group, final int checkedId) {
                iv.setImageURI(Uri.parse(new StringBuffer(localMapsPath)
                .append("/").append(group.findViewById(checkedId).getTag()).append(".gif").toString()));
                iv.invalidate();
            }
        });

        levelRGroup.getChildAt(0).performClick();

    }
} 
</code></pre>

<p>Here's my environment:
a) 2.1-update1</p>

<p>It kinda strange, my image from /sdcard/AppH23/localMaps/???.gif doesn't show.
all gif files are confirmed that are existing.</p>

<p><strong>UPDATE:</strong>
here's my previous post and you may confirm that the gif image was displayed a while ago. <a href="http://stackoverflow.com/questions/7306069/android-how-to-display-an-image-file-buildings-floor-map-and-update-the-file">gif image displayed</a></p>
