<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Форум Александра Климова — Конвертер «38 попугаев»]]></title>
	<link rel="self" href="http://forum.alexanderklimov.ru/extern.php?action=feed&amp;tid=15&amp;type=atom" />
	<updated>2017-12-16T18:02:08Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.alexanderklimov.ru/viewtopic.php?id=15</id>
		<entry>
			<title type="html"><![CDATA[Re: Конвертер «38 попугаев»]]></title>
			<link rel="alternate" href="http://forum.alexanderklimov.ru/viewtopic.php?pid=1016#p1016" />
			<content type="html"><![CDATA[<p>А как открыть панель propierties? Как ни старался, не нашел.</p>]]></content>
			<author>
				<name><![CDATA[tuta]]></name>
				<uri>http://forum.alexanderklimov.ru/profile.php?id=1554</uri>
			</author>
			<updated>2017-12-16T18:02:08Z</updated>
			<id>http://forum.alexanderklimov.ru/viewtopic.php?pid=1016#p1016</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Конвертер «38 попугаев»]]></title>
			<link rel="alternate" href="http://forum.alexanderklimov.ru/viewtopic.php?pid=496#p496" />
			<content type="html"><![CDATA[<p>Покритикуйте, пожалуйста, если не лень мое решение того, что вы написали:<br />Сделал отдельный класс:</p><p>public class EditIntLimited {</p><p>&nbsp; &nbsp; private EditText met;<br />&nbsp; &nbsp; private int mlim;<br />&nbsp; &nbsp; private String moldval;</p><p>&nbsp; &nbsp; public EditIntLimited(EditText et,int lim)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; met=et;<br />&nbsp; &nbsp; &nbsp; &nbsp; mlim=lim;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; met.setOnKeyListener(new View.OnKeyListener() {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @Override<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public boolean onKey(View v, int keyCode, KeyEvent event) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (event.getAction()==KeyEvent.ACTION_DOWN) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; moldval = met.getText().toString();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (event.getAction()==KeyEvent.ACTION_UP) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String newval=met.getText().toString();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (newval.length()&lt;=0) return false;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int res= Integer.parseInt(newval);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (res&lt;0 || res&gt;mlim) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; met.setText(moldval);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //return true;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } catch (Throwable t) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; met.setText(moldval);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //return true;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return false;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; });<br />&nbsp; &nbsp; }<br />Там еще есть, но хватит...<br />}</p><p>и в oncreate вместо =(EditText)findviewbyid делаю типа<br />mSupTimeHours=new EditIntLimited((EditText)findViewById(R.id.suptimehour),23);</p><p>работает вроде в симуляторе по кр мере</p>]]></content>
			<author>
				<name><![CDATA[sxakludanto]]></name>
				<uri>http://forum.alexanderklimov.ru/profile.php?id=1174</uri>
			</author>
			<updated>2016-04-17T07:42:29Z</updated>
			<id>http://forum.alexanderklimov.ru/viewtopic.php?pid=496#p496</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Конвертер «38 попугаев»]]></title>
			<link rel="alternate" href="http://forum.alexanderklimov.ru/viewtopic.php?pid=455#p455" />
			<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-20T18:59:27Z</updated>
			<id>http://forum.alexanderklimov.ru/viewtopic.php?pid=455#p455</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Конвертер «38 попугаев»]]></title>
			<link rel="alternate" href="http://forum.alexanderklimov.ru/viewtopic.php?pid=446#p446" />
			<content type="html"><![CDATA[<p>А вот такие дополнительные вопросы:<br />Поэкспериментировал немножко. Два десятичных разделителя ввести не удалось, хотя по идее, если я правильно понял, всего,то что я по вашему совету сделал - это разрешил во вводе только цифры и десятичные разделители?</p><p>Но это ерунда, другой вопрос мне интереснее:<br />Попробовал добавить поле &quot;время&quot;. То есть хочу поле вида &quot;2цифры:2цифры:2цифры&quot; где первые 2 цифры из диапазона 0..23, следующие из 0..59 <br />Для начала кинул на лайаут из группы Ntxt Fields элемент Time . Никто не запрещает вводить по многу двоеточий и по длинным чисам между двоеточиями<br />Попробовал кинуть туда просто Plain Text и поставил в InputType только Time - то же самое<br />По идее, если бы можно было устанавливать ограничение на поля ввода &quot;только целое и минимальное 0, а максимальное 59&quot; можно было бы просто обойтись тремя полями ввода для этого. Но как такое сделать?</p>]]></content>
			<author>
				<name><![CDATA[sxakludanto]]></name>
				<uri>http://forum.alexanderklimov.ru/profile.php?id=1174</uri>
			</author>
			<updated>2016-03-20T08:08:47Z</updated>
			<id>http://forum.alexanderklimov.ru/viewtopic.php?pid=446#p446</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Конвертер «38 попугаев»]]></title>
			<link rel="alternate" href="http://forum.alexanderklimov.ru/viewtopic.php?pid=441#p441" />
			<content type="html"><![CDATA[<p>Здравствуйте!<br />Вылетает с ошибкой</p><p>java.lang.RuntimeException: Unable to start activity <br />ComponentInfo{com.example.ant_design.converter/com.example.ant_design.converter.MainActivity}: android.view.InflateException: Binary XML file line #1: Error inflating class android.widget.RelativeLayout</p><p>P.S. Разобрался.<br />Я растяпа прописал <br /> &lt;string name=&quot;activity_color&quot;&gt;#3399cc&lt;/color&gt;, <br />а надо было&nbsp; <br />&lt;color name=&quot;activity_colorr&quot;&gt;#3399cc&lt;/color&gt;</p>]]></content>
			<author>
				<name><![CDATA[Ant118]]></name>
				<uri>http://forum.alexanderklimov.ru/profile.php?id=875</uri>
			</author>
			<updated>2016-03-18T19:02:57Z</updated>
			<id>http://forum.alexanderklimov.ru/viewtopic.php?pid=441#p441</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Конвертер «38 попугаев»]]></title>
			<link rel="alternate" href="http://forum.alexanderklimov.ru/viewtopic.php?pid=137#p137" />
			<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>2015-09-21T09:07:36Z</updated>
			<id>http://forum.alexanderklimov.ru/viewtopic.php?pid=137#p137</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Конвертер «38 попугаев»]]></title>
			<link rel="alternate" href="http://forum.alexanderklimov.ru/viewtopic.php?pid=136#p136" />
			<content type="html"><![CDATA[<p>Добрый день!<br />У меня кнопка не реагирует на нажатия. Независимо от того, ввожу какие-нибудь данные или нет.<br />В чём может быть причина</p>]]></content>
			<author>
				<name><![CDATA[nilmak]]></name>
				<uri>http://forum.alexanderklimov.ru/profile.php?id=644</uri>
			</author>
			<updated>2015-09-21T06:13:16Z</updated>
			<id>http://forum.alexanderklimov.ru/viewtopic.php?pid=136#p136</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Конвертер «38 попугаев»]]></title>
			<link rel="alternate" href="http://forum.alexanderklimov.ru/viewtopic.php?pid=128#p128" />
			<content type="html"><![CDATA[<p>Обсуждение статьи <a href="http://developer.alexanderklimov.ru/android/longcat.php">Конвертер «38 попугаев»</a></p>]]></content>
			<author>
				<name><![CDATA[alexander.klimoff]]></name>
				<uri>http://forum.alexanderklimov.ru/profile.php?id=2</uri>
			</author>
			<updated>2015-09-09T17:06:38Z</updated>
			<id>http://forum.alexanderklimov.ru/viewtopic.php?pid=128#p128</id>
		</entry>
</feed>
