Android Question app crash when inpùt text in EditText

rkxo

Active Member
Licensed User
Longtime User
Hello,
I have a problem in which the application closes unexpectedly. Happens when load layout this has an EditText and edit text or click this EditText named "ComentText" very quickly while this is loaded a value by code. I tried to capture the failure with a "try catch" but it is not possible since the entire application is closed.Any idea?

emulator bug report

the code where I enter the text is this

B4X:
Activity.LoadLayout("ComentText")
                        'ACToolBarLight1.Visible=false
               
                        LabelComentClick.Text=Trans.GetText("175")
                        ComentText.Hint=Trans.GetText("176")
                        LabelComentClick.TextSize=14
                        ComentText.Hint=""
                        ComentText.Text=lbl.Text
 

DonManfred

Expert
Licensed User
Longtime User
Based on the error it is not related to any textinput.
It is relatd to missing resources.
Hard to give advice as you did not uploaded a project which shows the issue.

What library are you using (added latest)? I guess you missed something when implementing in your app.
 
Upvote 0

rkxo

Active Member
Licensed User
Longtime User
Yes, it's very strange, I also thought the same thing but it only happens when I load the layout with a text and I click that text very quickly.I try search missing resources
thanks DonManfred.
 
Upvote 0

rkxo

Active Member
Licensed User
Longtime User
hi,
I'm in old theme.
There is some way to use the theme 10 sdk environment. with tabs with icons and text (tabhost). in a 28 sdk. old theme type?

my manifest .
B4X:
'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: http://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
'<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="10"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)

SetActivityAttribute(main, android:windowSoftInputMode, adjustResize|stateHidden) 
SetManifestAttribute("android:installLocation", "auto")
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
SetApplicationAttribute(android:largeHeap, "true")
'SetApplicationAttribute(android:theme, "@style/Theme.Herustyle")
'End of default text.
'SetActivityAttribute(Main, android:theme, "@style/DefaultTheme")
'SetApplicationAttribute(android:theme, "@style/DefaultTheme")

'SetApplicationAttribute(android:theme, "@android:style/Theme.Holo")
'SetApplicationAttribute(android:theme, "@android:style/Theme.Holo.Light")
AddPermission("android.permission.SEND_SMS")
AddPermission("android.permission.GET_ACCOUNTS")
AddPermission("android.permission.INTERNET")
AddPermission("android.permission.ACCESS_NETWORK_STATE")
AddPermission(android.permission.MODIFY_AUDIO_SETTINGS)
AddPermission(android.permission.RECORD_AUDIO)
AddPermission(android.permission.READ_EXTERNAL_STORAGE)
AddPermission(android.permission.WRITE_EXTERNAL_STORAGE)
AddPermission(android.permission.ACCESS_WIFI_STATE)
AddPermission(android.permission.CHANGE_WIFI_STATE)
AddPermission(android.permission.ACCESS_FINE_LOCATION)
AddPermission(android.permission.ACCESS_COARSE_LOCATION)
AddPermission(android.permission.MANAGE_DOCUMENTS)
AddPermission(android.permission.USE_FINGERPRINT)
'Samsung
AddPermission(com.sec.android.provider.badge.permission.READ)
AddPermission(com.sec.android.provider.badge.permission.WRITE)
'HTC
AddPermission(com.htc.launcher.permission.READ_SETTINGS)
AddPermission(com.htc.launcher.permission.UPDATE_SHORTCUT)
'Sony
AddPermission(com.sonyericsson.home.permission.BROADCAST_BADGE)
AddPermission(com.sonymobile.home.permission.PROVIDER_INSERT_BADGE)
'Apex
AddPermission(com.anddoes.launcher.permission.UPDATE_COUNT)
'Solid
AddPermission(com.majeur.launcher.permission.UPDATE_BADGE)
'Huawei
AddPermission(com.huawei.launcher3.permission.READ_SETTINGS)
AddPermission(com.huawei.launcher3.permission.WRITE_SETTINGS)
AddPermission(com.huawei.launcher2.permission.READ_SETTINGS)
AddPermission(com.huawei.launcher2.permission.READ_SETTINGS)
AddPermission(com.huawei.android.launcher.permission.CHANGE_BADGE)
AddPermission(com.huawei.android.launcher.permission.WRITE_SETTINGS)
AddPermission(com.huawei.android.launcher.permission.READ_SETTINGS)
'Zuk
AddPermission(android.permission.READ_APP_BADGE)
'Oppo
AddPermission(com.oppo.launcher.permission.READ_SETTINGS)
AddPermission(com.oppo.launcher.permission.WRITE_SETTINGS)
'EvMe
AddPermission(me.everything.badger.permission.BADGE_COUNT_READ)
AddPermission(me.everything.badger.permission.BADGE_COUNT_WRITE)

AddManifestText(
<uses-feature android:name="android.hardware.location" android:required="true" />
<uses-feature android:name="android.hardware.location.gps" android:required="false" />
)

AddReceiverText(PoolGps,
<intent-filter>
    <action android:name="com.rootsoft.rsfluffylocation.littlefluffylocationlibrary.LOCATION_CHANGED" />
    <action android:name="com.rootsoft.rsfluffylocation.littlefluffylocationlibrary.LOCATION_CHANGED_TICK" />
</intent-filter>)

'AddApplicationText(
'<service android:name="com.littlefluffytoys.littlefluffylocationlibrary.LocationBroadcastService" />
'    <receiver android:name="com.littlefluffytoys.littlefluffylocationlibrary.StartupBroadcastReceiver" android:exported="true">
'        <intent-filter>
'            <action android:name="android.intent.action.BOOT_COMPLETED" />
'        </intent-filter>
 '   </receiver>
'<receiver android:name="com.littlefluffytoys.littlefluffylocationlibrary.PassiveLocationChangedReceiver" android:exported="true" />
')
AddApplicationText(<meta-data
    android:name="com.google.android.gms.version"
    android:value="@integer/google_play_services_version" />)
  
    SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.

AddReceiverText(eu.dgconsulting.appupdating.newinst2,
  <intent-filter>
  <action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
    <data android:scheme="package" />
  </intent-filter>)

' Starting from Android 7 (API 24) we pass a file uri using a FileProvider
AddApplicationText(
  <provider
  android:name="android.support.v4.content.FileProvider"
  android:authorities="$PACKAGE$.provider"
  android:exported="false"
  android:grantUriPermissions="true">
  <meta-data
  android:name="android.support.FILE_PROVIDER_PATHS"
  android:resource="@xml/provider_paths"/>
  </provider>
)
CreateResource(xml, provider_paths,
   <files-path name="name" path="shared" />
)

AddManifestText(<uses-permission
   android:name="android.permission.WRITE_EXTERNAL_STORAGE"
   android:maxSdkVersion="19" />
)

AddPermission(android.permission.REQUEST_INSTALL_PACKAGES)

thanks
 

Attachments

  • tabhost.png
    133.4 KB · Views: 223
Last edited:
Upvote 0

rkxo

Active Member
Licensed User
Longtime User
how i emulate android 2 theme in sdk theme. Is possible?
in the designer there is the possibility of using old theme. Is there no option to use the old theme in a 28 sdk?
 
Upvote 0

rkxo

Active Member
Licensed User
Longtime User
with csbuilder can i to change icon and text position?.
I want to put the text below the icon. it's possible?

how this image

thanks
 

Attachments

  • tabhost.png
    133.4 KB · Views: 173
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…