[android-developers] Re: abstract Uri?

2012-10-05 Thread Lew
Indicator Veritatis wrote: You question the 'naturalness' of his desire to use 'new', but you don't seem to notice: you have merely moved the question, not answered it. Of course it Actually, I did answer it. is 'unnatural' to call 'new' on an abstract class, but he was asking why

[android-developers] Re: abstract Uri?

2012-10-04 Thread RichardC
Did you look at Uri.Builder? http://developer.android.com/reference/android/net/Uri.Builder.html On Thursday, October 4, 2012 6:59:02 PM UTC+1, bob wrote: Can someone help me understand why the android.net.Uri class is abstract? Naturally, I want to do something like this: Uri uri = new

[android-developers] Re: abstract Uri?

2012-10-04 Thread RichardC
and also this method: http://developer.android.com/reference/android/net/Uri.html#parse(java.lang.String) On Thursday, October 4, 2012 6:59:02 PM UTC+1, bob wrote: Can someone help me understand why the android.net.Uri class is abstract? Naturally, I want to do something like this: Uri uri

[android-developers] Re: abstract Uri?

2012-10-04 Thread Lew
bob wrote: Can someone help me understand why the android.net.Uri class is abstract? You got the what, now for the why. Naturally, I want to do something like this: I question the naturalness of that desire. Uri uri = new Uri(http://www.example.com/file.mp4;); It's more natural,

[android-developers] Re: abstract Uri?

2012-10-04 Thread bob
Looks like the answer can be understood partly by looking at these functions: 425 public static Uri parse(String uriString) { 426 return new StringUri(uriString); 427 } 439 public static Uri fromFile(File file) { 440 if (file == null) { 441 throw

[android-developers] Re: abstract Uri?

2012-10-04 Thread Indicator Veritatis
You question the 'naturalness' of his desire to use 'new', but you don't seem to notice: you have merely moved the question, not answered it. Of course it is 'unnatural' to call 'new' on an abstract class, but he was asking why it was made abstract in the first place. You did not address this.