AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage(R.string.game_message); game_message = builder.create(); game_message.show(); final Timer t = new Timer(); t.schedule(new TimerTask() { public void run() { game_message.dismiss(); // when the task active then close the dialog t.cancel(); // also just top the timer thread, otherwise, you may receive a crash report } }, 5000);
Ссылка: https://xjaphx.wordpress.com/2011/07/13/auto-close-dialog-after-a-specific-time/
<xs:element name="rods">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="green" type="xs:positiveInteger" />
<xs:element minOccurs="0" name="white" type="xs:positiveInteger" />
<xs:element minOccurs="0" name="blue" type="xs:positiveInteger" />
<xs:element minOccurs="0" name="yellow" type="xs:positiveInteger" />
<xs:element minOccurs="0" name="red" type="xs:positiveInteger" />
<xs:element minOccurs="0" name="tan" type="xs:positiveInteger" />
<xs:element minOccurs="0" name="gray" type="xs:positiveInteger" />
<xs:element minOccurs="0" name="black" type="xs:positiveInteger" />
</xs:sequence>
</xs:complexType>
</xs:element>