android-activity

Google maps fails to open in second activity

限于喜欢 提交于 2020-04-30 04:57:04
问题 I'm making an application and ran into a problem. I made separately app for google maps and it worked perfect, and I made second app in which I have listview, and by clicking on item in listview, another activity starts where google maps with different marks opens. So I manage to get another activity running after clicking on separate objects in listview, so I modified that objects .xml and .java file on same principle as I did in my google maps app but somehow it doesn't works. Main_Activity

Google maps fails to open in second activity

江枫思渺然 提交于 2020-04-30 04:54:25
问题 I'm making an application and ran into a problem. I made separately app for google maps and it worked perfect, and I made second app in which I have listview, and by clicking on item in listview, another activity starts where google maps with different marks opens. So I manage to get another activity running after clicking on separate objects in listview, so I modified that objects .xml and .java file on same principle as I did in my google maps app but somehow it doesn't works. Main_Activity

Google maps fails to open in second activity

我与影子孤独终老i 提交于 2020-04-30 04:54:23
问题 I'm making an application and ran into a problem. I made separately app for google maps and it worked perfect, and I made second app in which I have listview, and by clicking on item in listview, another activity starts where google maps with different marks opens. So I manage to get another activity running after clicking on separate objects in listview, so I modified that objects .xml and .java file on same principle as I did in my google maps app but somehow it doesn't works. Main_Activity

Android app restarts when opened by clicking app icon

十年热恋 提交于 2020-04-29 10:42:17
问题 Scenario : I open my app by clicking icon, do something, navigate through activities, pause the app by clicking home button. Case 1: If I open my app by clicking icon again, the app restarts from the first activity. Case 2: If I open my app from recently open apps (in 4.0 by pressing menu button and selecting my app) it starts from the paused state. I want the behavior 2 always to occur, don't want my app to restart every time when it is opened by clicking icon. I have compared my manifest

Android app restarts when opened by clicking app icon

女生的网名这么多〃 提交于 2020-04-29 10:42:09
问题 Scenario : I open my app by clicking icon, do something, navigate through activities, pause the app by clicking home button. Case 1: If I open my app by clicking icon again, the app restarts from the first activity. Case 2: If I open my app from recently open apps (in 4.0 by pressing menu button and selecting my app) it starts from the paused state. I want the behavior 2 always to occur, don't want my app to restart every time when it is opened by clicking icon. I have compared my manifest

Android: how to create splash screen with text

牧云@^-^@ 提交于 2020-04-13 06:10:44
问题 How can I add some text to splash screen? My splash screen isn't a separate activity and I don't want to make it as standard activity. I created it by following this article: https://android.jlelse.eu/launch-screen-in-android-the-right-way-aca7e8c31f52 Is it possible to add some text? 回答1: You can create a new layout for your splash screen. But if you still don't want to create it then there is a nasty hack to achieve it. Open Paint write your text and save the file as png image Import png

Android: how to create splash screen with text

*爱你&永不变心* 提交于 2020-04-13 06:08:59
问题 How can I add some text to splash screen? My splash screen isn't a separate activity and I don't want to make it as standard activity. I created it by following this article: https://android.jlelse.eu/launch-screen-in-android-the-right-way-aca7e8c31f52 Is it possible to add some text? 回答1: You can create a new layout for your splash screen. But if you still don't want to create it then there is a nasty hack to achieve it. Open Paint write your text and save the file as png image Import png

Load SharedPreferences in MainActivity and Update in an secondary activity

偶尔善良 提交于 2020-03-26 07:08:14
问题 Good morning everyone, I'm having problems again in my proccess to create my first app. This time with the SharedPreferences file. I have 2 activities that must use the same SharedPreferences file. The first one is the MainActivity and the second one an edit layout for the data. In the MainActivity I have the following method where I use the data to connect to a PLC: //initialize the SharedPreferences variables for the PLC Data and Connection m_DataPLC = getSharedPreferences("CFTPreferences"

How to handle click from xml to Activity

我的未来我决定 提交于 2020-03-25 19:01:25
问题 I am new to android and following this tutorial: https://www.youtube.com/watch?v=qK0QNA0sMGc&t=2710s ( It's in Hindi ) In my MainActivity.java : When I'm trying to run the app it's giving errors saying: 9 errors found 1 warning found 2 typos found It's asking me to put a semicolon at the end of Log.i(tag:"this", msg:"clickbtn: This is a message"); which I have already put down. This is my activity_main.xml : Can anybody tell me what are the errors? XML Code: <?xml version="1.0" encoding="utf

send data from activity to another without start it

孤者浪人 提交于 2020-03-21 11:30:31
问题 If I have two activities Activity1 and Activity2 and I want to send data from Activity1 to Activity2 without Start Activity2 I know if I want to start Activity2 I use this code in Activity1.java Intent intent ; Bundle bundle = new Bundle(); bundle.putString(BG_SELECT, hexColor); intent = new Intent(getApplicationContext(), Activity2.class); intent.putExtras(bundle); // this is to start but I want just refresh Activity2 not start it startActivityForResult(intent, uniqueNo); and in Activity2