Note that there are some explanatory texts on larger screens.

plurals
  1. POListView inside Gallery is possible ? But unable to swipe my listview?
    primarykey
    data
    text
    <p>I am take Gallery,while attach images i am take listview in xml.</p> <p>ListView and images are displayed. But unable to swipe listview.</p> <p>Thanks in Advance.</p> <pre><code> public class MainActivity extends Activity { Gallery gallery = null; Activity appContext = this; int[] images = { R.drawable.banana, R.drawable.apple, R.drawable.pineapple, R.drawable.lemon, R.drawable.mango }; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); gallery = (Gallery) findViewById(R.id.gallery); GalleryAdapter ga = new GalleryAdapter(); gallery.setAdapter(ga); } class GalleryAdapter extends BaseAdapter { @Override public int getCount() { return 2; } @Override public Object getItem(int arg0) { return null; } @Override public long getItemId(int arg0) { return 0; } @Override public View getView(int pos, View v, ViewGroup parent) { v = LayoutInflater.from(appContext).inflate(R.layout.test1, null); ImageView iv = (ImageView) v.findViewById(R.id.imageView1); ListView lv = (ListView) v.findViewById(R.id.listView); </code></pre> <p>Here i am attch a Adapter to set images for ListView</p> <pre><code>ListAdapter la = new ListAdapter(appContext, images); lv.setAdapter(la); return v; } } } </code></pre> <p>My other getView method for ListAdapter is</p> <pre><code>@Override public View getView(int pos, View v, ViewGroup parent) { v = LayoutInflater.from(appContext).inflate(R.layout.list_style, null); ImageView iv = (ImageView) v.findViewById(R.id.iv_listStyle); iv.setImageResource(images[pos]); return v; } </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
 

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