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

Commit 3f0476a4 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Basic API for third-party apps to define custom Data rows.

To display styled ContactsContract.Data rows in UI, this
change adds basic styling attributes that third-party apps
can use.  The Contacts app parses these structures before
displaying Data rows with unrecognized MIME-types.

Partially fixes http://b/2126691
parent cd263b5c
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -3486,13 +3486,31 @@
    <!-- Contacts meta-data attributes -->
    <!-- =============================== -->

    <!-- TODO: remove this deprecated styleable -->
    <declare-styleable name="Icon">
        <attr name="icon" />
        <attr name="mimeType" />
    </declare-styleable>

    <!-- TODO: remove this deprecated styleable -->
    <declare-styleable name="IconDefault">
        <attr name="icon" />
    </declare-styleable>

    <!-- Maps a specific contact data MIME-type to styling information -->
    <declare-styleable name="ContactsDataKind">
        <!-- Mime-type handled by this mapping -->
        <attr name="mimeType" />
        <!-- Title used to represent data of this kind -->
        <attr name="title" />
        <!-- Icon used to represent data of this kind -->
        <attr name="icon" />
        <!-- Column in data table that summarizes this data -->
        <attr name="summaryColumn" format="string" />
        <!-- Column in data table that contains details for this data -->
        <attr name="detailColumn" format="string" />
        <!-- Flag indicating that detail should be built from SocialProvider -->
        <attr name="detailSocialSummary" format="boolean" />
    </declare-styleable>

</resources>
+3 −0
Original line number Diff line number Diff line
@@ -1166,6 +1166,9 @@
  <public type="attr" name="accountPreferences" />
  <public type="attr" name="textAppearanceSearchResultSubtitle" />
  <public type="attr" name="textAppearanceSearchResultTitle" />
  <public type="attr" name="summaryColumn" />
  <public type="attr" name="detailColumn" />
  <public type="attr" name="detailSocialSummary" />

  <public type="style" name="Theme.Wallpaper" />
  <public type="style" name="Theme.Wallpaper.NoTitleBar" />