I wanted to create a method that saying the name of the array
reads it
for more efficience you know?
I mean I have 3 arrays and I need stuff of those
Then when I press on an item it returns this name and then I call this method and I want to parse the data of that name
And then I add those with RedCajero etc... but it laggs a little bit I guess is because I'm putting the int with the name like I'm calling for example R.Drawable + String, and I think it laggs :S
But maybe it's because I do this : public static int getId(String resourceName, Class<?> c) { try { Field idField = c.getDeclaredField(resourceName); return idField.getInt(idField); } catch (Exception e) { throw new RuntimeException("No resource ID found for: " + resourceName + " / " + c, e); } }
The problem that I have is that I only have a `RecyclerView` right? then the steps are : RelativeLayout rt = findView Then Add a TextView programmatically when query isn't equal, and autommatically it puts the TextView on the top of the Activity, then I have to play with margins, gravity, etc... and it works... I don't know if it's the best way to do it, but it does the function :P
Otherway could be creating a new xml and then setContentView(R.layout.theXml);