Android Question Set Title and Center PreferencesDialog

ddefrain

Member
Licensed User
Longtime User
Hi how can I Set the title and Center the PreferencesDialog to screen?

Thank's in advance

*******Manifest*****
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="29"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.LightTheme)
'End of default text.



********Buld*****
B4A Versión: 10.2
Java Versión: 11
Parseando código. (0.16s)
Building folders structure. (4.02s)
Compilando código. (2.69s)

El fichero ObfuscatorMap.txt fue creado en la carpeta Objects.
Compilado códigos de diseños. (0.09s)
Organizando librerías. (0.00s)
(AndroidX SDK)
Generando el fichero R. (0.00s)
Compilando el código Java generado. (2.34s)
Convirtiendo byte code a dex optimizado. (5.19s)
Empaquetando ficheros. (1.38s)
Copiando los recursos de librerias (0.00s)
Firmando fichero de paquete (clave de depuración) (6.13s)
ZipAlign file. (2.92s)
Instalando archivo al dispositivo. (0.13s)
Instalando con B4A-Bridge.
Completado con éxito
 

Attachments

  • pref.zip
    9.1 KB · Views: 221

ddefrain

Member
Licensed User
Longtime User
The title is set when you initialize the object. You can also set it with PrefDialog.Title.

Thank's Erel.
I'd noticed that if the height is greater than 40% the title is not showing

I've updated the sample project and in landscape mode the title is not showing at all

Thank's in advance
Regards
 

Attachments

  • pref.zip
    9.2 KB · Views: 222
  • Hight40Portrait.png
    Hight40Portrait.png
    29.3 KB · Views: 262
  • Height50Portrait.png
    Height50Portrait.png
    32 KB · Views: 270
  • Height40Landscape.png
    Height40Landscape.png
    28.3 KB · Views: 243
  • Height50Landscape.png
    Height50Landscape.png
    30 KB · Views: 245
Last edited:
Upvote 0

ddefrain

Member
Licensed User
Longtime User
That's true and is by design. It happens when there isn't enough room for the keyboard so the title is removed.
Thanks Erel I Will end it setting it up like this

B4X:
prefdialog.Initialize(Activity, "Editing Data", 90%x, 40%y)
 
Last edited:
Upvote 0
Top