मैं Google Play Market से बिल्कुल एक संक्षिप्त दृश्य को कार्यान्वित करना चाहता हूं। यह सामग्री से कई पंक्तियां प्रदर्शित करता है, और एक तीर, और तीर पर टैप करने से पूरी सामग्री प्रकट होती है। क्या यह ExpandableListView के साथ कार्यान्वित किया गया है या कोई अन्य समाधान है?मैं Google Play से एक को संक्षिप्त दृश्य को कैसे कार्यान्वित कर सकता हूं?
स्क्रीन शॉट्स जो मैं ढूंढ रहा हूं उसे हाइलाइट करने से जुड़ा हुआ है। धन्यवाद।
final TextView descriptionText = (TextView) view.findViewById(R.id.detail_description_content);
final TextView showAll = (TextView) view.findViewById(R.id.detail_read_all);
showAll.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
showAll.setVisibility(View.INVISIBLE);
descriptionText.setMaxLines(Integer.MAX_VALUE);
}
});
एक्सएमएल:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/detail_description_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<TextView
android:id="@+id/detail_description_content"
android:maxLines="5"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/detail_read_all"
android:clickable="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</ScrollView>
महत्वपूर्ण हिस्सा Maxlines और scrollview है
यह मदद कर सकता है: http://stackoverflow.com/questions/5165682/how-to-implement-expandable-panels-in-android – 0gravity
हाँ , यह थोड़ा सा मदद करता है, क्योंकि यह जो मैं ढूंढ रहा हूं उसे लागू करता है, लेकिन मुझे आशा थी कि कस्टम लेआउट की तुलना में यह एक आसान समाधान है ... –