User interface for the touch and trackball design

Hello everyone

Design the user interface for my ap, and I have a question.

My access point has a lot of button image.

I can imagine the ImageButton for touch screen and trackball.

I have known that using touchevent for touchscreen and trackwheelClick for the trackball.

When I use both in an application, the access point is not make sence to use,

If this is not the case, can I know the user device or not doesn't have trackball or both.

My code:

final BitmapField bf_Projection = new BitmapField (B_Projection, Field.FOCUSABLE) {}
{} public void onFocus (int direction)
this.setBitmap (B_Projection_Down);
}
public void onUnfocus() {}
this.setBitmap (B_Projection);
}
{public boolean trackwheelClick (int status, int time)
UiApplication.getUiApplication () .pushScreen (p_Screen);
this.setBitmap (B_Projection);
Returns true;
}

protected boolean touchEvent (TouchEvent message) {}
int x = message.getX (1);
int y = message.getY (1);
Make sure that the point is in this area
If (x < 0="" ||="" y=""> < 0="" ||="" x=""> getExtent () .width: y > getExtent () .height) {}
Return super.touchEvent (message);
}
{Switch (message.getEvent ())}
case TouchEvent.DOWN:
this.setBitmap (B_Projection_Down);
break;
case TouchEvent.UP:
this.setBitmap (B_Projection);
break;
case TouchEvent.CLICK:
case TouchEvent.UNCLICK:
UiApplication.getUiApplication () .pushScreen (p_Screen);
this.setBitmap (B_Projection);
break;
}
Return super.touchEvent (message);
}
};

Clintliu wrote:

case TouchEvent.CLICK:
case TouchEvent.UNCLICK:
UiApplication.getUiApplication () .pushScreen (p_Screen);
this.setBitmap (B_Projection);
break;

These two make no sense at all - either treat CLICK or UNCLICK because otherwise you will push the screen twice.

That being said - the best way is to ignore the fact touchEvent() exists and replace just the click of navigation and/or uncheck.  They will work correctly for navigation in trackpad and touchscreen / click.

One of the problems with the touchscreen is that if you click on a non-focus field or in empty space currently target field will get the event.  You can override the entire event (return super.touchEvent () in any case) DOWN carefully to detect this situation.

Tags: BlackBerry Developers

Similar Questions

  • How disable (reverse) ui icon, a user interface for the production of coding / engineering mode

    Excuse me

    I'm coding a sample UI on LabView8.2

    full function be activated in the user interface, and engineer can adjust the factors through the UI program

    now, I want to classify the mode of production and engineering for the user interface

    the engineer mode - enable full function of engineering change

    mode of production - only activate a small function for the operator to change

    I hope not coding 2ea program, I hope use example of process to achieve

    so...

    I want to builld a UI for the mode of production

    Have disable (reverse) Labview technic?, let icon convert 'gray'---> disable

    the user can see the icon on the user interface, but they cannot resolve the factors of function

    Thank you

    "2ea program."

    "disable (reverse) technic?", let icon convert 'gray'---> disable

    I don't know what some of the terminology is that you use.  Or what you mean by disabling functions or icons.

    I'm going to guess that you really want to be able to disable and gray to controls on the front panel.  You can write to a property node for each of your orders of façade called 'off '.  You can activate, deactivate and disable/gray.

  • OS 6.0 - Bug in the user interface for the custom control

    Hello

    I discovered a bug of UI on OS 6.0 with one of my UI controls. It seems to be linked to the control itself and how it is the calculation of the width. If my screen is full screen, painted correctly control, but as soon as I change the subLayout of the screen, the control still has a full screen width

    I spent a few hours trying to understand this one... but I can't seem to get their hands on the issue. I am sure that he as to do with the way in which it is the calculation of the width of the control of 99%... If someone could point me in the right direction would be appreciated...

    Thank you

    See the code snippet below

    UITest class

    public class UITest extends MainScreen
    {
      public UITest(long style)
      {
        super(style);
    
        add(new ButtonField("This is my test button", ButtonField.USE_ALL_WIDTH));
        TextBoxField ActionLog = new TextBoxField(0, 75, TextBoxField.USE_ALL_WIDTH);
        HorizontalFieldManager hfm = new HorizontalFieldManager(Manager.USE_ALL_WIDTH);
        hfm.setBorder(BorderFactory.createSimpleBorder(new XYEdges(), Border.STYLE_SOLID));
        hfm.add(ActionLog);
        hfm.add(new ButtonField("This is my test button", ButtonField.USE_ALL_WIDTH));
        add(hfm);
      }
    
      protected void sublayout(int width, int height)
      {
        layoutDelegate(width - 40, height - 40);
        setPositionDelegate(10, 10);
        setExtent(width - 20, Math.min(height - 20, getDelegate().getHeight() + 20));
        setPosition(10, (height - getHeight())/2);
      }
    }
    

    Class TextBoxField

    // http://na.blackberry.com/eng/devjournals/resources/journals/jul_2005/creating_textbox_field.jsp
    public class TextBoxField extends VerticalFieldManager
    {
    
      private static int PADDING = 2;
      private static int DEFAULT_WIDTH = 100;
      private int _managerWidth;
      private int _managerHeight;
      private String _pattern;
      private EditField _editField;
    
      public TextBoxField()
      {
        this(0, 0, Manager.USE_ALL_WIDTH);
      }
    
      public TextBoxField(long style)
      {
        this(0, 0, style);
      }
    
      public TextBoxField(int width, long style)
      {
        this(width, 0, style);
      }
    
      public TextBoxField(int width, int height, long style)
      {
    
        super(Manager.NO_VERTICAL_SCROLL | style);
        _managerWidth = width;
        _managerHeight = height;
    
        VerticalFieldManager vfm = new VerticalFieldManager(Manager.VERTICAL_SCROLL | style);
        _editField = new EditField(style)
        {
          public void paint(Graphics g)
          {
            super.paint(g);
          }
        };
    
        vfm.setPadding(PADDING, PADDING, PADDING, PADDING);
        vfm.add(_editField);
        add(vfm);
      }
    
      public int getPreferredHeight()
      {
        int fontHeight = getFont().getHeight() + (2 * PADDING);
        return (fontHeight > _managerHeight) ? fontHeight : _managerHeight;
      }
    
      public int getPreferredWidth()
      {
        if (_pattern != null)
        {
          return getFont().getAdvance(_pattern);
        }
        else
        {
          if (_managerWidth == 0)
            return DEFAULT_WIDTH;
          else
            return _managerWidth;
        }
      }
    
      public void paint(Graphics g)
      {
        super.paint(g);
    
        // BUG FIX: 17-08-2010
        // Before drawing the border, save the current color, after
        // change the color for the border, paint the border and re-set
        // back to the original color.
        int prevColor = g.getColor();
        g.setColor(Color.BLACK);
        g.drawRect(0, 0, getWidth(), getHeight());
        g.setColor(prevColor);
      }
    
      public void sublayout(int width, int height)
      {
        if (_managerWidth == 0)
          _managerWidth = width;
        else
          _managerWidth = getPreferredWidth();
    
        _managerHeight = getPreferredHeight();
    
        super.sublayout(_managerWidth, _managerHeight);
        setExtent(_managerWidth,_managerHeight);
      }
    
      public String getText()
      {
        return _editField.getText();
      }
    
      public void setText(String text)
      {
        _editField.setText(text);
      }   
    
      public int getTextLength()
      {
        return _editField.getTextLength();
      }
    
      public void setTextWidthPattern(String pattern)
      {
        _pattern = pattern;
      }
    };
    

     

    No, PopupScreen was still available. We have certainly used it in 4.2.1 but it was available before that as well.

    With PopupScreen, create it with your manager custom as a delegate.  In this handler, override sublayout to do most of the work. Sublayout of PopupScreen can contain a single functional element, if you wish: setPosition (x, y) (after the call to super.sublayout). SetExtent of the delegated manager will have an impact on the parent company PopupScreen fine (the screen apply the theme to the Manager and take more room, but it's OK).

  • Why is there no user interface for moving the cache locations/profile?

    OK, so it took me a long time to find how to move the location of the cache and the reason is that it is done by an entry that does not exist originally, so a user need to know the channel config even magically set it.
    (this is browser.cache.disk.parent_directory for those in the same waters as me) and it still did not move the location of the profile...
    To change your profile location? The doc only that talks on this subject here:
    http://KB.mozillazine.org/Moving_your_profile_folder
    and it does not work so well for me (i.e. all) but why have I not copy and change things? It is created automatically the first time you start so FF cannot use the same method to create a new profile in an empty space?

    And my real question: is there a valid reason, that there is no element of the user interface to set the location of the profile cache directories?

    There never was a user interface for these parameters - Mozilla is "stingy" about adding prefs that will be only once required by the installation of the user interface. Also, I assume that the developers are convinced that a power user who thinks that even on the displacement of the cache will be searching for instructions on how to do it. (BTW, when you move the cache profile is moved to the folder path profile, its origin "local settings" folder - thus it is automatically moved out of APP DATA.) You can still use this pref to put the cache exactly where you want. I use a small partition for the TEMPORARY files and the cache of Firefox, so they don't one of my biggest readers logics frag.)

    Regarding the difficulties with a profile in motion, developers have threatened to remove Firefox profiles altogether for the last 3 years or 4 and WONTFIX had no Bug filed all improve or add new features to the Profile Manager. This will probably happen this year some time.

    Between you and me, there is a new Profile Manager application just went Beta, which will probably "be released" just as the existing profile manager is extracted from Firefox. It is very schweet and is always at the point where the developers are in response to reports of bugs on features to include and adding the items that are important. I have tabled a minor Bug on the characters allowed in a profile name, which was fixed in 3 or 4 weeks.

    https://developer.Mozilla.org/en/Profile_Manager

    https://wiki.Mozilla.org/Auto-Tools/projects/ProfileManager

    http://FTP.Mozilla.org/pub/mozilla.org/utilities/ProfileManager/1.0_beta1/

    You must have Windows Visual C++ 2010 redistributable installed for the application of the Profile Manager XUL Runner to work right now. I hope that this will change very soon, and all the necessary files will be included in the Zip package.

  • How to intercept the sockettimeout exception message and display in the user interface of the view?

    Hi my jdev - 11.1.1.7 version

    I ask a socket connection in my AM and I want to catch the exception of the sockettimeout of t and display the error message in the user interface of the view layer.

    I use customException class that extends DCErrorHandlerImpl, but if we use try catch, then exceptions doesnot reach customclass.

    How to catch exceptions and return to view the layer if we use the operation binding. ?

    Because you call the operation via the link layer, which is perfectly fine, you do not get an exception at all. Exceptions thrown in methods called via the link layer are captured by the framework and transferred to the appellant in the operation binding.

    For that, you get the list of errors after the call returns and add them as messages of faces

    execute the method

    Method.Execute ();

    List errors = method.getErrors ();

    If (! errors.isEmpty ()) {}

    handle errors errors here is a list of exceptions!

    We only get the first

    E receive = errors.get (0);

    FacesMessage msg = new FacesMessage (FacesMessage.SEVERITY_ERROR, e.getMessage (), "");

    FacesContext.getCurrentInstance () .addMessage (null, msg);

    }

    no error return to normal work

    Timo

  • define the users for the studio and server Integrator

    Can you get it someone please let me know how to set the users for the studio and Integrator server so that the user can be used to display the page in the user interface but not change. I want to set the studio user that will access the Page but not modify it. And the user at the server of the Integrator must be able to view scheduled tasks.

    Thank you very much.

    Kind regards
    Amrit

    Amrit,

    Points are awarded automatically when you mark an answer (5 pts) useful or correct (10 pts).

    Is there a help icon in the label of the legend for the different rankings. The answer to your question is on this page.

    RLJII

  • How can I change the language of the user interface for my trial version of Illustrator CS6?

    I don't know why, but I had the Danish, English or Dutch version would be nice.

    Re-download the package in the correct version. There is no way to change the language of the user interface on the trial in the case. Also check the settings of your system language. By default, installs broken will use the settings system locale. that cannot be replaced with a serial number when you purchase the product.

    Mylenium

  • How to prevent the user to create the 'analysis' and 'dashboard '?

    We have a requirement that is to restrict the user create new 'analysis' and 'dashboard '. As we know when the connection ' host: port / analytical, in the top of the page there is a drop down list of 'New' where users can create new 'analysis' and 'Dashboard', how to set up the privilege to disable the option 'Analysis' and 'dashboard '?

    OBIEE version: Oracle Business Intelligence 11.1.1.7.0

    Thank you
    Jinbo

    Summary:

    1 set the "New Menu" permission in the 'home page and Header' refusal, then the 'New' menu will disappear from the top right of the page, which prevents the user to create dashboards and new anlysis

    2. in order to not allow the user to modify the catalog, set the permission of "access user interface of the catalogue"in the ' welcome and header' to refuse."

    3. even made 1 and 2, we have always have a path that the user can create new report, it's "House"menu." To avoid this, our method is to set the explicit right to catalog for the application role.

    Thank you
    Jinbo

  • Settings of the user interface in the preferences grayed out

    I'm a Super Administrator and administrator of the workspace and still I can not for queues or UI settings in the preferences. I need to change the startup location to "Start the process" of "To Do".

    Set preferences for the user interface in the preferences > settings of the user interface tab. The following preferences are available.

    • Start location: Specifies the page that displays when you access the workspace HTML. The four options available are the processes to start, track, and Favorites.

    The settings of the user interface tab is grayed out why and how I get it back?

    Thanks to our QA group, we found a way to access the settings of the user interface. The single tab activated when opening preferences is out of the office. By selecting the button "+" in the tabs on the desktop calendar, queues, and the user interface settings are allowed.

  • Change the colors of the images between monitors while the user interface remains the same

    Hey! Im having a problem where photoshop change colors when I move the window between my monitors, see here: http://sta.sh/04y5s60vf3j is not due to the monitors themselves being different, it does actually change after a few seconds to move inbetween the monitors. The left was callibrated with an elite group of spyder 3 I do not have access to. I applied the file with windows instead of the utility of spyder color management. The second is new, and it is not callibrated by what that is, but instead was done by hand with integrated RGB brightness/contrast/custom settings. Two of them are very close to eachother, so enough for my taste. but when photoshop changes which looks like the image, it is causing problems. Curiously, when I disable calibration of the screen on the left, the image doesn't change color between monitors, but instead always appears as it does on the right. but then they do not match to the top and all the screen looked washed out because it's uncallibrated, so that won't do me any good. Something else interesting to report, is when this image is saved as a. JPG and read with firefox, the image appears exactly as the monitor on the LEFT (which is my primary monitor) despite the monitor left which is the force has changed. does anyone have any suggestions? It also appears that photoviewer windows behaves in the same way, although firefox does not work. Meaning when I open an image in all 3 on the left monitor, they look alike, but when opened on the right monitor, windows photo viewer and photoshop both display the image such as the brighter and redder that firefox works. It's frustrating, because it seems that photoshop changes the image with my measured on my monitor left to match what it looks like on the web, it does. but it does not for the monitor right, or the left is uncallibrated. Another question, I can see with this is even if the user interface is the same shade of gray, the images are different between the monitors because of this change. Does anyone have suggestions?

    -BD

    What you need to understand, is that Photoshop converts the image data, the document profile for the display profile, independently for each display. It is a managed pipeline standard color display. Windows Photo Viewer does the same thing (but do not have a lot of other applications).

    When you move a picture on the screens, it snaps when you drop; as the new display profile is picked up.

    Calibration is only partly about changing the monitor's response. The second part a profile, which is a complete description of the screen in its calibrated State. Then a conversion of standard profile is performed as he goes to the screen. The profile has a much higher level of accuracy than the single calibration.

    ---

    If the image on the web has the stripped document profile, Firefox with default settings does not have this conversion and sends just the unchanged data to display. In other words, it is not color managed. This behavior can be changed, but get your first straight base display profiles. Unless you get a new calibrator it is no that you can do to match these two views.

  • Model of User Interface for interactive report region

    3.2 where we establish the model of user interface for interactive reports region?

    No matter what on the theme of the box I go to, the region of interactive reports shows the same. What and where do I change the model so that alternate lines use two different colors?

    There is no model for interactive reports as for a 'normal' report You need to edit the CSS and provide your own for this purpose.

    I think that most of the things are marked with the #apexir - firebug with combustion chamber is priceless. This thread may help:

    Re: changing the appearance of the interactive report.

  • I want to download the User Guide for the Apple TV user guide.  How can I do?

    I would like to download the User Guide for the generation of Apple TV User Guide 4.  Impossible to do on the Apple official site.  East - intentional; and if so, is there another way to download this User Guide?

    Hi you have this internet guide http://help.apple.com/appletv/

  • Update of iTunes. IPod sync and lost everything but 10 audio books, passed to Touch, four selected works, only on the Touch and not the selected one. Afraid to synchronize other devices that I'll lose everything. ITUNES update BUG

    I updated iTunes 10 Windows a few days ago. I sat to continue listening to an audiobook on my iPod. 110 audio books in sync with the iPod, there are now 10 and not that I want to listen to. I opted for a touch and tried to load the book on that. There are four books selected for the touch. The book I want to not sync and there is only one book on the Touch.  This book is not all the book selected for synchronization.  I am afraid now to sync one of my other devices to iTunes because I'm afraid I might lose even more data.

    Of course, there is a bug in the new update iTunes 12.3.3.17.  Help, please.

    Are audio books in your library? If it is not in your library can see you in your media folder? Your library authorized the Apple ID is used to buy the books? The upgrade of Windows can break the record of the permission on the computer.

    TT2

  • HP 255 G4: problem with sensitivity to the touch and slider jump

    My question - problem could be funny, but it's a problem.

    I bought HP 255 nine G4, from the box. First impression was: a pleasant experience, but first touch was terrible. I had several laptops, but never the same problem: cursor is wavering and being so inprecise it is almost impossible to locate some details using the key.

    I have included a picture of the surface of the laptop. Should I maybe take off this perforated layer and reach the brilliant below surface? I tried to peel on the rounded corners, but he can't go easily, so I didn't damage it.

    Please give me a sugestion. :-)

    I'll answer myself, could someone help.

    When I installed WIN 10, all problems are gone.

    With WIN 7, nothing worked, I was responsible for the search and looking for drivers, but USB 3.0 has not worked, F keys did not work, touchpad was terrible, all together, very bad.

    With 10 WIN, everything worked, only a few development was necessary.

    With the new computer (product end of September 2015) the new system (WIN 10) so enjoy.

  • Is there an online community which deals with promotion within the Fed/DoD IT apple? Currently, I work for the NAVY and a nightmare HP NMCI. Thank you.

    It was more of a general question asking management and online community eventually the federal and/or DoD workers who might be unhappy with the current situation of technology of the federal workforce and so therefore could discuss, share and work information to try to improve this situation. Thank you.

    edhazelwood wrote:

    It was more of a general question asking management and online community eventually the federal and/or DoD workers who might be unhappy with the current situation of technology of the federal workforce and so therefore could discuss, share and work information to try to improve this situation. Thank you.

    «I currently work for the NAVY and a nightmare HP NMCI.»

    If you are now looking for a Mac NMCI nightmare? Evolution towards a Mac environment will do nothing to improve the NMCI environment.

    Why don't do you a Google search or speak to your personal COMPUTING support to discuss your NMCI questions? These forums are to help users of the Apple/Mac product with Apple/Mac product questions.

Maybe you are looking for

  • Bug when printing unicode

    I try to print some unicode characters. The browser fine poster, but what impression he show some square as when unicode is not found. For example, try http://getbootstrap.com/components/. Unicode is well displayed in the browser, but when I print (w

  • How can I rearrange the mailboxes in Mail box?

    I can't reorganize the mailboxes in mail box in El Capitan by dragging them.  Is there a new way to do this? Moving the mailboxes of email in the sidebar to re-order them worked until I upgraded to El Capitan V10.11.5.  Now I can simply drag a mailbo

  • Can u run two different browsers both in ipad pro?

    is it possible to run two browsers both on windows divided into an ipad pro? If I want to use safari and firefox at the same time?

  • Graph XY lasso data points

    Hello. I am looking for a way to draw several XY cursors, then use a lasso (like paint or photoshop) tool to select a subset of the sliders. Lasso would allow the user to outline to draw a region with the mouse to select cursors within the lassoed ar

  • Photosmart 5520 e: How do you print long distance using an IP address?

    Need to print to the Photosmart of old mother 5520e from my PC in another city. Is it possible to send documents to the printer using the IP address of the printer? If so, how to do that? Thank you!