Intent for opening browser

by sam aldis » Mon, 13 Apr 2009 12:12:42 GMT


Sponsored Links
 Can anyone post me the intent for opening the
Browser on the url specified.?

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



Intent for opening browser

by Mattaku Betsujin » Mon, 13 Apr 2009 12:22:31 GMT


 startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("
 http://www.google.com ")));





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


Sponsored Links


Other Threads

1. Regarding Scale Animation in 2d graphics

Hi all,
I am currently working on a cuckoo clock widget....have made d
necessary framework changes and playing with animation on
widget...Here I'm controlling the entire animation through xml and
just passing the xml id to the object of the remote view in the
code..In this I need my cuckoo popping out each time, to an extent I'm
successfuly able to bring out dat effect with scaling animation using
xml.But the problem here is I have to make the cuckoo disappear once
it goes back to the orginal position .I was thinking of bringing that
invisible effect by making the android:toXScale="0" in xml but what is
happening here is that the cuckoo instead of becoming invisible turns
upside down if the value goes less than 1 for the destination X
Scale..PLease do help me to find a solution...Thanks in advance,
Regards,
Tina Lincon

-- 

2. RatingBar onClick not being recognized in AlertDialog

Hi,
I am implementing a RatingBar in an AlertDialog, but I am not able to
implement rating using it.

I have tried RatingBar.setOnRatingBarChangeListener(), but that isn't
creating any listener events.

I am posting a code snippet below which shows how I have implemented
RatingBar in an AlertDialog. RatingBar is created in an xml file called
ratingalertdialog.xml.

                AlertDialog.Builder builder;
AlertDialog alertDialog;

Context mContext = getApplicationContext();
 LayoutInflater inflater = (LayoutInflater)
mContext.getSystemService(LAYOUT_INFLATER_SERVICE);
View layout = inflater.inflate(R.layout.ratingalertdialog,
                               (ViewGroup) findViewById(R.id.layout_root));
builder = new AlertDialog.Builder(this);
 builder.setView(layout);

                RatingBar rB = (RatingBar)findViewById(R.id.Rating01);
 rB.setOnRatingBarChangeListener(new OnRatingBarChangeListener() {
 @Override
public void onRatingChanged(RatingBar ratingBar, float rating,
boolean fromUser) {
// TODO Auto-generated method stub
Log.i("rating bar","change listener");
}
});
                alertDialog = builder.create(); alertDialog.show();

ratingalertdialog.xml

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

<TextView android:id="@+id/text" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:textColor="#FFF"
android:text="Rate this video" android:layout_gravity="center_horizontal" />


<RatingBar android:id="@+id/Rating01" android:layout_width="wrap_content"
android:visibility="visible" android:clickable="true"
android:drawingCacheQuality="low" android:paddingTop="5px"
android:numStars="5" android:layout_gravity="center_horizontal"
android:focusable="true"
android:focusableInTouchMode="true" android:layout_height="fill_parent"
style="?android:attr/ratingBarStyle" android:scrollbarSize="10px"
android:stepSize="0.5">
</RatingBar>
</LinearLayout>

The above snippet runs fine, but there is no listener activity.

How to implement the RatingBar onClickEvent in the AlertDialog? Do I need to
implement some other listeners to make it work?

Thanks
Ashok

-- 

3. GridView disappears...

4. LVL suggestion

5. VOOT - WTB : ipod touch 4thgen 8gb

6. Error: selected processor does not support ARM mode `cpsie i'

7. Save webview content for offline browsing