Reading and writing APN_SETTINGS

by vekexasia » Tue, 18 Nov 2008 23:24:10 GMT


Sponsored Links
 Hi, i'm asking here cause i can't figure out my problem..

How can i read my APN_SETTINGS?

and
How can i modify that? Thanks

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



Other Threads

1. ActivityList row color

Hi,

I have a problem with activity list, setting text color. I am
downloading an XML message via HTTP server, and i've parsed and
displayed it. I want to be have a Priority Identifier for the message
that I received.

For example if value is 1, the font color is green, if 5 yellow, and
if 10 red.

I've tried the following code:

        private void setupColors() {
                for(int i=0; i<this.getListAdapter().getCount(); i++) {
                        View view = getListView().getChildAt(i +
getListView().getFirstVisiblePosition());
                        if(view == null) {
                                RLog.debug(this, "view == null");
                        }
                        if (view != null && view instanceof TextView) {
                                TextView tv = (TextView) view;
                                Registration reg = 
(Registration)listData.get(i);
                                
tv.setBackgroundColor(Color.rgb(reg.getColor()[0], reg.getColor()
[1], reg.getColor()[2]));
                                
tv.setTextColor(Color.rgb(reg.getFontColor()[0], reg.getFontColor()
[1], reg.getFontColor()[2]));
                        } else {
                                RLog.debug(this, "went to else...");
                        }
                }
        }

on
onStart()
onStop()
and onPostCreate(...)

But still it does not update. Worst, the value of RLog.debug messages
are always view == null.

Thanks.

-Ice

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

2. Dynamic Text in Dialog?

Hi, I am trying to create a simple alert dialog that just shows the
user input. However, android appears to be caching the dialog and so
the text in the dialog stays static after the first initialization.

My codes are as followed, it has one button, one editable text, and
when you click on the button, it's supposed to popup a dialog that
shows the same text as it was enter in the textbox.

However, the text will stay static after the first click, when the
dialog box is closed and reopened, the same text appear regardless of
the text in the textbox

Can someone tell me how to make it work the way i wanted it to?

Thanks,

public class Test extends Activity {

    private static final int DIALOG_ID = 1;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        Button btn = (Button)findViewById(R.id.test);

        btn.setOnClickListener(new android.view.View.OnClickListener()
{
          @Override
          public void onClick(View v) {
            showDialog(DIALOG_ID);
          }});
    }




    @Override
    protected Dialog onCreateDialog(int id) {
      if(id == DIALOG_ID){
        EditText mytext = (EditText)findViewById(R.id.mytext);
        return new AlertDialog.Builder(Test.this)
        .setTitle(mytext.getText().toString())
        .setPositiveButton("OK", new OnClickListener(){
          public void onClick(DialogInterface dialog, int which) {}})
        .create();
      }

      return null;
    }
}

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >

   <EditText
           android:id="@+id/mytext"
       android:layout_width="fill_parent"
       android:layout_height="wrap_content"
       android:background="@android:drawable/editbox_background"/>
 <Button
        android:id="@+id/test"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:text="TEST"/>

</LinearLayout>

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

3. problem in changing location of Tab

4. How to access the SMS content provider in SDK 1.0_r1

5. How to write a test case for custom MediaPlayer class

6. HTC Touch Pro skin for Android Emulator

7. AIDL Concept!!!