Mercurial > dwindows
comparison android/DWindows.kt @ 2651:7700c8022af3
Android: Unset ID is -1 on Android not 0, so generate a View ID if < 1 not just 0.
This fixes HandyFTP bombing with error about ConstraintLayout children needing IDs.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 14 Sep 2021 06:58:40 +0000 |
parents | 7101b5692601 |
children | 42151fd096d4 |
comparison
equal
deleted
inserted
replaced
2650:7101b5692601 | 2651:7700c8022af3 |
---|---|
1991 | 1991 |
1992 splitbar!!.id = cid | 1992 splitbar!!.id = cid |
1993 | 1993 |
1994 // Place the top/left item | 1994 // Place the top/left item |
1995 if(topleft != null) { | 1995 if(topleft != null) { |
1996 if(topleft.id == 0) { | 1996 if(topleft.id < 1) { |
1997 topleft.id = View.generateViewId() | 1997 topleft.id = View.generateViewId() |
1998 } | 1998 } |
1999 splitbar!!.addView(topleft) | 1999 splitbar!!.addView(topleft) |
2000 constraintSet.connect( | 2000 constraintSet.connect( |
2001 topleft.id, | 2001 topleft.id, |
2031 } | 2031 } |
2032 } | 2032 } |
2033 | 2033 |
2034 // Place the bottom/right item | 2034 // Place the bottom/right item |
2035 if(bottomright != null) { | 2035 if(bottomright != null) { |
2036 if (bottomright.id == 0) { | 2036 if (bottomright.id < 1) { |
2037 bottomright.id = View.generateViewId() | 2037 bottomright.id = View.generateViewId() |
2038 } | 2038 } |
2039 splitbar!!.addView(bottomright) | 2039 splitbar!!.addView(bottomright) |
2040 constraintSet.connect( | 2040 constraintSet.connect( |
2041 bottomright.id, | 2041 bottomright.id, |