Android Question [SOLVED]XmlLayoutBuilder Question ?

nanjidusan

Member
Licensed User
I want clear the edittext's underline , so I use xmlLayoutBuilder to load a xml .
This is my code :
B4X:
<EditText
     android:id="@+id/edittext"
     android:layout_width="260dip" android:layout_height="50dip"
     android:textCursorDrawable="@null"
     android:background="#00000000"
     android:tag="et">
</EditText>

pnlPage1.Initialize("pnlPage1")
Activity.AddView(pnlPage1,10dip,10dip,100%x,PanelHeight)
pnlPage1.LoadLayout("main")
Private x As XmlLayoutBuilder
x.LoadXmlLayout(pnlPage1,"layout1")
et.Initialize("et")
et=xml.GetView("edittext")
et.RemoveView
pnlPage1.AddView(et,5dip,0,100%x,10%y)

When I run the program , I found the event will not happenning .
Than I found out the problem was that I used this code :
B4X:
#Extends: android.support.v7.app.AppCompatActivity
When I remove it , the event woks well , but I lose the application title .
Why ? How to solve it ?
 
Last edited:
Top