Android Question Customdialog2-Problem number X

D

Deleted member 103

Guest
Hi,

here again a problem with Customdialog2.
Does it have to be so or can something be changed in the library?

My Code:
B4X:
Sub ShowHistory
    Dim cd As CustomDialog2
    Dim wbview As WebView
    wbview.Initialize("")
    wbview.LoadHtml(File.GetText(File.DirAssets, mLanguage.getStr("HistoryFile")))
    wbview.ZoomEnabled = False
    cd.AddView(wbview,85%x,60%y)
    cd.Show(Application.LabelName,"OK","","",LoadBitmap(File.DirAssets,"icon_48_48.png"))
End Sub

View with "<uses-sdk android:minSdkVersion="9" />"
customdialog_sdk_9.png


View with "<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="22"/>"
customdialog_sdk_14-22.png


I know I change my code as well, but that does not look so good.
B4X:
Sub ShowHistory
    Dim cd As CustomDialog2
    Dim wbview As WebView
    wbview.Initialize("")
    wbview.LoadHtml(File.GetText(File.DirAssets, mLanguage.getStr("HistoryFile")))
    wbview.ZoomEnabled = False
    cd.AddView(wbview,60%x,60%y)
    cd.Show(Application.LabelName,"OK","","",LoadBitmap(File.DirAssets,"icon_48_48.png"))
End Sub

View with "<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="22"/>"
customdialog_sdk_14-22_neu.png
 
D

Deleted member 103

Guest
I recommend you to use a regular panel and show it above all other views. It will be simpler and you will have full control.
Thank Erel, on this idea, I'm already come. :(
The question is: why does it no longer work, is this feature no longer supported by Android?
 
Upvote 0
D

Deleted member 103

Guest
When targetSdkVersion is smaller than 14, the selected theme is the Android 2.x theme. Dialogs look a bit different based on the selected theme.
All right, then it's time to say goodbye to this "CustomDialog2". :(
Nothing remains forever! ;)
 
Upvote 0
Top