Új hozzászólás Aktív témák
-
hati
addikt
Miért nem működik a következő?
convertView.setBackgroundResource(R.drawable.list_background1);
list_background1.xml ->
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Normal state. -->
<item android:drawable="@drawable/listitem_bg1" android:state_pressed="false" android:state_selected="false"/>
<!-- pressed state. -->
<item android:drawable="@drawable/listitem_bg_pressed" android:state_pressed="true" android:state_selected="false"/>
<!-- Selected state. -->
<item android:drawable="@drawable/listitem_bg_selected" android:state_pressed="false" android:state_selected="true"/>
</selector>drawable/listitem_bg1.xml ->
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="180"
android:endColor="?attr/attr_list_item_background1"
android:startColor="?attr/attr_list_item_background2"/>
<corners android:radius="6dp"/>
</shape>attr.xml ->
<?xml version="1.0" encoding="utf-8"?>
<resources>
<attr name="attr_list_item_background1" format="reference" />
<attr name="attr_list_item_background2" format="reference" />
<attr name="attr_list_item_background_head" format="reference" />
<attr name="attr_shape_radius" format="reference" />
</resources>styles.xml ->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="attr_list_item_background1">@color/list_row_even</item>
<item name="attr_list_item_background2">@color/list_row_odd</item>
<item name="attr_list_item_background_head">@color/list_row_head</item>
</style>Amennyiben kihagyom az attr.xml használatát és a pl.
android:endColor="?attr/attr_list_item_background1" helyet rögtön a színre mutatok android:endColor="color/list_row_even", akkor működik, de akkor nem tudok több témát létrehozni.
Új hozzászólás Aktív témák
- Prémium! Gamer PC-Számítógép! Csere-Beszámítás! Rog C VIII / R9 3950X / RTX 3080 / 1TB SSD / 32GB
- Samsung galaxy watch 7 44mm (ezüst) + 1.5 év garancia
- iPhone 15 Plus 128GB gyári független normál állapot
- iPhone 15 128GB gyári független mint az új 2027.02.27. Apple jótállás
- iPhone 15 128GB gyári független One új közel 1 év jótállás
- Telefon felvásárlás!! Samsung Galaxy A70/Samsung Galaxy A71/Samsung Galaxy A72
- HIBÁTLAN iPhone 14 Pro Max 512GB Silver -1 ÉV GARANCIA - Kártyafüggetlen
- HP 17-CP2003NH - 17,3" Full HD IPS - Ryzen 5 7520U - 8GB - 512GB - Win11 - MAGYAR - 2+ év garancia
- Baofeng UV-5R Mini kézi amatőr rádió
- ÁRGARANCIA!Épített KomPhone Ryzen 7 7700X 32/64GB RAM RTX 5070 Ti 16GB GAMER PC termékbeszámítással
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
