Próbuję odtworzyć następujący gradient programowo.Utwórz programowo gradient radialny
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:startColor="@color/startcolor"
android:centerColor="#343434"
android:endColor="#00000000"
android:type="radial"
android:gradientRadius="140"
android:centerY="45%"
/>
<corners android:radius="0dp" />
</shape>
Jak ustawić programowo parametr? Dzięki
android:centerY="45%"
To nie działa dla mnie, nie ma radial gradiant jsut zwykłego białego tła. – Poutrathor
Nie ma potrzeby wywoływania '' 'setGradientCenter''', jeśli chcesz użyć domyślnej wartości centrum –