I'm trying to pass something from one class to my MainActivity, but it doesn't seem to work, I don't understand why.
I have my GPS Tracker on another class (not the MainActivity) in order to reuse it.
When the location changes, I want my other class to call a method from within the MainActivity to update my UI.
I summarized my code like that :
My MAIN ACTIVITY :
public class MainActivity exten
I'm having trouble setting up a ViewPager in android ActionBar Tabs.
I'm new to developing apps and try to get everything work by trial-and-error, but this one is quite difficult.
What I want to have
Two actionbar tabs each conatinig a ViewPager with some fragments.
What I did so far
MainActivity:
public class MainActivity extends FragmentActivity {
@Override
protected void onCreate
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.
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 am a beginner. How will my string can be a clickable one that can redirect to other layout.
I've seen lots of examples using TextureView in a main Activity but I'm trying to put it into a Fragment.
I've created the simplest example possible and its onCreateView is being called, onActivityCreated as well but onSurfaceTextureAvailable isn't being called after passing back the TextureView.
What am I missing ?
Thanks
G
public class FullscreenActivity extends Activity {
@Override
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 am trying to read and display the content of epub in android using
public class MainActivity extends Activity {
WebView webview;
String line, line1 = "", finalstr = "";
int i = 0;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
webview = (WebView) findViewById(R.id.tv);
AssetManager assetMan
I am trying to create an android messaging application.This is my code and when i run it i get an error saying "Unfortunately app has stopped".