Picasso
не могу загрузить изображение drawable
в ImageView
, я пытался изменить ширину и высоту ImageView
, изменив размер изображения, загрузив его с fit()
, resize()
или безcenter()
и изображение до сих пор не видно.Я использую Picasso
для всего проекта, и везде работает нормально, но это не дает результата.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/mainFullFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/mainThemeBlack"
tools:context=".MainTabsActivity">
<RelativeLayout
android:id="@+id/rlSynchroView"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_alignParentBottom="true"
android:background="@color/bottom_sheet_blue">
<TextView
android:id="@+id/tvSynchroLast"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="end"
android:layout_marginEnd="10dp"
android:textColor="@color/mdtp_white"
android:text="Last synchro: 10:38"/>
<ImageView
android:id="@+id/ivSynchroIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tvSynchroLast"
android:elevation="5dp"/>
</RelativeLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/listFullView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:dividerHeight="10.0sp"
android:layout_above="@id/rlSynchroView"
android:background="?android:attr/selectableItemBackground"
android:divider="@color/mainThemeBlack"
android:paddingBottom="70dp"
android:clipToPadding="false">
</android.support.v7.widget.RecyclerView>
</RelativeLayout>
Вызов метода:
Picasso.get().load(R.drawable.refresh_icon)
.resize(10, 10)
.into(refreshIV);
Я звоню внутриonViewCreated()
и я тоже пытался изменить его размер на другие значения.
Я хочу получить интерактивную нижнюю панель со значком обновления (и информацией о времени последней синхронизации), чтобы синхронизировать данные со службой внутри onClick
метод
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
mView = inflater.inflate(R.layout.list_full, container, false);
refreshIV = mView.findViewById(R.id.ivSynchroIcon);
mobileArray = new ArrayList<IssuePOJO>();
dbStats.open();
generateList();
mView = view;
return mView;
}