[android-developers] Problem positionning the MediaController with setAnchorView

2013-10-10 Thread Jean-Luc TRESSET
Hello !
Since 24 hours I'm trying to set the Anchor view of my MediaControler 
without success.

My VideoView is embedded in a bigger application but even with a very 
simple testing app I don't understand the problem.

Here is the code of the onCreate of my testing activity : 

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
 final VideoView vv = (VideoView) findViewById(R.id.videoView1);
vv.setVideoURI(Uri.parse(http://192.168.30.188/test.mp4;));

final MediaController mediaController = new 
MediaController(ll.getContext());
vv.setMediaController(mediaController); 
 vv.setOnPreparedListener(new OnPreparedListener() {
 @Override
public void onPrepared(MediaPlayer mp) {
mediaController.setAnchorView(vv);
}
});
vv.requestFocus();

}


And here is my simple layout :

RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android;
xmlns:tools=http://schemas.android.com/tools;
android:layout_width=match_parent
android:layout_height=match_parent
tools:context=.MainActivity 


FrameLayout
android:id=@+id/layout1
  
android:layout_width=218dp
android:layout_height=162dp
android:background=@android:color/holo_purple

VideoView
android:id=@+id/videoView1
android:layout_width=match_parent
android:layout_height=match_parent /

/FrameLayout

/RelativeLayout


It seems that the media controller appears aligned with the bottom of my 
video view, but ever horitzontally centered !!!

I had a look at a lot of stack overflow solutions (more or less good) or 
other site samples and I can't understand  ...

Can anybody help me please ?

-- 
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: java.lang.NoSuchMethodException: setCompatibilityInfo

2013-10-10 Thread Andrew Esh
It looks to me as though you are trying to use a version of 
CompatibilityInfo which existed as late as Android version 2.3.7-r1, but 
does not exist in 4.0.1-r1. The class is still there, but it no longer has 
a public method that takes just one argument. I am guessing that you are 
calling CompatibilityInfo(ApplicationInfo) in *
com.estrongs.android.util.af.a*, and you're running on a later version of 
Android than 2.3.7-r1. Version 4.0.1-r1 has 
CompatibilityInfo(ApplicationInfo, int, int, boolean) as its only public 
constructor method.

Look at GrepCode hits in a google search for that class.

http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.0.1_r1/android/content/res/CompatibilityInfo.java/

On Wednesday, October 9, 2013 11:38:14 AM UTC-5, Ali Helmy wrote:

 Hey mates,

 I get the following error in the middle of running my application 
 (sometimes at the very start, sometimes at the middle of playing with it)

 I do not understand where this is coming from. Any help please?

 */System.err(27115): java.lang.NoSuchMethodException: 
 setCompatibilityInfo [class android.content.res.CompatibilityInfo$1]*



-- 
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] How to display in HH:MM:SS

2013-10-10 Thread Abhilash Baddam
Hi,

I am having two dates with times for example:

String dateStart = 01/14/2012 09:30:55;
String dateStop = 01/15/2012 18:25:54;

SimpleDateFormat format = new SimpleDateFormat(MM/dd/ HH:mm:ss);

Date d1 = null;
Date d2 = null;

d1 = format.parse(dateStart);
d2 = format.parse(dateStop);

When I subtract:  d2 - d1, I want to show the ela[sed time in between the
above two dates in the format in *HH:MM:SS*: like i want the output
something like:
*33:05:01. How can I get in that format..? If anybody is having any idea
please help me out... *

-- 
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.


Re: [android-developers] How to display in HH:MM:SS

2013-10-10 Thread TreKing
On Thu, Oct 10, 2013 at 12:21 PM, Abhilash Baddam 
abhilash.androiddevelo...@gmail.com wrote:

 33:05:01. How can I get in that format..?


This has nothing to do with Android specifically, but ... just use another
SimpleDateFormat ...

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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] Finding Legal Fonts - best practices.

2013-10-10 Thread Nathan
I admit, I am a bit stumped about fonts. It seems to be a legal minefield. 

In this case, it is not a TextView, it is a game engine that can render TTF 
or bitmap fonts. 

I am not going to naively assume that any fonts I can find on my Windows or 
Mac are legal to redistribute. 

It appears that Fonts.com would require a brokered negotiation with the 
designer of the font and, likely, more money than I expect the app to make 
in a year. 

It seems like the only safe route would be to use a royalty free commercial 
use font from here. 
http://www.fontsquirrel.com/
Assuming that someone didn't pirate a font and put it on there. 

Or using Roboto, and risk that it might offend discriminating iOS users in 
the iOS version. Or would they even care?

Nathan

-- 
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.


Re: [android-developers] How to display in HH:MM:SS

2013-10-10 Thread Abhilash Baddam
Hi,

I have tried but I am not getting in that format which I want


On Thu, Oct 10, 2013 at 11:33 PM, TreKing treking...@gmail.com wrote:


 On Thu, Oct 10, 2013 at 12:21 PM, Abhilash Baddam 
 abhilash.androiddevelo...@gmail.com wrote:

 33:05:01. How can I get in that format..?


 This has nothing to do with Android specifically, but ... just use another
 SimpleDateFormat ...


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

 --
 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.


-- 
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: Finding Legal Fonts - best practices.

2013-10-10 Thread Nobu Games
Google Fonts http://www.google.com/fonts is a great library of Open 
Source Fonts.

On Thursday, October 10, 2013 1:13:46 PM UTC-5, Nathan wrote:

 I admit, I am a bit stumped about fonts. It seems to be a legal minefield. 

 In this case, it is not a TextView, it is a game engine that can render 
 TTF or bitmap fonts. 

 I am not going to naively assume that any fonts I can find on my Windows 
 or Mac are legal to redistribute. 

 It appears that Fonts.com would require a brokered negotiation with the 
 designer of the font and, likely, more money than I expect the app to make 
 in a year. 

 It seems like the only safe route would be to use a royalty free 
 commercial use font from here. 
 http://www.fontsquirrel.com/
 Assuming that someone didn't pirate a font and put it on there. 

 Or using Roboto, and risk that it might offend discriminating iOS users in 
 the iOS version. Or would they even care?

 Nathan


-- 
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: How to display in HH:MM:SS

2013-10-10 Thread Nobu Games
Take a look at the 
DateUtilshttp://developer.android.com/reference/android/text/format/DateUtils.htmlclass.
 It provides various elapsed time and time range methods

On Thursday, October 10, 2013 12:21:02 PM UTC-5, abhay_401 wrote:

 Hi,

 I am having two dates with times for example:

 String dateStart = 01/14/2012 09:30:55;
  String dateStop = 01/15/2012 18:25:54;

 SimpleDateFormat format = new SimpleDateFormat(MM/dd/ HH:mm:ss);
   
 Date d1 = null;
 Date d2 = null;
  
  d1 = format.parse(dateStart);
  d2 = format.parse(dateStop);

 When I subtract:  d2 - d1, I want to show the ela[sed time in between the 
 above two dates in the format in *HH:MM:SS*: like i want the output 
 something like: 
 *33:05:01. How can I get in that format..? If anybody is having any idea 
 please help me out... *






-- 
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] ViewPager fragment views data updating issue

2013-10-10 Thread asha b
Hi,

 ViewPager fragment is getting updated with next fragment view data on
display.
How to avoid it?

Thanks

-- 
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] Activity partially offscreen

2013-10-10 Thread bob
Is there a way to push an activity to the right or left so that half of it 
is off the screen?

Thanks.

-- 
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.


Re: [android-developers] Activity partially offscreen

2013-10-10 Thread Siva Kumar
U can use dialog activity or fragments,etc
On Oct 11, 2013 6:22 AM, bob b...@coolfone.net wrote:

 Is there a way to push an activity to the right or left so that half of it
 is off the screen?

 Thanks.

  --
 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.


-- 
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.