Dec 31, 2019 Replies: 3 Example of implementing a chat layout. It is based on xCustomListView. The text is created with a hidden BBCodeView (BCTextEngine) and the bubble is drawn with BitmapCreator. Extracting the image from BBCodeView is not trivial. See the code. The code is implemented in the Chat class which is shared between the three projects. BCTextEngine: https://www.b4x.com/android/forum/threads/106207/#content Attachments Chat.zip Chat.zip 259.1 KB · Views: 2,727 Click to expand...
Example of implementing a chat layout. It is based on xCustomListView. The text is created with a hidden BBCodeView (BCTextEngine) and the bubble is drawn with BitmapCreator. Extracting the image from BBCodeView is not trivial. See the code. The code is implemented in the Chat class which is shared between the three projects. BCTextEngine: https://www.b4x.com/android/forum/threads/106207/#content
M Mike1970 Well-Known Member Licensed User Longtime User Jan 27, 2020 #2 Great Job. A small question: i tried to change the properties of the TextField in the designer, but then when the code runs, it reset to a white rectangle. How can i change the design?
Great Job. A small question: i tried to change the properties of the TextField in the designer, but then when the code runs, it reset to a white rectangle. How can i change the design?
Erel B4X founder Staff member Licensed User Longtime User Jan 27, 2020 #3 Mike1970 said: i tried to change the properties of the TextField in the designer Click to expand... What have you changed? There is no TextField in this example. It is a B4XFloatTextField. Mike1970 said: but then when the code runs, it reset to a white rectangle Click to expand... I don't understand what you mean. Better to post a screenshot. Mike1970 said: How can i change the design? Click to expand... I don't see how we can answer this question. For further discussion please start a new thread in the questions forum and make sure to include all relevant information.
Mike1970 said: i tried to change the properties of the TextField in the designer Click to expand... What have you changed? There is no TextField in this example. It is a B4XFloatTextField. Mike1970 said: but then when the code runs, it reset to a white rectangle Click to expand... I don't understand what you mean. Better to post a screenshot. Mike1970 said: How can i change the design? Click to expand... I don't see how we can answer this question. For further discussion please start a new thread in the questions forum and make sure to include all relevant information.
LucaMs Expert Licensed User Longtime User Jan 27, 2020 #4 Mike1970 said: Great Job. A small question: i tried to change the properties of the TextField in the designer, but then when the code runs, it reset to a white rectangle. How can i change the design? Click to expand... For the moment you can change it in the Initialize routine of the Chat class - added one last line: B4X: Copy Public Sub Initialize (Parent As B4XView) Parent.LoadLayout("1") Engine.Initialize(Parent) bc.Initialize(300, 300) TextField.NextField = TextField TextField.mBase.Color = xui.Color_LightGray ' <-------- End Sub Then you will get a better answer P.S. Erel replied simultaneously
Mike1970 said: Great Job. A small question: i tried to change the properties of the TextField in the designer, but then when the code runs, it reset to a white rectangle. How can i change the design? Click to expand... For the moment you can change it in the Initialize routine of the Chat class - added one last line: B4X: Copy Public Sub Initialize (Parent As B4XView) Parent.LoadLayout("1") Engine.Initialize(Parent) bc.Initialize(300, 300) TextField.NextField = TextField TextField.mBase.Color = xui.Color_LightGray ' <-------- End Sub Then you will get a better answer P.S. Erel replied simultaneously