opengl + android

by Gargo » Thu, 30 Jul 2009 01:25:53 GMT


Sponsored Links
 Can anybody post here where to get examples of using opengl?

--~--~---------~--~----~------------~-------~--~----~



opengl + android

by Dmaxi » Wed, 05 Aug 2009 01:53:46 GMT


 Hi!

You can study some tutorials here:  http://www.anddev.org 

Robert



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. How to use ListView in Tab?

Good day.
In my app I have three tab (one Activity extend TabActivity and others
activitys provides access to content). In first tab I have ImageView,
a few TextView and it is works. But when I add ListView and in
activity that contain ListView I add a few rows it was not show in may
tab.

Can someone tell me where I was wrong? Here my code:

In StartActivity:


        intent = new Intent().setClass(this,
GoodsAndShopsActivity.class);

        spec = tabHost.newTabSpec("shops").setIndicator("Shops",
                          res.getDrawable(R.drawable.ic_tab_shops))
                      .setContent(intent);
        tabHost.addTab(spec);

In GoodsAndShopsActivity:

    protected void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                setContentView(R.layout.descriptions);

        m_shopsLayout = (ListView) findViewById(R.id.shops);

        m_shopList = new ArrayList<Shop>();
        m_shopAdapter = new ShopAdapter(m_shopList, this);
        m_shopsLayout.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
        m_shopsLayout.setAdapter(m_shopAdapter);

        for (int i = 0; i<3; i++) {
                        m_shopList.add(new Shop("new description"));
                        m_shopAdapter.notifyDataSetChanged();
                }

        }
In class that extends BaseAdapter:

    @Override
        public View getView(int position, View convertView, ViewGroup parent)
{
                ViewHolder holder;
                if (convertView == null) {
                        convertView = m_inflater.inflate(R.layout.shop, null);

                        holder = new ViewHolder();
                        holder.descriptions = (TextView)
convertView.findViewById(R.id.shop);

                        convertView.setTag(holder);
                } else {
                        holder = (ViewHolder) convertView.getTag();
                }
                String textOnView = m_shops.get(position).getDescription();
                holder.descriptions.setText(textOnView);
                return convertView;
        }

        static class ViewHolder{
                TextView descriptions;
        }
And my xml where define ListView (Sorry that so much):

    <RelativeLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

        <LinearLayout
                android:id="@+id/full_info"
                android:layout_width="wrap_content"
        android:layout_height="wrap_content">

        <ImageView
                android:id="@+id/icon"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"

                android:layout_margin="10px"
                android:src="@drawable/icon">
        </ImageView>

        <LinearLayout
                android:id="@+id/short_info"
                android:orientation="vertical"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_toRightOf="@id/icon"
                android:layout_alignParentRight="true">

                <TextView
                        android:id="@+id/name_for_good"
                android:layout_width="fill_parent"
                android:layout_height="0dip"
                android:layout_weight="1"
                android:gravity="center_vertical"
                android:text=" ">
            </TextView>

                <TextView
                        android:id="@+id/best_price"
                android:layout_width="fill_parent"
                android:layout_height="0dip"
                android:layout_weight="1"

                android:singleLine="true"
                android:ellipsize="marquee"
                android:text=" : ">
            </TextView>

                        <TextView
                                android:id="@+id/worst_price"
                android:layout_width="fill_parent"
                android:layout_height="0dip"
                android:layout_weight="1"
                android:text=" : ">
            </TextView>

        </LinearLayout>
        </LinearLayout>
        <LinearLayout
                android:id="@+id/description_and_shop"
                android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/full_info">

        <TextView
                android:id="@+id/description"
                        android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="     
,   ..">
        </TextView>

                <ScrollView
                        android:id="@+id/ScrollView"
                        android:layout_width="fill_parent"
                        android:layout_height="fill_parent">
                        <ListView
                                android:id="@+id/shops"
                                android:layout_width="fill_parent"
                                android:layout_height="fill_parent">
                        </ListView>
                </ScrollView>

        </LinearLayout>
</RelativeLayout>

-- 

2. Multiple Sliding Drawers in a ListView

i have a sliding drawer for each ListView 'item' as an overlay on top of
each list item. Let's say i have 20 items in a list and when i click on a
drawer handle (opens left to right) for that particular item, the content
container of the sliding drawer will slide out as an overlay on top of that
list item. Now here i want to keep track of the drawer handle for each item
so that drawer gets closed whenever other drawer is clicked to get open,
means only one drawer will be open for an item

How to keep track of those handles for all list items to acheive close?

Help Appreciated.

-- 
--Jitesh .V. Dedhiya---

Don't Learn To Hack but Hack To Learn

-- 

3. Manually Dispatch Key Event

4. Sync contact

5. To know how emailprovider.db gets populated

6. Not able to include jndi.jar in Android Project

7. Bluetooth device "probe"?