Compiling against a *REAL* android.jar in eclipse???

by Dianne Hackborn » Tue, 28 Apr 2009 11:30:33 GMT


Sponsored Links
 orrect.  Don't do this.  Your code will break in the future.  That is why
these fields are hidden.

For scrolling, you can use the method to set the scroll position.

For the background, if the normal background image doesn't do what you want,
then implement your own background drawing. Clearing and re-setting the
background field is clearly relying on implementation details that can
change in future versions.

If there are specific features you find are missing, you can file feature
requests or (more likely to have a result) submit patches to add those
features. For the latter, though, keep in mind that we are very restrictive
on accepting changes to fundamental parts of the system like this.

On Mon, Apr 27, 2009 at 8:13 PM, Peter Carpenter <
peter.carpen...@skytechnologies.com> wrote:



--
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails. All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~---------~--~----~------------~-------~--~----~



Compiling against a *REAL* android.jar in eclipse???

by Peter Carpenter » Tue, 28 Apr 2009 11:50:46 GMT


 hanks Dianne, makes sense.



With the scrolling - I wanted to essentially copy the code used for
vertical scrolling and implement it for horizontal (like others have
done) However this won't compile due to inability to access the
protected member variables. There was no function that would
setScrollX() without calling invalidate() etc. But, this component will
apparently exist in 1.5, so there's light at the end of the tunnel for
this one.





With regards to the button example though, it looks like I can't win
either way ...

* If I implement my own background drawing, it won't be compatible with
future versions (Because I can't reference the existing button images
and therefore if the images change in later versions I can't get them)

* If I modify the code and the mechanism for drawing buttons changes, it
will break.



Looks like the best thing to do is wrapper the StateListDrawable in this
case then. :-(



Cheers,



Peter.



________________________________

From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Dianne
Hackborn
Sent: Tuesday, 28 April 2009 1:30 PM
To: android-developers@googlegroups.com
Subject: [android-developers] Re: Compiling against a *REAL* android.jar
in eclipse???



Correct. Don't do this. Your code will break in the future. That is
why these fields are hidden.

For scrolling, you can use the method to set the scroll position.

For the background, if the normal background image doesn't do what you
want, then implement your own background drawing. Clearing and
re-setting the background field is clearly relying on implementation
details that can change in future versions.

If there are specific features you find are missing, you can file
feature requests or (more likely to have a result) submit patches to add
those features. For the latter, though, keep in mind that we are very
restrictive on accepting changes to fundamental parts of the system like
this.

On Mon, Apr 27, 2009 at 8:13 PM, Peter Carpenter
<peter.carpen...@skytechnologies.com> wrote:

Hi Dianne,



Thanks for replying.



I want to create custom GUI components and access things like
View.mScrollX which has no setFunction (to create a horizontally
scrolling view), and mBGDrawable which does have a set function - but
that does a whole heap of stuff I don't want it to do.



Essentially with the second option, I would like to have an image button
using all of the standard background drawables (but hide only the
default standard enabled state image). I can't find API's that let me
do any of this cleanly. The only way I can currently find is to
intercept the draw function and hide the background temporarily. It
would be nicer to be able to either create my own StateListDrawable
using the existing button background drawables (which are not public) or
else have a removeState function in the StateListDrawable.



So essentially you are saying I shouldn't be doing this???



Cheers,


Peter.



________________________________

From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Dianne
Hackborn
Sent: Tuesday, 28 April 2009 1:02 PM
To: android-developers@googlegroups.com
Subject: [android-developers] Re: Compiling against a *REAL* android.jar
in eclipse???



Don't do that. If you aren't writing an app


Sponsored Links


Other Threads

1. OCSP and Android

Hi Team,

Does anyone know if OCSP (Online Certificate Standard Protocol) is
available in Android System ?
If the browser able to check Certificates validity via this protocol ?

Thanks for any information !

-- 

2. WebView not working

I am trying to get a simple webview working for use in a bigger
program. I can't even get a sample off the ground. I just get a black
screen on my phone (2.0) with a typical title bar at the top that
comes by default. Please help.

This is my HelloWebView.java:

package com.pv.hellowebview;

import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;

public class HelloWebView extends Activity {
    /** Called when the activity is first created. */
        WebView webview;

    @Override
    public void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        webview = (WebView) findViewById(R.id.webview);
        webview.getSettings().setJavaScriptEnabled(true);
        webview.loadUrl("http://www.google.com");
    }
}


here is my layout main.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <WebView
        android:id="@+id/webview"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
    />
</LinearLayout>

and finally here is my AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.pv.hellowebview"
      android:versionCode="1"
      android:versionName="1.0">
      <uses-permission android:name="android.permission.INTERNET" />
    <application android:icon="@drawable/icon" android:label="@string/
app_name">
        <activity android:name=".HelloWebView"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" />

</intent-filter>
        </activity>

    </application>
    <uses-sdk android:minSdkVersion="5" />
</manifest>

--

3. Ajax comunication between web browser and service

4. Problem in framing the request to Exchange server for Email search

5. AVDs

6. Playing RTSP or m3u with MediaPlayer

7. Playing video with an alpha channel