layout - Is posible to create two edittext identically on android xml? -


i wondering if possible create 2 edittext identically on same activity without create new id. example, use 1 id control both edittext.

      <edittext             android:id="@+id/edittext_timeminute"             android:layout_width="58dp"             android:layout_height="wrap_content"             android:layout_gravity="center"             android:ems="10"             android:inputtype="numberdecimal"             android:maxlength="3" /> 

i tried add in layout without sucess:

     <edittext             android:id="@id/edittext_timeminute"             android:layout_width="58dp"             android:layout_height="wrap_content"             android:layout_gravity="center"             android:ems="10"             android:inputtype="numberdecimal"             android:maxlength="3" /> 

no, can't, id must unique every item inside same xml layout. can use same id different items in different layouts (this answer explains it: https://stackoverflow.com/a/15811503/5837758).


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -