Android get custom R.xml attribute -


I have a file in R.xml.test that looks like this

  & Lt; ? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Resources & gt; & Lt; Scale factor = "1.00" /> & Lt; / Resources & gt;  

What is the proper way to attribute the scale factor ?

I'm thinking something like this:

  InputStream inputstream = resources.getAssets (). Open ("test.xml"); XmlPullParserFactory xmlPullParserFactory = XmlPullParserFactory.newInstance (); XmlPullParserFactory.setNamespaceAware (true); XmlResourceParser = xmlPullParserFactory.newPullParser (); XmlResourceParser.setInput (inputstream, "UTF-8"); ' 

riff

  // Unless you Loop Parser No Tag Scale Parser.Get Alt Value (empty, "factor")  

Comments