Posts

Showing posts from January 15, 2019

ScrollToPosition for Lazy Loading RecyclerView

Image
0 I'm trying to build a simple activity for messaging in android. I have a RecyclerView that list the messages and I set a ScrollListener on it. When the firstVisibleItem is the third of the list (RecyclerView stack from end) , I will make a call to load other elements. I add this element to my array and I set a new adapter on my RecyclerView for the update. When I set the new adapter, the list starts one more time from the last message. So far I have tried to use scrollToPosition to go to the message where the user was before scrollListener was triggered, but still not work at all because the lastVisibleItem become 1 every time. Is there a way to maintain the last firstVisible element and set this element as the top element after reset the Adapter? This is the onCreateMethod . @Override protected void onCreate(Bundle savedInstanceState) super.onCreate(savedInstanceState); setContentView(R.layout.chat); lastOffset = 0; requestSize = 20; loadMessage(...

Werlsee

Image
Werlsee Blick vom Ostufer auf den Lindwall (Insel) Geographische Lage Landkreis Oder-Spree, Brandenburg, Deutschland Zuflüsse Neue Löcknitz: Möllensee → Peetzsee Abfluss Neue Löcknitz → Löcknitz → Spree Inseln Lindwall, 1,5 ha (heute meist: Liebesinsel) Orte am Ufer Grünheide (Mark), Fangschleuse Größere Städte in der Nähe Erkner Daten Koordinaten 52° 25′ 12″  N , 13° 48′ 39″  O 52.420083333333 13.810916666667 32.4 Koordinaten: 52° 25′ 12″  N , 13° 48′ 39″  O Höhe über Meeresspiegel 32,4  m ü. NN Fläche 60 ha [1] Länge 1215 m dep1 [1] Breite 647 m dep1 [1] Volumen 2,75 Mio. m³ dep1 [1] Maximale Tiefe 17,0 m [1] Mittlere Tiefe 5,0 m f11 Einzugsgebiet 4474 ha dep1 [1] Der Werlsee ist ein 60 Hektar umfassender See in der brand...