For some reason, when I try and launch a web page from an onClick event in my login screen nothing happens. This only occurs on tablets, and works fine when testing on the phone.
I get this error message on a Galaxy Tab when clicking the TextView.
01-30 10:59:43.137 126-386/? E/PHService﹕ SysfsAccess : opening's messed up, /sys/devices/platform/galcore/gpu/gpu0/gpufreq/scaling_governor Permission denied
01-30 10:59:43.137 126-386/? E/PHService﹕ GpuOperator : int android::GpuOperator::setScalingPolicy(android::sp<android::GpuUnitParam>&), check failed!!!!
The weird thing is I have the exact same syntax in another activity that opens the web page completely fine. Here are the two blocks of code. I changed the address to google for now.
This works in my MainActivity and fails in LoginActivity (only on tablets):
/* Open link to website */
protected void openLink(View v){
Uri url = Uri.parse("http://google.com");
Intent launchBrowser = new Intent(Intent.ACTION_VIEW, url);
startActivity(launchBrowser);
}
Here is the xml that does not work:
<TextView
android:id="@+id/sign_up"
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:textColor="@color/white"
android:onClick="openLink"
android:text="sign up"
android:textSize="25sp"
android:layout_gravity="center"/>
There are two separate XML layouts for large/small screens which is the only difference I can think of. The definitions of the TextViews are exactly the same though.
Things I have tried:
- Changing ids in both TextViews
- Changing method names of both click handlers
- Using ButterKnife to handle click events
Nothing has worked. Have tested on Nexus 7, GalaxyTab, and Nexus 4. It works completely fine on the Nexus 4.