<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Форум Александра Климова — Переключение между экранами приложения]]></title>
		<link>http://forum.alexanderklimov.ru/viewtopic.php?id=8</link>
		<atom:link href="http://forum.alexanderklimov.ru/extern.php?action=feed&amp;tid=8&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Переключение между экранами приложения.]]></description>
		<lastBuildDate>Sun, 13 Sep 2020 22:27:29 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Переключение между экранами приложения]]></title>
			<link>http://forum.alexanderklimov.ru/viewtopic.php?pid=1181#p1181</link>
			<description><![CDATA[<div class="quotebox"><cite>nikita1584 wrote:</cite><blockquote><p>Большое спасибо за огромную работу! Делаю первые шаги в андроиде.<br />Пришлось напрячься, чтобы понять недостающую строчку в activity_main.xml:<br /></p><div class="codebox"><pre><code>android:onClick=&quot;onClick&quot;</code></pre></div><p>В статье не упоминается.</p></blockquote></div><p>Наоборот, это включает мозги обучающегося <img src="http://forum.alexanderklimov.ru/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[null@example.com (archi.sova)]]></author>
			<pubDate>Sun, 13 Sep 2020 22:27:29 +0000</pubDate>
			<guid>http://forum.alexanderklimov.ru/viewtopic.php?pid=1181#p1181</guid>
		</item>
		<item>
			<title><![CDATA[Re: Переключение между экранами приложения]]></title>
			<link>http://forum.alexanderklimov.ru/viewtopic.php?pid=1180#p1180</link>
			<description><![CDATA[<p>В ходе изучения и написания кода, заметил, что выполнять класс-каст, например для объектов TextView и EditText стало необязательно.<br />Кто-нибудь знает почему это необязательно теперь?<br />Использую Android SDK API v.28</p>]]></description>
			<author><![CDATA[null@example.com (archi.sova)]]></author>
			<pubDate>Sun, 13 Sep 2020 22:25:12 +0000</pubDate>
			<guid>http://forum.alexanderklimov.ru/viewtopic.php?pid=1180#p1180</guid>
		</item>
		<item>
			<title><![CDATA[Re: Переключение между экранами приложения]]></title>
			<link>http://forum.alexanderklimov.ru/viewtopic.php?pid=1179#p1179</link>
			<description><![CDATA[<p>Большое спасибо за огромную работу! Делаю первые шаги в андроиде.<br />Пришлось напрячься, чтобы понять недостающую строчку в activity_main.xml:<br /></p><div class="codebox"><pre><code>android:onClick=&quot;onClick&quot;</code></pre></div><p>В статье не упоминается.</p>]]></description>
			<author><![CDATA[null@example.com (nikita1584)]]></author>
			<pubDate>Fri, 28 Aug 2020 15:22:48 +0000</pubDate>
			<guid>http://forum.alexanderklimov.ru/viewtopic.php?pid=1179#p1179</guid>
		</item>
		<item>
			<title><![CDATA[Re: Переключение между экранами приложения]]></title>
			<link>http://forum.alexanderklimov.ru/viewtopic.php?pid=1161#p1161</link>
			<description><![CDATA[<p>Добрый день!<br />Спасибо за интересные урокы.<br />Такое ощущение что в студии опять что то поменяли и теперь <br />Code | Override Methods (Ctrl+O). В диалоговом окне ищем нужный класс, можно набирать на клавиатуре первые символы для быстрого поиска. В созданном методе нужно вызвать метод setContentView(),<br />Дает не <br /> @Override<br />&nbsp; &nbsp; protected void onCreate(Bundle savedInstanceState) {<br />&nbsp; &nbsp; &nbsp; &nbsp; super.onCreate(savedInstanceState);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; setContentView(R.layout.activity_about);<br />&nbsp; &nbsp; }</p><p>А вот это.</p><p>@Override<br />&nbsp; &nbsp; public void setContentView(int layoutResID) {<br />&nbsp; &nbsp; &nbsp; &nbsp; super.setContentView(layoutResID);<br />&nbsp; &nbsp; }</p>]]></description>
			<author><![CDATA[null@example.com (vicrius)]]></author>
			<pubDate>Wed, 17 Jul 2019 13:43:46 +0000</pubDate>
			<guid>http://forum.alexanderklimov.ru/viewtopic.php?pid=1161#p1161</guid>
		</item>
		<item>
			<title><![CDATA[Re: Переключение между экранами приложения]]></title>
			<link>http://forum.alexanderklimov.ru/viewtopic.php?pid=1139#p1139</link>
			<description><![CDATA[<p>После получения результата от радиокнопки (кто украл колбасу) если повернуть устройств, текст результата пропадает. Что происходит при смене ориентации экрана? Почему очищается TextView?<br />Спасибо.<br />--<br />Решено! Методы onSaveInstanceState() и onRestoreInstanceState(). Прошу прощения за беспокойство!</p>]]></description>
			<author><![CDATA[null@example.com (MonoLife)]]></author>
			<pubDate>Mon, 26 Nov 2018 06:01:26 +0000</pubDate>
			<guid>http://forum.alexanderklimov.ru/viewtopic.php?pid=1139#p1139</guid>
		</item>
		<item>
			<title><![CDATA[Re: Переключение между экранами приложения]]></title>
			<link>http://forum.alexanderklimov.ru/viewtopic.php?pid=1103#p1103</link>
			<description><![CDATA[<p>Приветствую, уважаемые.</p><p>Прошу, подскажите. У меня не запускается приложение, выдает ошибку:<br />Error running &#039;AboutActivity&#039;: AboutActivity is not an Activity subclass or alias</p><p>Вот код:<br />Main.Actitvity<br />package com.example.myapplication;</p><p>import android.content.Intent;<br />import android.os.Bundle;<br />import android.support.v7.app.AppCompatActivity;<br />import android.view.View;<br />import android.widget.EditText;<br />import android.widget.TextView;</p><p>public class MainActivity extends AppCompatActivity {</p><p>&nbsp; &nbsp;// private TextView mHelloTextView;<br />&nbsp; &nbsp;// private EditText mNameEditText;</p><p>&nbsp; &nbsp; @Override<br />&nbsp; &nbsp; protected void onCreate(Bundle savedInstanceState) {<br />&nbsp; &nbsp; &nbsp; &nbsp; super.onCreate(savedInstanceState);<br />&nbsp; &nbsp; &nbsp; &nbsp; setContentView(R.layout.activity_main);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; //mHelloTextView = (TextView) findViewById(R.id.textView);<br />&nbsp; &nbsp; &nbsp; &nbsp; //mNameEditText = (EditText) findViewById(R.id.editText);<br />&nbsp; &nbsp; }</p><p>&nbsp; &nbsp; public void onClick(View view) {<br />&nbsp; &nbsp; &nbsp; &nbsp; Intent intent = new Intent(MainActivity.this, AboutActivity.class);<br />&nbsp; &nbsp; &nbsp; &nbsp; startActivity(intent);<br />&nbsp; &nbsp; }</p><br /><p>AboutActivity<br />package com.example.myapplication;</p><p>import android.app.Activity;<br />import android.os.Bundle;</p><p>public class AboutActivity extends Activity {</p><p>&nbsp; &nbsp; @Override<br />&nbsp; &nbsp; protected void onCreate(Bundle savedInstanceState) {<br />&nbsp; &nbsp; &nbsp; &nbsp; super.onCreate(savedInstanceState);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; setContentView(R.layout.activity_about);<br />&nbsp; &nbsp; }<br />}</p><p>AndroidManifest<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;/activity&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;activity android:name=&quot;.AboutActivity&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:label=&quot;@string/about_title&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;/activity&gt;<br />&nbsp; &nbsp; &lt;/application&gt;</p><p>Где ошибка?<br />Гугл говорит, что нет класса AboutActivity..., но он же есть.</p><p>Спасибо</p>]]></description>
			<author><![CDATA[null@example.com (Артур777)]]></author>
			<pubDate>Mon, 07 May 2018 22:27:12 +0000</pubDate>
			<guid>http://forum.alexanderklimov.ru/viewtopic.php?pid=1103#p1103</guid>
		</item>
		<item>
			<title><![CDATA[Re: Переключение между экранами приложения]]></title>
			<link>http://forum.alexanderklimov.ru/viewtopic.php?pid=1099#p1099</link>
			<description><![CDATA[<p>Подскажите,в Простом переключении на другой экран у меня сразу выводится второе Activity(У Лукоморья Дуд зеленый..).Ошибок никаких нет.В чем может быть дело?</p><p><a href="https://github.com/VladimirMinka/AK/tree/master/Lessons_5">https://github.com/VladimirMinka/AK/tre … /Lessons_5</a></p>]]></description>
			<author><![CDATA[null@example.com (Vladimir)]]></author>
			<pubDate>Thu, 03 May 2018 19:20:40 +0000</pubDate>
			<guid>http://forum.alexanderklimov.ru/viewtopic.php?pid=1099#p1099</guid>
		</item>
		<item>
			<title><![CDATA[Re: Переключение между экранами приложения]]></title>
			<link>http://forum.alexanderklimov.ru/viewtopic.php?pid=1096#p1096</link>
			<description><![CDATA[<div class="quotebox"><cite>Vladimir wrote:</cite><blockquote><p>Коллеги,я правильно понимаю,что в данном уроке у меня должно быть два экране?<br />На первом я жму кнопку и появляется второй-О Программе?</p></blockquote></div><p>Смотря, что Вы понимаете под экраном. У Вас две Activity. На первой Вы нажимаете кнопку, появляется вторая Activity - О Программе.</p>]]></description>
			<author><![CDATA[null@example.com (NeferSky)]]></author>
			<pubDate>Fri, 20 Apr 2018 07:55:03 +0000</pubDate>
			<guid>http://forum.alexanderklimov.ru/viewtopic.php?pid=1096#p1096</guid>
		</item>
		<item>
			<title><![CDATA[Re: Переключение между экранами приложения]]></title>
			<link>http://forum.alexanderklimov.ru/viewtopic.php?pid=1094#p1094</link>
			<description><![CDATA[<p>Коллеги,я правильно понимаю,что в данном уроке у меня должно быть два экране?<br />На первом я жму кнопку и появляется второй-О Программе?</p>]]></description>
			<author><![CDATA[null@example.com (Vladimir)]]></author>
			<pubDate>Thu, 19 Apr 2018 18:49:13 +0000</pubDate>
			<guid>http://forum.alexanderklimov.ru/viewtopic.php?pid=1094#p1094</guid>
		</item>
		<item>
			<title><![CDATA[Re: Переключение между экранами приложения]]></title>
			<link>http://forum.alexanderklimov.ru/viewtopic.php?pid=1086#p1086</link>
			<description><![CDATA[<p>Я не знаю, что вы хотите. А что вас не устраивает в этом способе?</p>]]></description>
			<author><![CDATA[null@example.com (alexander.klimoff)]]></author>
			<pubDate>Wed, 04 Apr 2018 20:03:52 +0000</pubDate>
			<guid>http://forum.alexanderklimov.ru/viewtopic.php?pid=1086#p1086</guid>
		</item>
		<item>
			<title><![CDATA[Re: Переключение между экранами приложения]]></title>
			<link>http://forum.alexanderklimov.ru/viewtopic.php?pid=1085#p1085</link>
			<description><![CDATA[<p>Спасибо за советы. А есть какой-то другой способ выполнить поставленную задачу или это самый распространенный?</p>]]></description>
			<author><![CDATA[null@example.com (megapixxxell)]]></author>
			<pubDate>Wed, 04 Apr 2018 12:32:11 +0000</pubDate>
			<guid>http://forum.alexanderklimov.ru/viewtopic.php?pid=1085#p1085</guid>
		</item>
		<item>
			<title><![CDATA[Re: Переключение между экранами приложения]]></title>
			<link>http://forum.alexanderklimov.ru/viewtopic.php?pid=1084#p1084</link>
			<description><![CDATA[<p>ArrayList&lt;String&gt; inputFromSecondList = (ArrayList&lt;String&gt;) data.getSerializableExtra<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (&quot;TEXT_LIST2&quot;);</p><p>Но у вас программа будет работать хоть и без краха, но логика в приложении хромает и вы будете получать не совсем те данные, которые хотели. <br />И несколько замечаний - text1, text2,... обычно используют для TextView, для EditText используйте edit1...<br />Для переменных не используйте приставку to..., это используется для названий методов.</p>]]></description>
			<author><![CDATA[null@example.com (alexander.klimoff)]]></author>
			<pubDate>Wed, 04 Apr 2018 06:47:26 +0000</pubDate>
			<guid>http://forum.alexanderklimov.ru/viewtopic.php?pid=1084#p1084</guid>
		</item>
		<item>
			<title><![CDATA[Re: Переключение между экранами приложения]]></title>
			<link>http://forum.alexanderklimov.ru/viewtopic.php?pid=1083#p1083</link>
			<description><![CDATA[<p>Добрый день! <br />Хочу сделать следующее. В первой активити две textView и кнопка, во второй тоже две textView и кнопка. В первой активити мы заполняем textView и при нажатии кнопки с помощью ArrayList передаем во вторую, где из переданного ArrayList заполняем имеющиеся textView. Затем при нажатии кнопки во второй активити переходим обратно передав данные обратно с помощью Arraylist&nbsp; подобным образом. Подскажите где ошибка при использовании подобного способа? И есть ли другой способ это сделать? <br /></p><div class="codebox"><pre><code>public class MainActivity extends AppCompatActivity {

    private static final int REQUEST_CODE = 0;
    private static final int NOTIFY_ID = 100;
    private EditText text1, text2;
    private ArrayList&lt;String&gt; textList = new ArrayList&lt;&gt;();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        textList.clear();
    }

    public void onNextScreenButtonClick(View view) {
        text1 = findViewById(R.id.editText);
        text2 = findViewById(R.id.editText2);


        textList.add(text1.getText().toString());
        textList.add(text2.getText().toString());

        Intent secondIntent = new Intent(this, SecondActivity.class);
        secondIntent.putExtra(&quot;TEXT_LIST&quot;, textList);
        startActivityForResult(secondIntent, REQUEST_CODE);
    }

[color=#FF0000]//Используя дебагер, выяснил что ошибка возникает в этом методе[/color]
    
@Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        ArrayList&lt;String&gt; inputFromSecondList = (ArrayList&lt;String&gt;) getIntent().getExtras().getSerializable(&quot;TEXT_LIST2&quot;);

        if (requestCode == REQUEST_CODE) {
            if (resultCode == RESULT_OK) {
                text1.setText(inputFromSecondList.get(0));
                text2.setText(inputFromSecondList.get(1));
            } else {
                text1.setText(&quot;&quot;);
                text2.setText(&quot;&quot;);
            }
        }
    }</code></pre></div><div class="codebox"><pre><code>public class SecondActivity extends AppCompatActivity {

    private EditText text3, text4;
    ArrayList &lt;String&gt; toFirstActivityList = new ArrayList&lt;&gt;();
    public final static String TEXT_LISTT = &quot;TEXT_LIST2&quot;;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_second);

        toFirstActivityList.clear();

        text3 = findViewById(R.id.editText3);
        text4 = findViewById(R.id.editText4);

        ArrayList&lt;String&gt; inputStringList = (ArrayList&lt;String&gt;) getIntent().getExtras().getSerializable(&quot;TEXT_LIST&quot;);

        text3.setText(inputStringList.get(1));
        text4.setText(inputStringList.get(0));
    }

    public void onBackButtonClick(View view) {

        toFirstActivityList.add(text3.getText().toString());
        toFirstActivityList.add(text4.getText().toString());

        Intent toFirstActivityIntent = new Intent();

        toFirstActivityIntent.putExtra(TEXT_LISTT, toFirstActivityList);

        setResult(RESULT_OK, toFirstActivityIntent);
        finish();
    }
}</code></pre></div><p>вот логи Error </p><p><span style="color: #FF0000"><br />04-04 11:55:24.807 30458-30458/com.example.megap.notification E/AndroidRuntime: FATAL EXCEPTION: main<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Process: com.example.megap.notification, PID: 30458<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=0, result=-1, data=Intent { (has extras) }} to activity {com.example.megap.notification/com.example.megap.notification.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method &#039;java.io.Serializable android.os.Bundle.getSerializable(java.lang.String)&#039; on a null object reference<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; at android.app.ActivityThread.deliverResults(ActivityThread.java:4146)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; at android.app.ActivityThread.handleSendResult(ActivityThread.java:4189)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; at android.app.ActivityThread.-wrap20(ActivityThread.java)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1572)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; at android.os.Handler.dispatchMessage(Handler.java:102)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; at android.os.Looper.loop(Looper.java:163)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; at android.app.ActivityThread.main(ActivityThread.java:6205)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; at java.lang.reflect.Method.invoke(Native Method)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Caused by: java.lang.NullPointerException: Attempt to invoke virtual method &#039;java.io.Serializable android.os.Bundle.getSerializable(java.lang.String)&#039; on a null object reference<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; at com.example.megap.notification.MainActivity.onActivityResult(MainActivity.java:50)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; at android.app.Activity.dispatchActivityResult(Activity.java:7128)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; at android.app.ActivityThread.deliverResults(ActivityThread.java:4142)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; at android.app.ActivityThread.handleSendResult(ActivityThread.java:4189) <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; at android.app.ActivityThread.-wrap20(ActivityThread.java) <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1572) <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; at android.os.Handler.dispatchMessage(Handler.java:102) <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; at android.os.Looper.loop(Looper.java:163) <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; at android.app.ActivityThread.main(ActivityThread.java:6205) <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; at java.lang.reflect.Method.invoke(Native Method) <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904) <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794) <br /></span></p>]]></description>
			<author><![CDATA[null@example.com (megapixxxell)]]></author>
			<pubDate>Wed, 04 Apr 2018 04:48:18 +0000</pubDate>
			<guid>http://forum.alexanderklimov.ru/viewtopic.php?pid=1083#p1083</guid>
		</item>
		<item>
			<title><![CDATA[Re: Переключение между экранами приложения]]></title>
			<link>http://forum.alexanderklimov.ru/viewtopic.php?pid=1021#p1021</link>
			<description><![CDATA[<p>нет не робит</p><p>хочу совместить startActivityForResult() и фильтры , или так не бывает ?</p>]]></description>
			<author><![CDATA[null@example.com (permsk)]]></author>
			<pubDate>Mon, 18 Dec 2017 21:51:24 +0000</pubDate>
			<guid>http://forum.alexanderklimov.ru/viewtopic.php?pid=1021#p1021</guid>
		</item>
		<item>
			<title><![CDATA[Re: Переключение между экранами приложения]]></title>
			<link>http://forum.alexanderklimov.ru/viewtopic.php?pid=1020#p1020</link>
			<description><![CDATA[<div class="quotebox"><cite>permsk wrote:</cite><blockquote><p>Подскажите в куске кода<br /></p><div class="codebox"><pre><code>    public static final String ACTION_SECOND_ACTIVITY = &quot;ru.site.sherlock.Main2Activity&quot;;
    public void onClick1(View v) {       
        Intent questionIntent = new Intent(MainActivity.this, ACTION_SECOND_ACTIVITY);
        startActivityForResult(questionIntent, CHOOSE_THIEF);
    }</code></pre></div><p>в 3 строке как правильно указать ACTION_SECOND_ACTIVITY ?<br />ACTION_SECOND_ACTIVITY.class тоже не канает</p></blockquote></div><p>Ну дык переменная у Вас String, а Вы в нее Activity засунуть пытаетесь. Поймите, код - это команды компилятору, а не просто текст.<br />Студии сейчас под рукой нет проверить, но, может, сработает?<br /></p><div class="codebox"><pre><code>ACTION_SECOND_ACTIVITY = &quot;ru.site.sherlock.Main2Activity.class&quot;;</code></pre></div><p>И, да, оно Вам зачем?</p>]]></description>
			<author><![CDATA[null@example.com (NeferSky)]]></author>
			<pubDate>Mon, 18 Dec 2017 21:36:05 +0000</pubDate>
			<guid>http://forum.alexanderklimov.ru/viewtopic.php?pid=1020#p1020</guid>
		</item>
	</channel>
</rss>
