2017년 1월 16일 월요일

Two Notifier issues


I'm having a couple of notifier issues.

First, I'm using a clock with a blank notifier to keep a screen alive. The clock fires every 10 seconds. The message in the notifier is blank. Even so, every 10 seconds a small but very visible dark gray block appears right in the middle of the screen. Does anyone know of a way to make the notifier background transparent?  See the attached pic of the timer block.

Second, I'm using Notifier to deliver both warning and help messages in my program. I'd like the help screens to have a different background and text color from warning messages. I've used the blocks to attempt to set the colors but they don't seem to be doing anything. See the attached pic. Anyone know of a workaround for this?

 NTTimers.png

 NotifierHelp.png

--
1. see here How to keep the screen on and use background color = none
screenOn.aia
2. use HTML tags for the colors, see also New formatting possibilities with the Notifier
notify.aia
label.aia

--
see also the documentation http://ai2.appinventor.mit.edu/reference/components/userinterface.html#Notifier

Notifier

The Notifier component displays alert dialogs, messages, and temporary alerts, and creates Android log entries through the following methods:
⦁ ShowMessageDialog: displays a message which the user must dismiss by pressing a button.
⦁ ShowChooseDialog: displays a message two buttons to let the user choose one of two responses, for example, yes or no, after which the AfterChoosing event is raised.
⦁ ShowTextDialog: lets the user enter text in response to the message, after which the AfterTextInput event is raised.
⦁ ShowAlert: displays a temporary alert that goes away by itself after a short time.
⦁ ShowProgressDialog: displays an alert with a loading spinner that cannot be dismissed by the user. It can only be dismissed by using the DismissProgressDialog block.
⦁ DismissProgressDialog: Dismisses the progress dialog displayed by ShowProgressDialog.
⦁ LogError: logs an error message to the Android log.
⦁ LogInfo: logs an info message to the Android log.
⦁ LogWarning: logs a warning message to the Android log.
⦁ The messages in the dialogs (but not the alert) can be formatted using the following HTML tags:<b>, <big>, <blockquote>, <br>, <cite>, <dfn>, <div>, <em>, <small>, <strong>, <sub>, <sup>, <tt>. <u>
⦁ You can also use the font tag to specify color, for example, <font color="blue">. Some of the available color names are aqua, black, blue, fuchsia, green, grey, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow

Properties

BackgroundColor
Specifies the background color for alerts (not dialogs).
TextColor
Specifies the text color for alerts (not dialogs).

--

댓글 없음:

댓글 쓰기