Using Webview behind proxy setting

by anand » Thu, 29 Oct 2009 04:14:17 GMT


Sponsored Links
 Hi all,

I am trying a simple application with webview given in the android
developer's site.
I am behind a http proxy.

I am not able to view the webpage.
I am getting a blank screen only.After a long time , it says page
cannot be found.

When i tried the same webview app in my home there was not any problem
as it was a direct internet connection.
I am able to view the webpage.

Should I use the "setHttpAuthUsernamePassword" method to set the
credentials.
If so what should be given for the first and second parameters.

Can anyone help me to solve this issue...

Thanks in advance,
Anand


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



Other Threads

1. Problem with scrollbar while dragging

Hi all,

         I have a layout with scrollbar

                      <ScrollView android:id="@+id/scroll"
                             android:layout_height="455px"
                             android:layout_width="fill_parent">
                            <LinearLayout  android:id="@+id/relative"

android:layout_height="wrap_content"

android:layout_width="wrap_content">
                           </LinearLayout>
                    </ScrollView>

        I add some views to the layout. the views can be
dragged( like in home screen ). My problem is when the view is dragged
vertically it works fine, but while dragging it horizontally the
scrollbar moves not the view. Since it the parent for the layout i am
not able to disable it. Is there any way to disable the scrollbar when
the view is being dragged. Or any other solution?

Thanks in advance.

-- 

2. List View Item Strange Behavior

Hi,

I have been having some strange behavior when refreshing a listview
from a button in a list item.  Say you have a list of 4 items, indexes
0-3 and you click on item 4, and print the index.  3 is printed
correctly, then i refresh the list.  I click on item 4 again, but this
time index 0 is printed, click again and we are back to 3.  Why is
this happening and how can I fix it?

I have included some source below for you to have a look at how I have
done this.  Any help is much appreciated

Binesy

public class CrazyList extends Activity {

        private static final String TAG = "CRAZY LIST";

        public class Item {
                public String name = null;
                public int counter = -1;

                public Item(String n) {
                        name = n;
                        counter = 0;
                }
        }

        private ArrayList<Item> names = null;
        private MyAdapter adapter = null;


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

        names = new ArrayList<Item>();
        names.add(new Item("Ross"));
        names.add(new Item("Fred"));
        names.add(new Item("Bob"));
        names.add(new Item("Frank"));

        ListView list = (ListView)findViewById(R.id.ListView01);
        adapter = new MyAdapter();
        list.setAdapter(adapter);
    }

    private void updateButtonText(int index) {
        names.get(index).counter++;
        adapter.notifyDataSetChanged();
    }

    private class MyAdapter extends BaseAdapter {

                @Override
                public int getCount() {
                        return names.size();
                }

                @Override
                public Object getItem(int position) {
                        return names.get(position);
                }

                @Override
                public long getItemId(int position) {
                        return position;
                }

                @Override
                public View getView(int position, View convertView, ViewGroup
parent) {
                        Container c = null;

                        if(convertView == null) {
                                convertView = 
View.inflate(getApplicationContext(), R.layout.item,
null);
                                c = new Container();

                                c.text = (TextView) 
convertView.findViewById(R.id.TextView01);
                                c.button = (Button) 
convertView.findViewById(R.id.Button01);
                                c.button.setTag(position);

                                c.button.setOnClickListener(new 
OnClickListener() {

                                        @Override
                                        public void onClick(View v) {
                                                int number = 
(Integer)v.getTag();
                                                Log.d(TAG, "Button clicked is " 
+ number);
                                                updateButtonText(number);
                                        }
                                });

                                convertView.setTag(c);
                        }
                        else
                                c = (Container) convertView.getTag();

                        c.text.setText(names.get(position).name);
                        c.button.setText(names.get(position).counter + "");

                        return convertView;
                }

                public class Container {
                        public TextView text = null;
                        public Button button = null;
                }
    }
}

-- 

3. any lawyer types out there that can get this site down?

4. Problem with scrollbar.

5. Hasil dari Acara Xperia X10 Launch

6. Alarm Clock Turns Off After 5 Minutes??

7. Transparent mip-map not supported?