View can accept this or needed ImageView

  • Replies:1
Leonidas Savvides
  • Forum posts: 45

Jul 13, 2012, 6:36:20 PM via Website

http://android-er.blogspot.com/2011/02/display-gallery-selected-image-using.html
..................
android:id="@+id/targetimage"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>


ImageView targetImage;
targetImage = (ImageView)findViewById(R.id.targetimage);
targetImage.setImageBitmap(bitmap);

In my App drawing I want insert a background image what to use? I will choose from Gallery either or not in sd card...?
// go and implement this (web page above) code...?
In my code I have View(rather ImageView) that appear a bitmap how convert to this??? View can accept this?

my code


DoodleView.java
public class DoodleView extends View
{
............

Doodlz.java
public class Doodlz extends Activity
{
............

main.xml
<com.deitel.doodlz.DoodleView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/doodleView"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>

Reply
Leonidas Savvides
  • Forum posts: 45

Jul 18, 2012, 10:55:06 PM via Website

http://android-er.blogspot.com/2011/02/display-gallery-selected-image-using.html
<<< ran this success but it uses ImageView... what if have View like in
http://media.pearsoncmg.com/ph/esm/deitel/Android_HTP1e/code_examples.html (Doodlz App) // actually trying load image to Doodlz using 1st url app!
???

I will retry ... any hint?

— modified on Jul 18, 2012, 10:56:30 PM

Reply