Issue: Manual switching of APN鈥檚 when more than one APN Present

by Xiongzh » Thu, 01 Apr 2010 14:42:29 GMT


Sponsored Links
 I'm also interested in this question.
Could anybody help to clarify it?

On Feb 17, 6:01pm, vishnu vardhan reddy madduri



--



Other Threads

1. Drawing does not appear in custom SurfaceView

Hi all,

I'm an Android newbie, and I'm trying to get started doing some simple
drawing on the screen. It looks like SurfaceView is the ticket for
this. I started with the SkeletonApp demo, removed all the UI
components, and put one custom SurfaceView at the top level, and in
that class, I overrode dispatchDraw() to do the actual drawing.
It appears to work -- the app builds and launches, and I can see my
dispatchDraw() getting called, but the screen stays black.
My custom view looks like this (edited a bit for brevity):

public class MyView extends SurfaceView {

        public Free42View(Context context) {
                super(context);
        }

        public Free42View(Context context, AttributeSet attrs) {
                super(context, attrs);
        }

        public Free42View(Context context, AttributeSet attrs, int defStyle)
{
                super(context, attrs, defStyle);
        }

        @Override
        protected void dispatchDraw(Canvas canvas) {
                Rect r = new Rect(50, 50, 100, 100);
                Paint p = new Paint();
                p.setColor(Color.WHITE);
                canvas.drawRect(r, p);
        }
}

The only other class in my project is the Activity; it doesn't do
anything interesting, other than calling setContentView() in its
onCreate() method.
My layout looks like this:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:layout_width="fill_parent"
android:layout_height="fill_parent"
    android:orientation="vertical">

    <com.thomasokken.MyView android:id="@+id/canvas"
        android:layout_width="fill_parent"
android:layout_height="0dip"
        android:layout_weight="1" >
        <requestFocus />
    </com.thomasokken.MyView>

</LinearLayout>

Just out of curiosity, I tried making MyView a subclass of View
instead of SurfaceView, and overrode onDraw() instead of
dispatchDraw() -- the result was that the app crashes before any of my
code even gets the chance to execute. I have wandered into some
serious strangeness, even though what I'm trying to do seems so
trivial.
FWIW, I'm using Eclipse 3.4.2 with the Android plugin and SDK 1.5,
under Windows XP.
Can someone help me out?

Thanks,

 - Thomas

-- 

2. trying to place text inside ShapeDrawables

Hi All,

I'm working on a fretboard application. The fretboard and strings are
being rendered in the onDraw method of my custom View. They are
basically a bunch of ShapeDrawable rectangles.

When the user opens a dialog and selects a scale/chord, the
application will overlay the scale/chord on the fretboard with circles
representing the notes. I can pretty easily continue to draw circle
shapes on the View to represent the notes, but am not sure how to add
text to those circles.

I'm hoping someone can validate my approach, or else tell me I'm going
down the wrong path. I don't see an obvious way to absolutely place
numerous text instances onto a View.

Thanks,
Matt

-- 

3. computer knowledge

4. Detecting flings in a ListActivity containing non-simple views

5. Uniqly identify a mobile device visiting my WAP/WEB site?

6. Axis vs 3 ---> tambahan ; WTA: Paket Internet IM3

7. Dealing with very limited data plan