Questions tagged [main-activity]

The main activity is the one which starts before the other ones.

201 questions
1
vote
0 answers

Xamarin Forms - how to get app to resume to same view onResume

Since I've implemented a splash activity in my XF app I cannot get the view to persist an app minimize/resume. It worked fine with just one activity. Currently, as per Microsoft's documentation, I have them as mainlauncher- true, nohistory - true in…
1
vote
2 answers

activity that plays video and exit app when video is finished

For the last 18 Months I have been building simple apps in android studio and I am really stuck trying to work this out so any help would be great So far my app works great, open the app on the first activity and press the play button and the 2nd…
J.Edwardes
  • 11
  • 3
1
vote
1 answer

How do i make the navigation bar hide after the keyboard is closed?

I Am trying to make a full screen Webview app and when ever a user searches something on a web page the keyboard pops up(obviously) and the navbar and the status bar show up but when the user closes the keyboard, the navigation bar and the status…
ADITYA G
  • 13
  • 6
1
vote
0 answers

setcontentview(r.layout.activity_main) crash

My application is closed(crash) and shows on Android monitor error it : activities.MainActivity.onCreate(MainActivity.java:77) what can i do?! this is my logcat: 03-14 10:21:04.255 5003-5003/com.panaceasoft.citiesdirectorySHZ E/AndroidRuntime: FATAL…
reza
  • 11
  • 2
1
vote
0 answers

Update textview in android custom notification

I have a custom local notification implementing remoteview comprising of three buttons and a textview. Button click in notification changes volume of ringer but I want to increment a variable count each time the up button click or decrement then…
1
vote
2 answers

Error: failed linking file resources

Every time I am trying to turn on my app it shows up an error: Error:error: '*/*' is incompatible with attribute android:type (attr) enum [linear=0, radial=1, sweep=2]. Error:'*/*' is incompatible with attribute android:type (attr) enum [linear=0,…
Johanna
  • 41
  • 2
  • 3
1
vote
1 answer

Shared Preferences causes app to crash. Android Studio

public class MainActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener, page1_user_notes.communicate{ private SectionsPagerAdapter mSectionsPagerAdapter; private ViewPager mViewPager; …
pewpew
  • 700
  • 2
  • 9
  • 32
1
vote
2 answers

java - Android Studio - Unable to instantiate activity

Guys I can not find a way to run my app. Please help. Here is the error: enter image description here Here is my MainActivity file: package com.example.aman.text_to_speech; import android.support.v7.app.AppCompatActivity; import…
user7602489
1
vote
2 answers

Android Studio can't see TextView ID

I have a textview, the xml file is
GLHF
  • 3,835
  • 10
  • 38
  • 83
1
vote
0 answers

Android Studio - HTML Buttons in MainActivity.java

So beforehand I made a project with Phonegap. In the Index.html file of the project I have this Button: Now i've imported this project into Android Studio to get it working with Admob…
1
vote
1 answer

Xamarin - how to change image source dynamically?

I'm following this tutorial and work fine. https://developer.xamarin.com/recipes/android/controls/imageview/display_an_image But in my case, I have 200 pictures. The user will write word in EditText, after click in button, show picture…
Diego Venâncio
  • 5,698
  • 2
  • 49
  • 68
1
vote
2 answers

How to find an object in the Mainactivity from another class

How can I find an object (for example Imageview) in the Mainactivity from another class that this class have extends? my Mainactivity : public class MainActivity extends Activity implements OnClickListener { @Override protected void onCreate(Bundle…
joojoo
  • 11
  • 2
1
vote
2 answers

How to build a GridViewAdapter correctly?

I tried to create a GridView with 6 Buttons and I wanted to display 6 different names on the Buttons. Here is my activity_main.xml with the GridView:
1
vote
2 answers

Default Activity not found Error while Launching activity

Error enter image description here 03/02 22:01:22: Launching app No local changes, not deploying APK Could not identify launch activity: Default Activity not found Error while Launching activity This is my AndroidManifist.xml
Rehan khan
  • 59
  • 10
1
vote
2 answers

PutExtra Value not being passed to mainactivity from push notification using xamarin forms and android

Im currently aiming to open the app to a particiualr page after the click of a push notification that successfully recieves. Il be sending an id once i get the basics working. For some reason the id is not being passed back to the mainactivity after…
1 2
3
13 14