I have two activities:
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void click(View view) {
Intent intent= new Intent(this, TranslucentActivity.class);
startActivity(intent);
}
}
public class TranslucentActivity extends Activity
i want to post a variable to this file on webserver. i am using free hosting company.
http://locationmeter.comule.com/reg.php
it is doing good on emulator but it is not working on device.
I want to lock the screen of the app on button click
I have written the code as
public class MainActivity extends DeviceAdminReceiver{
public void makeTest()
{
System.out.println("Entered Main Class");
}
public class Controller extends Activity {
static final int RESULT_ENABLE = 1;
Button powerOff;
int amountOfTime =20*1000;
Context context = this;
DevicePolicyManager mDPM;
ActivityManag
I am trying to create dialog with fragment but when I call the setAdapter method I have a Java NullPointerException, and I can't find the error.
I have this
Code:
package my.sphere;
import android.app.Activity;
import android.opengl.GLSurfaceView;
import android.os.Bundle;
public class SpherewallpaperActivity extends Activity {
/** Called when the activity is first created.
I had make FBLogin demo using this tutotial
Code is here //MainActivity.java
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
// start Facebook Login
Session.openActiveSession(this, true, new Session.StatusCallback() {
// callback when session c
Hi im very very new to android, so this would be my first app.
Im taking a java class and trying to make an app similar to a lab
we did in class.
I have an EditText view in my MainActivity that the user can input a url. This MainActivity also contains a fragment which will hold a WebView.
I have it set up so that when the fragment is displayed the url will load in the WebView.
I want that image only be dragged in its parent view. when user tries to drag it outside the view it will return its original position. basically i'm implementing android unlock type feature. please help me out.