<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Форум Александра Климова — Меню]]></title>
	<link rel="self" href="http://forum.alexanderklimov.ru/extern.php?action=feed&amp;tid=10&amp;type=atom" />
	<updated>2018-10-28T18:10:29Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.alexanderklimov.ru/viewtopic.php?id=10</id>
		<entry>
			<title type="html"><![CDATA[Re: Меню]]></title>
			<link rel="alternate" href="http://forum.alexanderklimov.ru/viewtopic.php?pid=1121#p1121" />
			<content type="html"><![CDATA[<p>Господа, столкнулся с проблемой при работе с меню.<br />Моё меню состоит из единственного элемента - переключателя, который отвечает за включение/выключение устройства.<br />При попытке программно изменить состояние кнопки (setCheched()) ничего не выходит - как только я не пробовал.<br />Самое интересное, что другие методы тоже не проходят.</p><p>Что скажете?</p>]]></content>
			<author>
				<name><![CDATA[Guha5277]]></name>
				<uri>http://forum.alexanderklimov.ru/profile.php?id=1782</uri>
			</author>
			<updated>2018-10-28T18:10:29Z</updated>
			<id>http://forum.alexanderklimov.ru/viewtopic.php?pid=1121#p1121</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Меню]]></title>
			<link rel="alternate" href="http://forum.alexanderklimov.ru/viewtopic.php?pid=1051#p1051" />
			<content type="html"><![CDATA[<p>Ничего не убирали. Всё на месте.</p>]]></content>
			<author>
				<name><![CDATA[alexander.klimoff]]></name>
				<uri>http://forum.alexanderklimov.ru/profile.php?id=2</uri>
			</author>
			<updated>2018-01-24T10:43:37Z</updated>
			<id>http://forum.alexanderklimov.ru/viewtopic.php?pid=1051#p1051</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Меню]]></title>
			<link rel="alternate" href="http://forum.alexanderklimov.ru/viewtopic.php?pid=1050#p1050" />
			<content type="html"><![CDATA[<p>&quot;...В Android Studio 2.2 добавили графический режим построения меню, которых похож на панель инструментов для добавления новых компонентов на экран. У меню панель состоит из четырёх элементов: Menu Item, Search Item, Menu, Group.&quot;&nbsp; &nbsp;Скажите, в третьей версии Android Studio функция графического создания меню убрана вообще или они запрятали куда-то?</p>]]></content>
			<author>
				<name><![CDATA[iorgo]]></name>
				<uri>http://forum.alexanderklimov.ru/profile.php?id=1389</uri>
			</author>
			<updated>2018-01-23T22:40:28Z</updated>
			<id>http://forum.alexanderklimov.ru/viewtopic.php?pid=1050#p1050</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Меню]]></title>
			<link rel="alternate" href="http://forum.alexanderklimov.ru/viewtopic.php?pid=501#p501" />
			<content type="html"><![CDATA[<p>Отпишусь для тех у кого возникла такая проблема.<br />В моём случаем дело оказалось в версии Android:<br />4.0.1 кнопка меню не появляется,<br />4.4.4 кнопка появляется.<br />Наличие физических кнопок девайса не сказывается.</p>]]></content>
			<author>
				<name><![CDATA[Kloshar13]]></name>
				<uri>http://forum.alexanderklimov.ru/profile.php?id=779</uri>
			</author>
			<updated>2016-04-19T14:59:07Z</updated>
			<id>http://forum.alexanderklimov.ru/viewtopic.php?pid=501#p501</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Меню]]></title>
			<link rel="alternate" href="http://forum.alexanderklimov.ru/viewtopic.php?pid=495#p495" />
			<content type="html"><![CDATA[<p>Если бы у меня была такая проблема, я мог бы рассказать о её решении. Так как у меня такой проблемы не было, то я не могу помочь. Может решение на поверхности, а может там что-то нетипичное.</p>]]></content>
			<author>
				<name><![CDATA[alexander.klimoff]]></name>
				<uri>http://forum.alexanderklimov.ru/profile.php?id=2</uri>
			</author>
			<updated>2016-04-14T10:24:13Z</updated>
			<id>http://forum.alexanderklimov.ru/viewtopic.php?pid=495#p495</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Меню]]></title>
			<link rel="alternate" href="http://forum.alexanderklimov.ru/viewtopic.php?pid=494#p494" />
			<content type="html"><![CDATA[<p>Добрый день!<br />Уважаемый Александр, неужели ничего нельзя сделать для отображения кнопки меню в заголовке для старых устройств?<br />Я посмотрел некоторые программы на своём телефоне с сенсорной кнопкой &#039;меню&#039;, там кнопка с тремя точками присутствует... Может они просто использовали imageButton и сами нарисовали три точки?..<br />Не хочется пропускать такой интересный урок из-за того, что он не подходит к моему устройству. Может можно как-то решить проблему?<br />Примеры программ с меню:<br /><a href="http://radikal.ru/fp/d81048271e5d439ebd30ffd95d6ce9c4"><span class="postimg"><img src="http://s015.radikal.ru/i332/1604/8e/44759150e30at.jpg" alt="http://s015.radikal.ru/i332/1604/8e/44759150e30at.jpg" /></span></a><a href="http://radikal.ru/fp/5af396eb2da744c89aa2c09812ae3ab0"><span class="postimg"><img src="http://s014.radikal.ru/i327/1604/c3/b9444c35425dt.jpg" alt="http://s014.radikal.ru/i327/1604/c3/b9444c35425dt.jpg" /></span></a></p>]]></content>
			<author>
				<name><![CDATA[Kloshar13]]></name>
				<uri>http://forum.alexanderklimov.ru/profile.php?id=779</uri>
			</author>
			<updated>2016-04-14T09:26:31Z</updated>
			<id>http://forum.alexanderklimov.ru/viewtopic.php?pid=494#p494</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Меню]]></title>
			<link rel="alternate" href="http://forum.alexanderklimov.ru/viewtopic.php?pid=493#p493" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>alexander.klimoff wrote:</cite><blockquote><p>Сами запоминайте и восстанавливайте.</p></blockquote></div><p>Если я правильно понял, то я должен: создать переменную в классе, содержащую id пункта меню, который был нажат. Меню каждый раз при открытии пересоздаётся, и в функции OnCreateOptionsMenu проверить переменую (было ли вообще что-то нажато), найти пункт с этим id и проставить ему чекед.<br />В общих чертах верно ?</p>]]></content>
			<author>
				<name><![CDATA[frenzymind]]></name>
				<uri>http://forum.alexanderklimov.ru/profile.php?id=1219</uri>
			</author>
			<updated>2016-04-12T02:41:44Z</updated>
			<id>http://forum.alexanderklimov.ru/viewtopic.php?pid=493#p493</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Меню]]></title>
			<link rel="alternate" href="http://forum.alexanderklimov.ru/viewtopic.php?pid=491#p491" />
			<content type="html"><![CDATA[<p>Сами запоминайте и восстанавливайте.</p>]]></content>
			<author>
				<name><![CDATA[alexander.klimoff]]></name>
				<uri>http://forum.alexanderklimov.ru/profile.php?id=2</uri>
			</author>
			<updated>2016-04-11T16:55:44Z</updated>
			<id>http://forum.alexanderklimov.ru/viewtopic.php?pid=491#p491</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Меню]]></title>
			<link rel="alternate" href="http://forum.alexanderklimov.ru/viewtopic.php?pid=490#p490" />
			<content type="html"><![CDATA[<p>Почему то у меня в меню с переключателями галочки не остается после выбора. Не в телефоне, не в эмуляторе.</p>]]></content>
			<author>
				<name><![CDATA[frenzymind]]></name>
				<uri>http://forum.alexanderklimov.ru/profile.php?id=1219</uri>
			</author>
			<updated>2016-04-11T12:27:18Z</updated>
			<id>http://forum.alexanderklimov.ru/viewtopic.php?pid=490#p490</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Меню]]></title>
			<link rel="alternate" href="http://forum.alexanderklimov.ru/viewtopic.php?pid=456#p456" />
			<content type="html"><![CDATA[<p>Производители иногда делают свои изменения в системе. поэтому на некоторых устройствах можно и не увидеть эти значки меню.</p>]]></content>
			<author>
				<name><![CDATA[alexander.klimoff]]></name>
				<uri>http://forum.alexanderklimov.ru/profile.php?id=2</uri>
			</author>
			<updated>2016-03-20T19:00:42Z</updated>
			<id>http://forum.alexanderklimov.ru/viewtopic.php?pid=456#p456</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Меню]]></title>
			<link rel="alternate" href="http://forum.alexanderklimov.ru/viewtopic.php?pid=445#p445" />
			<content type="html"><![CDATA[<p>Тоже столкнулся с проблемой, что не видно значка с 3 точками в правом вехрнем углу при запуске приложения из урока на на реальном устройстве с андроидом 4.1.2. При запуске на реальном устройстве с андроидом 5.1 кнопка видна. Однако при запуске пустого шаблона Navigation Drawer Activity из урока <a href="http://developer.alexanderklimov.ru/android/navigation_drawer_activity.php">http://developer.alexanderklimov.ru/and … tivity.php</a> на реальном андроиде 4.1.2 кнопка меню с точками есть.</p>]]></content>
			<author>
				<name><![CDATA[Erum]]></name>
				<uri>http://forum.alexanderklimov.ru/profile.php?id=1187</uri>
			</author>
			<updated>2016-03-19T22:04:26Z</updated>
			<id>http://forum.alexanderklimov.ru/viewtopic.php?pid=445#p445</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Меню]]></title>
			<link rel="alternate" href="http://forum.alexanderklimov.ru/viewtopic.php?pid=426#p426" />
			<content type="html"><![CDATA[<p>Мы говорим о разных вещах. Я говорю именно об использовании в Android. В Windows это распространенная практика, не спорю.</p>]]></content>
			<author>
				<name><![CDATA[alexander.klimoff]]></name>
				<uri>http://forum.alexanderklimov.ru/profile.php?id=2</uri>
			</author>
			<updated>2016-03-13T10:30:29Z</updated>
			<id>http://forum.alexanderklimov.ru/viewtopic.php?pid=426#p426</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Меню]]></title>
			<link rel="alternate" href="http://forum.alexanderklimov.ru/viewtopic.php?pid=425#p425" />
			<content type="html"><![CDATA[<p>Ну могу пример привести, где я такое использовал, но не на андроиде, конечно<br />Если хотите, можете скачать, но это необязательно: <a href="http://sxak.amikeco.ru/rubik.zip">http://sxak.amikeco.ru/rubik.zip</a><br />Там мой симулятор кубика-рубика разных размеров, написанный на c++builder. Так вот последний пункт меню - язык. При выбирании подпунктов остается галочка на выбранном языке</p>]]></content>
			<author>
				<name><![CDATA[sxakludanto]]></name>
				<uri>http://forum.alexanderklimov.ru/profile.php?id=1174</uri>
			</author>
			<updated>2016-03-13T09:58:28Z</updated>
			<id>http://forum.alexanderklimov.ru/viewtopic.php?pid=425#p425</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Меню]]></title>
			<link rel="alternate" href="http://forum.alexanderklimov.ru/viewtopic.php?pid=424#p424" />
			<content type="html"><![CDATA[<p>Я в меню такой необходимости ни разу не встречал. Но если вам нужно, то используйте. Никто не запрещает.</p>]]></content>
			<author>
				<name><![CDATA[alexander.klimoff]]></name>
				<uri>http://forum.alexanderklimov.ru/profile.php?id=2</uri>
			</author>
			<updated>2016-03-13T09:19:23Z</updated>
			<id>http://forum.alexanderklimov.ru/viewtopic.php?pid=424#p424</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Меню]]></title>
			<link rel="alternate" href="http://forum.alexanderklimov.ru/viewtopic.php?pid=422#p422" />
			<content type="html"><![CDATA[<p>Насчет меню с переключателями. Вы в уроке пишите:<br /></p><div class="quotebox"><blockquote><p>Большого смысла в этом режиме я не вижу.</p></blockquote></div><p>На самом деле (не скажу про андроиды), но в Делфи например такие меню изредка бывают полезны. Это не столько меню, сколько радиобаттоны. Только к ним надо еще немножко в обработчик дописать: Вот копипаста из моего<br />@Override<br />&nbsp; &nbsp; public boolean onOptionsItemSelected(MenuItem item) {<br />&nbsp; &nbsp; &nbsp; &nbsp; //return super.onOptionsItemSelected(item);<br />&nbsp; &nbsp; &nbsp; &nbsp; int id=item.getItemId();<br />&nbsp; &nbsp; &nbsp; &nbsp; TextView tv=(TextView) findViewById(R.id.TextView);<br />&nbsp; &nbsp; &nbsp; &nbsp; item.setChecked(true);<br />&nbsp; &nbsp; &nbsp; &nbsp; switch (id) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case R.id.action_cat_female:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tv.setText(&quot;Кошко&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case R.id.action_cat_male:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tv.setText(&quot;Кот&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case R.id.action_kitten:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tv.setText(&quot;Когтенок&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case R.id.action_settings:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tv.setText(&quot;Устаноффко&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return super.onOptionsItemSelected(item);<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; return true;<br />&nbsp; &nbsp; }</p><p>Грубо говоря, отличается на строку item.setChecked(true); - эта строка метит, что этот пункт меню был выбран. А в таких меню изредка бывает необходимость</p>]]></content>
			<author>
				<name><![CDATA[sxakludanto]]></name>
				<uri>http://forum.alexanderklimov.ru/profile.php?id=1174</uri>
			</author>
			<updated>2016-03-13T09:15:04Z</updated>
			<id>http://forum.alexanderklimov.ru/viewtopic.php?pid=422#p422</id>
		</entry>
</feed>
