[Galaxy S II Android Development] remuntada78:
Hi, i've some questions.

It's possible to change image's background using id of id in two or more different xml files to have a list of different images to choose.

for example i want a listpreference of dialer keyboard images to choose ,the following code is the stock xml where there is id of dialpad with stock dialer background

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="vertical" android:id="@id/dialpad" android:background="@drawable/dialer_bg_p_01" android:visibility="visible" android:clickable="true" android:layout_width="315.0dip" android:layout_height="245.0dip" android:layout_marginLeft="3.0dip" android:layout_marginTop="3.0dip" android:hapticFeedbackEnabled="true"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:orientation="horizontal" android:id="@id/onetwothree" android:layout_width="315.0dip" android:layout_height="59.0dip">
<ImageButton android:id="@id/one" android:background="@drawable/call_dial_btn_bg" android:layout_width="103.0dip" android:layout_height="59.0dip" android:scaleType="fitXY" android:soundEffectsEnabled="false" android:contentDescription="@string/description_image_button_one" />
<ImageButton android:id="@id/two" android:background="@drawable/call_dial_btn_bg" android:layout_width="103.0dip" android:layout_height="59.0dip" android:layout_marginLeft="2.5dip" android:src="@drawable/call_dial_btn_02" android:scaleType="fitXY" android:soundEffectsEnabled="false" android:contentDescription="@string/description_image_button_two" />
<ImageButton android:id="@id/three" android:background="@drawable/call_dial_btn_bg" android:layout_width="103.0dip" android:layout_height="59.0dip" android:layout_marginLeft="2.5dip" android:src="@drawable/call_dial_btn_03" android:scaleType="fitXY" android:soundEffectsEnabled="false" android:contentDescription="@string/description_image_button_three" />
</LinearLayout>

i thoungh to add an or more xml with different id with different dialer background, like this

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="vertical" [COLOR="Red"]android:id="@id/orange_dialpad" [/COLOR]android:background="[COLOR="Red"]@drawable/orange_dialer_bg_p_01"[/COLOR] android:visibility="visible" android:clickable="true" android:layout_width="315.0dip" android:layout_height="245.0dip" android:layout_marginLeft="3.0dip" android:layout_marginTop="3.0dip" android:hapticFeedbackEnabled="true"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:orientation="horizontal" android:id="@id/onetwothree" android:layout_width="315.0dip" android:layout_height="59.0dip">
<ImageButton android:id="@id/one" android:background="@drawable/call_dial_btn_bg" android:layout_width="103.0dip" android:layout_height="59.0dip" android:scaleType="fitXY" android:soundEffectsEnabled="false" android:contentDescription="@string/description_image_button_one" />
<ImageButton android:id="@id/two" android:background="@drawable/call_dial_btn_bg" android:layout_width="103.0dip" android:layout_height="59.0dip" android:layout_marginLeft="2.5dip" android:src="@drawable/call_dial_btn_02" android:scaleType="fitXY" android:soundEffectsEnabled="false" android:contentDescription="@string/description_image_button_two" />
<ImageButton android:id="@id/three" android:background="@drawable/call_dial_btn_bg" android:layout_width="103.0dip" android:layout_height="59.0dip" android:layout_marginLeft="2.5dip" android:src="@drawable/call_dial_btn_03" android:scaleType="fitXY" android:soundEffectsEnabled="false" android:contentDescription="@string/description_image_button_three" />
</LinearLayout>

and recall these ids in the DialpadFragment.smali file with a code like that

iget-object v1, p0, Lcom/sec/android/app/dialertab/dialpad/DialpadFragment;->mContext:Landroid/content/Context;

invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v1

const-string v2, "dialer_bg_chooser"

const v3, 0x0

invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v1

const v2, 0x1

if-eq v1, v2, :cond_0

const v2, 0x7f020071 [COLOR="Red"] <--id of stock dialpad[/COLOR]

goto :goto_0

:cond_0
const v2, 0x7f020267[COLOR="Red"] <--id of orange_dialpad[/COLOR]

:goto_0

I ask that beacause i tried to change dialer's background with a code like above but using background images ids

I hope I was clear thanks in advance