I have this difficulty to have both rounded corner and a background image in my LinearLayout
.
I know I can achive the rounded corner by using the shape
for those who seeks a different answer
in the xml
- kan
- kebapeli
- @drawable/kan1
- @drawable/esyalar_kebap_adana
in the oncreate or general
String[] ulkeAdlari =getResources().getStringArray(R.array.ulke_isimleri);
TypedArray ulkeGorselleri = getResources().obtainTypedArray(R.array.ulke_gorselleri);
as a function
@Override
public Drawable getDrawable(int position) {
Drawable[] drawable = new Drawable[] {
ulkeGorseli.getDrawable(position )
,
new TextDrawable(ulkeAdlari[ position ] )
};
return new LayerDrawable(drawable);
}