how to inflate the view on the recycler view

Good Morning

I would like to add favorite list to my app, could anyone please help me to complete this code!!

i did't receive any error, but the page is blank.

i have 2 layout for view, one for recycler view (acrivity_favorites) and the other one for image and other views (favorites_item) how could I inflate the view in the FavoritesActivity.java file

Any help at all is great.

thanks in advance!

FavoritesActivity.java (this code need some modification and help)

public class FavoritesActivity extends AppCompatActivity {

RecyclerView recyclerView;

RecyclerView.LayoutManager layoutManager;

@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_favorites);

recyclerView = findViewById(R.id.recycler_favorites);

recyclerView.setHasFixedSize(true);

LinearLayoutManager myLayoutManager = new LinearLayoutManager(this);

myLayoutManager.setReverseLayout(true);

myLayoutManager.setStackFromEnd(true);

recyclerView.setLayoutManager(myLayoutManager);

loadFavorites();

}

private...

Read More »

By: StackOverFlow - Sunday, 17 June

Related Posts