android - Get element by id and order -


android newbie here,

i have application displays list of items. each item looks this.

<framelayout xmlns:android="http://schemas.android.com/apk/res/android"     style="@style/apptheme.framelayout"     android:id="@+id/job_list_item_main_frame">      <!-- cut inside code example -->  </framelayout> 

there's 10-100 of these on screen @ once. need first element's height separate process.

how can select element?

edit: first item in list need retrieve. but, if there way select each item(with id job_list_item_main_frame) individually , it's position, ideal.

edit 2: i'm making tutorial walk through. there's overlay arrow points image. however, image position changes 20dp depending on list item's height. need make adjustments arrow based upon list item. it's in recycler view. let me check real quick adapter it's using.

in adapter have method onbindviewholder(viewholder, position);

in method can check if position 0. if case have reference view need. viewholder.yourview

on view can layoutparams , hight there.

the thing hight in pixels if not mistakend, if need in dp have conversion device specific.

if need further guidance post adapter please.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -