J Juzer Hussain Active Member Licensed User Longtime User Nov 6, 2018 #1 Hi, I have migrated my code from 5.0 to 8.5. Iconbutton is having some issue in assigning LEFT property where as VISIBLE is working for same button as in below code. Code: For Each v As View In pnl.GetAllViewsRecursive If v Is IconButton Then Button1=v If Button1.Visible=True Then 'working If j=0 Then Button1.Left=nDistance 'not working Else Button1.Left=(j+1)*nDistance+(j)*nOnebtnWidth End If j=j+1 End If End If Next I tried by deleting and creating all controls in designer, I also declared Button1 in global for this to work. but still shows below error Panel size is unknown. Lyout may not be loaded correctly. java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.ViewGroup$LayoutParams com.phillipcalvin.iconbutton.IconButton.getLayoutParams()' on a null object reference Pls give some clue. Thanks Juzer[/code] Last edited: Nov 6, 2018
Hi, I have migrated my code from 5.0 to 8.5. Iconbutton is having some issue in assigning LEFT property where as VISIBLE is working for same button as in below code. Code: For Each v As View In pnl.GetAllViewsRecursive If v Is IconButton Then Button1=v If Button1.Visible=True Then 'working If j=0 Then Button1.Left=nDistance 'not working Else Button1.Left=(j+1)*nDistance+(j)*nOnebtnWidth End If j=j+1 End If End If Next I tried by deleting and creating all controls in designer, I also declared Button1 in global for this to work. but still shows below error Panel size is unknown. Lyout may not be loaded correctly. java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.ViewGroup$LayoutParams com.phillipcalvin.iconbutton.IconButton.getLayoutParams()' on a null object reference Pls give some clue. Thanks Juzer[/code]
Erel B4X founder Staff member Licensed User Longtime User Nov 6, 2018 #2 It is best if you upload a small project that demonstrates this issue. Upvote 0
J Juzer Hussain Active Member Licensed User Longtime User Nov 6, 2018 #3 Hi Erel, Attached is a test project which has the same issue with IconButton. Juzer Attachments TestProjects.zip TestProjects.zip 414.8 KB · Views: 403 Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Nov 6, 2018 #4 (you should use File - Export as zip when uploading projects.) I see the error that you are talking about. It happens inside IconButton so only the library developer can help you here. Note that you can use CSBuilder or the designer to add text with icons to regular buttons. https://www.b4x.com/android/forum/threads/b4x-fontawesome-material-icons-fonts.72908/#content Upvote 0
(you should use File - Export as zip when uploading projects.) I see the error that you are talking about. It happens inside IconButton so only the library developer can help you here. Note that you can use CSBuilder or the designer to add text with icons to regular buttons. https://www.b4x.com/android/forum/threads/b4x-fontawesome-material-icons-fonts.72908/#content
J Juzer Hussain Active Member Licensed User Longtime User Nov 6, 2018 #5 Luckily i am not arranging iconbuttons in this project elsewhere, I can use either Imageview(it has click event) or FontAwesome. Thank You Erel, Juzer Upvote 0
Luckily i am not arranging iconbuttons in this project elsewhere, I can use either Imageview(it has click event) or FontAwesome. Thank You Erel, Juzer