Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>HorizontalScrollView scrollView = (HorizontalScrollView) findViewById(R.id.scrollView1); LinearLayout topLinearLayout = new LinearLayout(this); // topLinearLayout.setLayoutParams(android.widget.LinearLayout.LayoutParams.FILL_PARENT,android.widget.LinearLayout.LayoutParams.FILL_PARENT); topLinearLayout.setOrientation(LinearLayout.HORIZONTAL); for (int i = 0; i &lt; 15; i++){ final ImageView imageView = new ImageView (this); imageView.setTag(i); imageView.setImageResource(R.drawable.ic_launcher); topLinearLayout.addView(imageView); imageView.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub Log.e("Tag",""+imageView.getTag()); } }); } scrollView.addView(topLinearLayout); // ImageView img=(ImageView)findViewById(R.id.imageView1); // final ImageLoader imageLoader = ImageLoader.getInstance(); // // // // ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(getApplicationContext()) // .threadPoolSize(3) // .threadPriority(Thread.NORM_PRIORITY - 2) // .memoryCacheSize(1500000) // 1.5 Mb // .discCacheSize(50000000) // 50 Mb // .httpReadTimeout(10000) // 10 s // .denyCacheImageMultipleSizesInMemory() // .enableLogging() // Not necessary in common // .build(); // // Initialize ImageLoader with configuration. // ImageLoader.getInstance().init(config); // // final DisplayImageOptions options = new DisplayImageOptions.Builder() // .showStubImage(R.drawable.ic_launcher) // .cacheInMemory() // .cacheOnDisc() // .build(); // // imageLoader.displayImage("http://3.bp.blogspot.com/_Sd45ASngYHA/TVC78RORKoI/AAAAAAAAARk/y0GcNkTmb40/s1600/android+logo1.jpg",img,options); // // img.setOnClickListener(new OnClickListener() // { // // @Overridt // public void onClick(View v) // { // // TODO Auto-generated method stub // Dialog d =new Dialog(TestActivity.this); // d.setContentView(R.layout.dialog); // // d.setCancelable(true); // // ImageView d_img=(ImageView)d.findViewById(R.id.dialog_img); //// d.setLayoutParams(L) // imageLoader.displayImage("http://3.bp.blogspot.com/_Sd45ASngYHA/TVC78RORKoI/AAAAAAAAARk/y0GcNkTmb40/s1600/android+logo1.jpg",d_img,options); // // d.show(); // } // }); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload