0

enter image description here

This activity has a fixed Toolbar on the bottom and the mid section (rest of the screen) is split in 2 equal parts (LinearLayout with weight 50). This mid section is handled by a fragment. Each sub part has exactly the same views in it. Of course while running the content is different. On double tap I want BOTH (1 and 2 marked on the picture) to display new content. I do not want to be able to go back on previous Views. I also do not want a list-effect to display new content, I'd like a stacked effect but without CardViews, because you can't remove the space around the cards totally. Also, the next 2 views should appear instantly (I have the data stored locally).

How can I achieve that? Obviously I'm quite new to Android. It seems to me none of the ListView/GridView/StaggeredView does that, although what I need is easier since I basically just want to replace my content using an adapter to avoid recoding.

Milad Yarmohammadi
  • 1,253
  • 2
  • 22
  • 37
mrj
  • 589
  • 1
  • 7
  • 17
  • you just use visibility condition inside if to avoid the recoding,, – Archu Mohan May 14 '19 at 13:02
  • So on fragment creation I create 2 layers and one is hidden? How does the setup look like? Which `Adapter` do I use? – mrj May 14 '19 at 13:17
  • I cant get you.. what is adapter here ? or else just update a your tried code – Archu Mohan May 14 '19 at 13:26
  • Sorry I meant `AdapterView` as per this post: https://stackoverflow.com/questions/14681022/android-adapterview?rq=1 I did not find the proper View for my needs. – mrj May 14 '19 at 13:30
  • Here is what I am trying atm: I'm using a `RecyclerView` to populate my data with one single Item (I am changing my `ViewHolder` height inside the Adapter, then changing my `LayoutManager` to disable scrolling. I'll see if changing the position of the Items to replace content gets me where I want. Code to follow. – mrj May 14 '19 at 16:47

0 Answers0