[android-developers] OnMesure() Issue with Expandable List

2014-01-22 Thread Dhamodharan S
Hi Team 

I have tried three level expandable list concepts in android. But in my 
case three level list is based on some parent level. for that purpose i 
checked group position values and then bind custom exapandable listview 
according to that.
I have attached my sample code here

Code:


@Override
public View getChildView(int arg0, int arg1, boolean arg2, View arg3,
ViewGroup arg4) {
// TODO Auto-generated method stub

/*if(arg3==null)
{
arg3=layout.inflate(R.layout.row, null);

}

((TextView)arg3).setText(child.get(arg0));*/
if(arg0==1)
{
CustExpListview subObjects= new CustExpListview(ctx);
  
MySecondAdapter adapt = new MySecondAdapter(layout,child1, child2);

//adapt.setinflator((LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE),
 
MainActivity.this);
subObjects.setAdapter(adapt);

result = "Expand";
return subObjects;
}
else
{
if(arg3==null)
{
arg3=layout.inflate(R.layout.row, null);

}

((TextView)arg3).setText(child1.get(arg1));

result = "Other";
return arg3;
}
}


My Problem is like when i click any parents its working fine at first time. 
But after selecting first parent afterwards i clicked any other parents in 
the sense it will crash my app. It shows error like

01-22 10:02:38.226: E/AndroidRuntime(1459): FATAL EXCEPTION: main
01-22 10:02:38.226: E/AndroidRuntime(1459): java.lang.ClassCastException: 
com.example.simpleexapndalelist2.CustExpListview
01-22 10:02:38.226: E/AndroidRuntime(1459): at 
com.example.simpleexapndalelist2.MyFirstAdapter.getChildView(MyFirstAdapter.java:84)
01-22 10:02:38.226: E/AndroidRuntime(1459): at 
android.widget.ExpandableListConnector.getView(ExpandableListConnector.java:450)
01-22 10:02:38.226: E/AndroidRuntime(1459): at 
android.widget.AbsListView.obtainView(AbsListView.java:1294)
01-22 10:02:38.226: E/AndroidRuntime(1459): at 
android.widget.ListView.measureHeightOfChildren(ListView.java:1198)
01-22 10:02:38.226: E/AndroidRuntime(1459): at 
android.widget.ListView.onMeasure(ListView.java:1109)
01-22 10:02:38.226: E/AndroidRuntime(1459): at 
android.view.View.measure(View.java:8171)
01-22 10:02:38.226: E/AndroidRuntime(1459): at 
android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:578)
01-22 10:02:38.226: E/AndroidRuntime(1459): at 
android.widget.RelativeLayout.onMeasure(RelativeLayout.java:362)
01-22 10:02:38.226: E/AndroidRuntime(1459): at 
android.view.View.measure(View.java:8171)
01-22 10:02:38.226: E/AndroidRuntime(1459): at 
android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)
01-22 10:02:38.226: E/AndroidRuntime(1459): at 
android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
01-22 10:02:38.226: E/AndroidRuntime(1459): at 
android.view.View.measure(View.java:8171)
01-22 10:02:38.226: E/AndroidRuntime(1459): at 
android.widget.LinearLayout.measureVertical(LinearLayout.java:526)
01-22 10:02:38.226: E/AndroidRuntime(1459): at 
android.widget.LinearLayout.onMeasure(LinearLayout.java:304)
01-22 10:02:38.226: E/AndroidRuntime(1459): at 
android.view.View.measure(View.java:8171)
01-22 10:02:38.226: E/AndroidRuntime(1459): at 
android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)
01-22 10:02:38.226: E/AndroidRuntime(1459): at 
android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
01-22 10:02:38.226: E/AndroidRuntime(1459): at 
android.view.View.measure(View.java:8171)
01-22 10:02:38.226: E/AndroidRuntime(1459): at 
android.view.ViewRoot.performTraversals(ViewRoot.java:801)
01-22 10:02:38.226: E/AndroidRuntime(1459): at 
android.view.ViewRoot.handleMessage(ViewRoot.java:1727)
01-22 10:02:38.226: E/AndroidRuntime(1459): at 
android.os.Handler.dispatchMessage(Handler.java:99)
01-22 10:02:38.226: E/AndroidRuntime(1459): at 
android.os.Looper.loop(Looper.java:123)
01-22 10:02:38.226: E/AndroidRuntime(1459): at 
android.app.ActivityThread.main(ActivityThread.java:4627)
01-22 10:02:38.226: E/AndroidRuntime(1459): at 
java.lang.reflect.Method.invokeNative(Native Method)
01-22 10:02:38.226: E/AndroidRuntime(1459): at 
java.lang.reflect.Method.invoke(Method.java:521)
01-22 10:02:38.226: E/AndroidRuntime(1459): at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
01-22 10:02:38.226: E/AndroidRuntime(1459): at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
01-22 10:02:38.226: E/AndroidRuntime(1459): at 
dalvik.system.NativeStart.main(Native Method)


If find solution kindly give us.


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, 

[android-developers] H.264 support using Media Recoder

2013-12-05 Thread Dhamodharan S
Hi Team

I am going to implement video recoding app. In that I found there are ways 
to specify video encoding method and output file formats specification and 
also the option for quality_high and quality_low. In this Android Developer 
docs specified that the API version 8 or higher no need to specify 
videocodec and output file format separately while we specify the video 
quality as HIGH. Only prior to 2.2 have to specify those formats.

Here is the link

http://developer.android.com/guide/topics/media/camera.html

My Question is 

1) if i specified the video quality as high then what will be the default 
video codec and audio codec types

2) If suppose i need to record only through AAC and H.264. How to do that...

3) Is it possible to change the framerate and bitrate dynamically at runtime

4) Any Samples/References..

Regards
S.Dhamodharan


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] Re: Highlight elements in Webview with Text to Speech

2013-09-19 Thread Dhamodharan S

I would like to develop app like web page reader concept in android. But i 
feel it was bit difficult to find element from web pages. As far as i know 
it is possible by implementing by using java script functionality. kindly 
share your knowledge for further

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] Highlight elements in Webview with Text to Speech

2013-09-19 Thread Dhamodharan S
 

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] Re: Highlight elements in Webview with Text to Speech

2013-09-19 Thread Dhamodharan S


Hi
>
 

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.