Dear Thesalan ,
thanks to answer ....
Thesalan right now i am working web services layout and widgets want
to generate dynamically .so i tried android support JSON
String json = "{\"EditText\" :{\"id\":\"edit\", \"data\": \"Click
Here\", \"size\": 200, \"style\": \"bold\", \"name\": \"text1\",
\"vOffset\": 100,\"hOffset\": 250,\"alignment\": \"center\" })}";
json object created this json object converted to string
JSONObject jsonObj = null;
{
try {
jsonObj = new JSONObject(json);
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace(); }
try {
JSONObject menu = jsonObj.getJSONObject("EditText");
String id=menu.getString("id");
String data =menu.getString("data");
String size =menu.getString("size");
String style =menu.getString("style");
String vOffset =menu.getString("vOffset");
String hOffset =menu.getString("hOffset");
String alignment =menu.getString("alignment");
String jsonresult = "id: " + id +"data:"+data+"size:"+size
+"style:"+style+"voffset:"+vOffset+"hoffset:"+"alignment:"+alignment ;
//MyView(jsonresult);
}
catch(Exception e){
e.printStackTrace();
}
using this string want to pass one surfaceview i dont know how can i pass
surfaceview strings
surface view only draw method it will support only canvas so how can i
pass string here ..pl reply
On Tue, Aug 28, 2012 at 3:18 PM, Thesalan <[email protected]> wrote:
> Why do you want to use JSON?
>
> Android use XML, not JSON..
>
> Le mardi 28 août 2012 11:42:07 UTC+2, parthi a écrit :
>
>> how can i create dynamically widgets in android using json parser is it
>> possible to create
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en