Questions tagged [resource-id]
51 questions
7
votes
4 answers
Why are string identifiers used to access resource data?
I'm working a project to replace a Resource Management system (QuickTime Resource Manager on Mac and Windows) that has been deprecated and I have been using the current model that Qt uses where data is retrieved from the resource file using a string…

Lyndsey Ferguson
- 5,306
- 1
- 29
- 46
7
votes
2 answers
REST numeric or string resource identifiers?
I'm doing some research to help me develop a REST API and this is one topic I haven't seen discussed in depth anywhere.
If I have a user in the system, is it better to identify the user using a numeric identifier
/users/1
Or using a string…

James McMahon
- 48,506
- 64
- 207
- 283
6
votes
4 answers
Android : set background of layout using image path
I want to put an image as background of a Layout.
First I am creating a drawable : Drawable d = Drawable.createFromPath("pathToImageFile");
In API level 8 layout.setBackground( d ) is not supported AND layout.setBackgroundDrawable( d ) is…

ZZeyaNN
- 538
- 8
- 13
5
votes
2 answers
Android: Understand resource-id in R.java
Does anybody know anything about the internals of resource-id and R.java, or could at least reference me to read some more about it?
What is the meaning of the resource-ids? Are they some kind of addresses in the apk? Where are they saved in the…

Ravit D
- 907
- 9
- 27
4
votes
2 answers
How to get Android resource ID from dynamically-created (in Java) layer-list / LayerDrawable?
The "solution #2 (dynamic)" in this question/answer post:
overlay two images in android to set an imageview
is very close to what I want to do, which is to dynamically create a layer-list (for a status bar notification icon, I want to build-up my…

scary alien
- 43
- 1
- 1
- 6
3
votes
2 answers
How to find the resource id for a textfield in Flutter?
I would like to register the test account credentials for the Pre-launch report in Google Play. In addition to the username and password, I need to provide resource IDs.
I would like to know how I could obtain the resource ID in a Flutter project to…

Sandra
- 31
- 3
3
votes
2 answers
Android XML: Set Resource id as View's tag in XML layout file
I want to specify a relationship between two views in my Android XML layout file. Here is what I want to do:
...
…

androidnotgenius
- 417
- 1
- 7
- 17
2
votes
0 answers
In Terraform, is it possible to change the casing of values?
I have an ID of a resource and the ID states that the value is known as "/Subscriptions/xxxxxxx-xxxxxx-xxxxxx-xxxxx/" and when leveraging the data resource, "azurerm_subscription "current" ", to get the current subscription data, I get the output of…

aseb
- 274
- 2
- 11
2
votes
0 answers
Why is resource id different at runtime than in editor?
Using Android Studio 4.1
I have a layout with a toolbar. I refer to the toolbar resource id in Java as R.id.mytoolbar for example. In the Java editor, when I hover over the R.id.mytoolbar reference, the popup displays something like:
public static…

sb4
- 169
- 1
- 6
2
votes
1 answer
I need to add notification sound dynamically from raw folder - Android
I have a "notificationsound.mp3" named file in my raw folder, along with many other sound files. I need to dynamically add the sound files to my generated notifications . My approach included adding finding the resource id of the raw/soundfile ,and…

lazy rabbit
- 1,076
- 3
- 11
- 29
2
votes
1 answer
How to Find Resource Id for Google Drive File
I was looking through the Android Google Drive API and understood its overall workings but I was wondering what exactly the resource id of a file or folder is. Can this only be found for a query or is can this be found simply through looking at the…

Evan
- 287
- 4
- 14
2
votes
3 answers
How to programmatically get resource Id for android.R.id.content?
I'm trying to do this in a library project...
int containerViewId = getResources().getIdentifier("content", "android.R.id", getPackageName());
getFragmentManager().beginTransaction().replace(containerViewId, new SettingsFragment()).commit();
But I…

CaptAmericode
- 83
- 1
- 4
2
votes
2 answers
ArrrayAdapter requires resourceID to be a text view
The goal of this project of mine is to update a spinner dynamically with user input. Unfortunately I'm losing this battle. Logcat keeps throwing the resource ID error at me, HOWEVER, I don't understand why it's only thrown on button press, wouldn't…

Eric Anthony
- 927
- 1
- 8
- 15
2
votes
1 answer
Separate PHP processes using same ssh2.sftp resource
I am using the PECL ssh2 module to output XML data to a sftp server. I have two entirely separate PHP scripts which gather different data and send the output to different file on the stfp server.
CUSTOMER EXPORT:
$conn = ssh2_connect(SFTP_SERVER,…

Gordy
- 91
- 1
- 8
1
vote
1 answer
Android: How can I get Battery Icon Resource ID or full file path/name in Status Bar?
I want to examine whether the battery icon and level in status bar are changed correctly, so I want to get the Battery Icon Resource ID or the full file path/name in Status Bar.
I tried to use the Battery Manager to get the icon's resource…

Ywis
- 180
- 1
- 4
- 13