मेरे कोड के खिलाफ नया लिंट टूल दौड़ा। यह बहुत सारे अच्छे सुझाव लेकर आया था, लेकिन यह मैं नहीं समझ सकता।
इस टैग और इसके बच्चों को एक और एक कंपाउंड ड्रॉबल द्वारा बदला जा सकता है
समस्या: जाँचता है कि क्या कंपाउंड ड्रॉअब का उपयोग करके वर्तमान नोड को टेक्स्ट व्यू से बदला जा सकता है।
एक LinearLayout जिसमें एक ImageView और एक TextView शामिल है, एक यौगिक ड्रॉबल के रूप में अधिक कुशलता से संभाला जा सकता है
और यहाँ मेरा लेआउट है
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_centerInParent="true">
<ImageView
android:id="@+id/upImage"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_gravity="center_vertical"
android:scaleType="centerInside"
android:src="@drawable/up_count_big">
</ImageView>
<TextView
android:id="@+id/LikeCount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="2dp"
android:layout_marginBottom="1dp"
android:textColor="@color/gray"
android:textSize="16sp"
android:layout_gravity="center_vertical">
</TextView>
</LinearLayout>
क्या कोई इस बात का ठोस उदाहरण दे सकता है कि इस मामले में एक कंपाउंड को कैसे आकर्षित किया जा सकता है?
TextView
/ImageView
कॉम्बो को इस तरह से नहीं बदला जा सकता है।