B4A Tutorial [B4X] [XUI] CustomListView - lazy loading / virtualization - Erel    Nov 16, 2023   (38 reactions) You need to remember that you can no longer access UI elements of random items. If there is any state that needs to be preserved then you should add it to the custom type that is used as the item's value. As an example we will change the content color whenever an item is clicked: Type CardData (Ti B4A Tutorial Working with Calendars using ContentResolver (Query, Insert, Update, Delete) - DonManfred (first post)    Dec 11, 2018   (1 reaction) Updating an Event.
Using the EventID you just can fill a ContentValues with all Values you want to change.
dim Value as int = 1334 ' EventID
Dim selectionArgs() As String = Array As String(Value)
Dim val As ContentValues
val.Initialize
val.PutString(econ.TITLE,"Some new Titl B4A Question add a new calendar to the device's calendar - SMOOTSARA    May 09, 2020 "xxxxx Calendar") ContentValues1.PutInteger(G_CalendarConstants.CALENDAR_COLOR,-3144201) ContentValues1.PutInteger(G_CalendarConstants.CALENDAR_ACCESS_LEVEL,200) ContentValues1.PutInteger(G_CalendarConstants.SYNC_EVENTS,1) ContentValues1.PutString(G_CalendarConstants.CALENDAR_TIME_ZO B4A Code Snippet Add image to Gallery Android 5 - 10+ - Erel    Sep 06, 2020   (15 reactions) Depends on: Phone, JavaObject and ContentResolver libraries Sub AddBitmapToGallery (In As InputStream, TargetName As String, MimeType As String) Dim p As Phone Dim ctxt As JavaObject ctxt.InitializeContext If p.SdkVersion >= 29 Then Dim cr As ContentResolver cr.Init B4A Library [B4X] RangeDownloader - resumable downloads - Gabino A. de la Gala (first post)    Aug 12, 2021   (2 reactions) I had to modify the class to get download the file. The head.Response.ContentLength always returns 0. Public Sub Download (Dir As String, FileName As String, URL As String, Tracker As RangeDownloadTracker) As ResumableSub Dim head As HttpJob head.Initialize("", Me) head.Head(URL) Wait For (hea Bug? Issues with B4A/B4J HttpJob.Response.ContentLength - Erel (first post)    Apr 01, 2024   (1 reaction) This is the behavior of the underlying OkHttp SDK.
I've used this code in the very useful RangeDownloader module, to get headers values:
Private Sub GetCaseInsensitiveHeaderValue (job As HttpJob, Key As String, DefaultValue As String) As String
Dim headers As Map = job.Response.GetHeaders
B4A Question How to insert an image thumbnail into mediastore? - DonManfred (first post)    Jun 28, 2019   (1 reaction) https://www.b4x./?query=ContentValues
Dim values As ContentValues
Dim uri1 As Uri
uri1.Parse("content://com.android.contacts/raw_contacts") ' adapt. this is from an example
values.Initialize
values.PutNull("account_name")
values.PutNull("account_type")
Dim rawUri As Uri = cr.In Beta Playground ContentProvider (simple database for all your apps (call it a devicekvs)) - DonManfred    Jan 31, 2019   (13 reactions) Code to write a Dataset to the Provider: Sub Globals 'These global variables will be redeclared each time the activity is created. 'These variables can only be accessed from this module. Private prov As DataProvider Private cr As ContentResolver End Sub Dim m As Map = CreateMa B4A Question CRC16A problrem - aeric (first post)    Jan 31, 2023   (1 reaction) tmp, "0" & tmp)
Dim content3 As String
Dim m As String
If cashvalue = 0 Then
content3 = "5303764" & "5802TH"
m = content1 & content3 & "6304"
Else
content3 = "5802TH" & "5303764"
'm = content1 & content3 & content2 & cashmoney & "6304"
m = content1 & content2 & cashmoney & conten B4A Library [library] ContentResolver - Erel    Feb 23, 2016   (5 reactions) Note that we use LIKE in the selection. Sub UpdateStarred (Name As String, Starred As Boolean) Dim u As Uri u.Parse("content://com.android.contacts/contacts") Dim values As ContentValues values.Initialize values.PutBoolean("starred", Starred) Log(cr.Update(u, values, "display_name Page: 1   2   3   4   5   6   7   Powered by ColBERT |