Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb0d6997 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change I362ca992 into eclair

* changes:
  Show message if contact has no data to show.
parents 1fb6275a cdeea949
Loading
Loading
Loading
Loading
+19 −7
Original line number Diff line number Diff line
@@ -25,17 +25,29 @@
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"/>
        
    <FrameLayout android:id="@android:id/tabcontent"
    <ListView android:id="@+id/contact_data"
        android:layout_width="fill_parent"
        android:layout_height="0dip"
        android:layout_weight="1">
        android:layout_height="fill_parent"
        android:background="@drawable/title_bar_shadow"
    />
    
        <View
    <ScrollView android:id="@android:id/empty"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:fillViewport="true"
    >
        <TextView android:id="@+id/emptyText"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/title_bar_shadow"
            android:text="@string/no_contact_details"
            android:textSize="20sp"
            android:textColor="?android:attr/textColorSecondary"
            android:paddingLeft="10dip"
            android:paddingRight="10dip"
            android:paddingTop="10dip"
            android:lineSpacingMultiplier="0.92"
        />
        </FrameLayout>
    </ScrollView>
            
</LinearLayout>
+21 −23
Original line number Diff line number Diff line
@@ -82,6 +82,7 @@ import android.widget.AdapterView;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.ScrollView;
import android.widget.TextView;
import android.widget.Toast;

@@ -168,7 +169,6 @@ public class ViewContactActivity extends Activity
        finish();
    }

    private FrameLayout mTabContentLayout;
    private ListView mListView;
    private boolean mShowSmsLinksForAllPhones;

@@ -200,13 +200,11 @@ public class ViewContactActivity extends Activity

        mHandler = new NotifyingAsyncQueryHandler(this, this);

        mListView = new ListView(this);
        mListView = (ListView) findViewById(R.id.contact_data);
        mListView.setOnCreateContextMenuListener(this);
        mListView.setScrollBarStyle(ListView.SCROLLBARS_OUTSIDE_OVERLAY);
        mListView.setOnItemClickListener(this);

        mTabContentLayout = (FrameLayout) findViewById(android.R.id.tabcontent);
        mTabContentLayout.addView(mListView);
        mListView.setEmptyView((ScrollView) findViewById(android.R.id.empty));

        mResolver = getContentResolver();