using internal media provider

by jj » Thu, 30 Apr 2009 17:47:04 GMT


Sponsored Links
 hello folk

  Is it possible to use internal media provider to store application's
media file, if sdcard is not present on device.
    what is max size the of this internal provider .I  mean what max
data appl can store in this internal provider.

Thank you
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. ExpandableListAdapter and ImageViews

Good morning,

I am trying to write a small book catalogue application, and I would
like to use an expandable list adapter for the main display. My aim is
to have the parent showing a list of authors and, once opened, the
child should display a list of book titles and thumbnails.

I have managed to display the text fields using a
SimpleExpandableListAdapter, however I cannot display the thumbnails.
In fact the API (http://developer.android.com/reference/android/widget/
SimpleExpandableListAdapter.html) states
"childTo        ... These should all be TextViews"

Does anyone know how to use TextViews and ImageViews in a single
Childrow. The layout of the child rows looks like.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:orientation="horizontal"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
    android:padding="10dp" >
        <ImageView android:id="@+id/row_img"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
                android:layout_weight="1"
        />
        <TextView android:id="@+id/row_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:paddingLeft="10dp"
                />
</LinearLayout>

-- 

2. Not all views are displayed

First, let me say I've only briefly searched for this on the forum, as
I'm not sure what exactly the problem is, only the consequence of it,
making it hard to problem-find.

Anyway,

I'm making my own first Android app, an app for displaying recipes.
I've read through most of the dev guide, and gone through the NotePad
examples but I just can't figure out this problem I'm having, but I'm
sure it's just some newbie problem.

My main screen is a list of categories defined in an XML file, and
I've populated it fine.
Once a recipe is selected, is where my problems enter.

I've defined my view in recipes_view.xml as follows:

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android=" http://www.***.com/ 
android"
        android:orientation="vertical" android:layout_width="fill_parent"
        android:layout_height="fill_parent">

<LinearLayout xmlns:android=" http://www.***.com/ 
android"
        android:orientation="horizontal" android:layout_width="fill_parent"
        android:layout_height="fill_parent">
<ImageView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="@+id/RecipePicture"
android:id="@+id/RecipePicture"></ImageView>
<LinearLayout xmlns:android=" http://www.***.com/ 
android"
        android:orientation="vertical" android:layout_width="fill_parent"
        android:layout_height="fill_parent">
<TextView android:text="@+id/DifficultyView"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/
DifficultyView"></TextView>
<TextView android:text="@+id/RatingView"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/RatingView"></
TextView>
</LinearLayout>
</LinearLayout>
<ListView android:text="@+id/IngredientsList"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/
IngredientsList"></ListView>
<TextView android:text="@+id/DirectionsView"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/
DirectionsView"></TextView>
</LinearLayout>

This should be fairly simple, though it employs several LinearLayouts
in vertical / horizontal orientations.

I've then defined RecipeView.java, in which I set the content view in
onCreate:
setContentView(R.layout.recipe_view);

My problem is, that when I populate this view, only the DifficultyView
and RatingView actually shows up.
I could perhaps see why the ImageView and the ListView do not show up
- I could have messed up something there - but the final TextView
(DirectionsView) also does not show up, strangely.

To populate the DirectionsView with data I do the following:

TextView directionsView = (TextView)
findViewById(R.id.DirectionsView);
//Get the description
String desc = recipeCursor.getString(2);
directionsView.setText(desc);
directionsView.setVisibility(TextView.VISIBLE);

My de{*filter*} clearly shows that desc is non-empty, non-null string.

I've tried everything I can think of to no avail.

Cheers in advance!

-- 

3. How fix bookmark鈥檚 list item click listener

4. Do i need to call DatabaseHelper.close()?

5. Access resources from another application

6. Quick Search

7. Module Installation