एक ही आवश्यकता है, और थोड़ा सा जांच शुरू कर दी है। मैं ap.googletool आउटपुट देख रहा हूं जिसे मैं com.google.android.googlequicksearchbox apk से प्राप्त करने में सक्षम हूं। (कोई स्रोत केवल res xmls नहीं)
यह लेआउट (at_place_card.xml) का उपयोग किसी स्थान को प्रदर्शित करने के लिए किया जाता है। इसमें दाईं ओर तीन टेक्स्ट लाइनें और दो क्रिया बटन (विवरण और चेकइन) हैं और बाईं ओर एक छवि है।
दुर्भाग्यवश, मैं एपीके से कोई स्टाइल जानकारी प्राप्त नहीं कर पा रहा हूं, इसलिए फ़ॉन्ट आकार, आयाम और रंग अनुमानित हैं।
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="horizontal" android:background="@drawable/card_background" android:layout_width="fill_parent" android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:thegoogle="http://schemas.android.com/apk/res/com.google.android.googlequicksearchbox">
<LinearLayout android:orientation="vertical" android:layout_width="0.0dip" android:layout_height="fill_parent" android:baselineAligned="false" android:layout_weight="1.0">
<FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content">
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" style="@style/CardTextBlock">
<TextView android:id="@id/entry_title" android:layout_width="wrap_content" android:layout_height="wrap_content" style="@style/CardTitle" />
<TextView android:id="@id/open_hours" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" style="@style/CardText" />
<TextView android:textColor="@color/card_light_text" android:id="@id/known_for_terms" android:paddingBottom="4.0dip" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:maxLines="4" style="@style/CardText" />
</LinearLayout>
<ImageButton android:layout_gravity="top|right|center" android:id="@id/card_menu_button" android:layout_width="@dimen/card_action_button_height" android:layout_height="@dimen/card_action_button_height" android:contentDescription="@string/accessibility_menu_button" style="@style/CardMenuButton" />
</FrameLayout>
<Space android:layout_width="fill_parent" android:layout_height="0.0dip" android:layout_weight="1.0" />
<Button android:id="@id/details_button" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/card_action_button_height" android:text="@string/more_details" android:drawableLeft="@drawable/ic_action_pin" style="@style/CardActionButtonWithIcon" />
<Button android:id="@id/checkin_button" android:layout_width="fill_parent" android:layout_height="@dimen/card_action_button_height" android:text="@string/check_in" android:drawableLeft="@drawable/ic_action_check_in" style="@style/CardActionButtonWithIcon" />
</LinearLayout>
<com.google.android.velvet.ui.CrossfadingWebImageView android:id="@id/place_photo" android:visibility="gone" android:layout_width="0.0dip" android:layout_height="fill_parent" android:scaleType="centerCrop" android:adjustViewBounds="true" android:baselineAligned="false" android:minHeight="@dimen/at_place_card_content_height" android:layout_weight="1.0" android:contentDescription="@string/at_place_card_image_desc" thegoogle:crossfadeDuration="@integer/image_crossfade_duration" />
</LinearLayout>
अद्यतन: कुछ स्टाइल जानकारी भी प्राप्त करने में सक्षम था। यदि आप यहां रुचि रखते हैं तो मेरे पास वर्तमान में मौजूद जानकारी के साथ एक ज़िप फ़ाइल है (अब Google से कुछ संसाधन फ़ाइलें)। https://dl.dropbox.com/u/4379928/android/googlenow2.zip
बस स्पष्ट करने के लिए - यह कार्ड दृश्य का अधिक दिखने और महसूस करने के बाद मैं हूं। अनिवार्य रूप से मुझे इसे सूची दृश्य की तरह व्यवहार करने की आवश्यकता है यानी मैं कार्ड को गतिशील रूप से स्क्रीन के साथ पॉप्युलेट कर सकता हूं लेकिन मुझे सूची की प्रत्येक पंक्ति कार्ड की तरह दिखाना चाहती है। यदि कोई और लेआउट है, तो मैं इसके बजाय अनुकूलित कर सकता हूं, यह बहुत अच्छा होगा – HBG
यूट्यूब पर वीडियो का अध्ययन करने के बाद, मुझे लगता है कि यह दो विचारों के साथ एक सूचीदृश्य की तरह है, एक बंद कार्ड के लिए, और एक खुला है। दो विचारों के बीच एनीमेशन भी है ... मुझे नहीं लगता कि हमें एक ही परिणाम प्राप्त करने के लिए सभी एपीआई को फिर से शुरू करने की आवश्यकता होगी। – pommedeterresautee
कृपया नीचे दिए गए मेरे उत्तर को देखें – confucius