Java blackBerry Slider Bar

HII, I created a scroll bar by referring to the example:https://github.com/blackberry/Samples-for-Java/blob/master/Advanced%20UI/src/com/samples/toolkit/ui/...,.

hereby I am slider properly displayed on my screen, but my problem is next to the slider bar, I want to show a play/pause button, so i used the code below:

SerializableAttribute public class UIExampleSliderScreen extends UIExampleScreen {}
private ButtonField _startPlayingButton;
Private ButtonField stop;

private ButtonField facebookButton;

public UIExampleSliderScreen() {}
Super (0);
_startPlayingButton = new ButtonField ("Play");
stop = new ButtonField ("Stop");

facebookButton = new ButtonField ("Facebook");
facebookButton.setMargin (5, 5, 5, 5);
HorizontalFieldManager Manager = new HorizontalFieldManager();

setTitle ("cursor screen");
final SliderField cursor;
cursor = new SliderField)
Bitmap.getBitmapResource ("slider2_thumb_normal.png"),
Bitmap.getBitmapResource ("slider2_progress_normal.png"),
Bitmap.getBitmapResource ("slider2_base_normal.png"),
Bitmap.getBitmapResource ("slider2_thumb_focused.png"),
Bitmap.getBitmapResource ("slider2_progress_focused.png"),
Bitmap.getBitmapResource ("slider2_base_focused.png"), 20,
0, 16, 16, FOCUSABLE).
slider.setPadding (20, 20, 20, 20);

slider.setBackground (BackgroundFactory
.createSolidBackground (0xD3D3D3));

Manager.Add (Slider);

Manager.Add (facebookButton);

Manager.Add (_startPlayingButton);
Manager.Add (Stop);
Add (Manager);

}

}
}

(1) I am able to show only the slide bar, my custom buttons are not displayed?

(2) the sliding bar is displayed on screen, fully, how can I reduce the length of my slide Bar?

the field of cursor seems to be designed to occupy the entire width:
public int getPreferredWidth()
{
Return Integer.MAX_VALUE;
}

you have to change this, or replace available to the Manager.
See
http://supportforums.BlackBerry.com/T5/Java-development/how-to-extend-Manager/Ta-p/446749

Tags: BlackBerry Developers

Similar Questions

  • Is it possible to manage more finely the seek slider bar in Windows Media Player?

    I cannot using the seek slider bar in Windows Media Player with the arrow keys.  Is it possible to manage more precisely where the cursor is moved using the keyboard?  Now, to jump back and forth when I use the arrow keys.

    Thank you!

    I cannot using the seek slider bar in Windows Media Player with the arrow keys.  Is it possible to manage more precisely where the cursor is moved using the keyboard?  Now, to jump back and forth when I use the arrow keys.

    Thank you!

    CTRL + right arrow

    Next playlist in the playlist history

    Focus not on the search bar

    CTRL + left arrow

    Previous playlist in the playlist history

    Focus not on the search bar

    CTRL + right arrow

    Jump forward (large increment)

    Focus on the search bar

    CTRL + left arrow

    Jump backward (large increment)

    Focus on the search bar

    Shift + right arrow

    Jump forward (small increment)

    Focus on the search bar

    Shift + left arrow

    Jump backward (small increment)

    Focus on the search bar

    Right arrow key

    Jump forward

    Focus on the search bar

    Left arrow

    Jump backward

    Focus on the search bar

  • OAM animation with slider bar does not not in DPS

    I created this animation to true explanation of wind apparent Versus | Sailing by NauticEd blog

    and it works very well. When I publish as oam and drop in an indesign folio then publish with the viewer content adobe or on my iPad - the animation slider bar won't work. Other animations work very well. Any ideas?

    This is probably because the animation generated by the term is not support or be expected to key events. Likely update HTML code to manage the gestures of touch (and to answer your next question, no, sorry, I don't know how to do this)

    Neil

  • Slider bar does not control the timeline?

    I'm back with yet another problem on the same project.

    This time, I'm trying to make a schedule, which should control what image of a clip on the root timeline. If relevant where the user swipes the slider bar, the appropriate information will be displayed inside that movie clip.

    Now I have really NO idea where to start the coding that will attempt to convert the location of the cursor on the scroll bar, which framework is displayed on this movieclip.

    But here's what I put inside the clip, it's the chronology:

    If (_parent.mc_timeline.ratio > = 0) {}
    gotoAndPlay ("One");
    }
    ElseIf (_parent.mc_timeline.ratio > = 33) {}
    gotoAndPlay ("Two");
    }
    ElseIf (_parent.mc_timeline.ratio > = 66) {}
    gotoAndPlay ("Three");
    }
    else {}
    gotoAndPlay ("One");
    }

    Basically what I try to inspire them to do, is go to a certain image tag (that's to say, one, two, or three) when it is at a certain time on the scroll bar.

    I've got 2 boxes of small screen in it as well, demonstrating that the scroll bar exports some sort of information. I just need to then use it to control which image appears in my video content.

    I have attached the file, please take a look. I'm sure it would be much easier to solve if you take a look.

    The questions are more than welcome.

    the following function will add parameter properties to a movieclip in order to allow a linear interpolation between two values:

    function f (mc:MovieClip, x 1: number, y1:Number, x 2: Number, y2:Number) {}

    MC.m =(Y1-Y2) /(x1-x2);

    MC.b = Y1 - mc.m * x 1;

    }

    to use f, just spent two known pairs x, y.

    for example, if your cursor (say sliderMC)

    far left is slidertrackMC._x and its

    position to the right is slidertrackMC._x + slidertrackMC._width - sliderMC._width

    and you want more position to the left of the slider to match the frame of a movieclip (say mc) 1 and its position to the right corresponds to the last image of mc (mc._totalframes), you would use:

    f (sliderMC, slidertrackMC._x, 1, slidertrackMC._x + slidertrackMC._width - sliderMC._width, mc._to talframes);

    you would then code your slider as follows:

    {sliderMC.onPress = function ()}

    this.startDrag (false, slidertrackMC._x, this ._y, slidertrackMC._x + slidertrackMC._width - MC._width slider, this ._y);

    clearInterval (current);

    Current = setInterval (dragF, 50;)

    }

    {sliderMC.onRelease = sliderMC.onReleaseOutside = function ()}

    this.stopDrag ();

    clearInterval (current);

    }

    function dragF() {}

    mc.gotoAndStop (Math.round(sliderMC.m*sliderMC._x+sliderMC.b));

    }

  • wave slide bar turns off

    When I opened my my wave slider is always disabled

    Hi J Henry611,

    I understand that you have a problem with the scroll bar wave Audio. I'll be happy to help you with this problem.
     
    (1) you receive an error message when you turn on the wave slider?
    (2) have you made changes on the computer before this problem?
     
    I suggest you run the Microsoft FIXIT from the link and if it helps.
    Diagnose and solve the problems of Windows audio playback automatically
     
    For reference:
    No sound in Windows
     
    I hope it helps. If you have problems in the future, please let us know. We will be happy to help you.
  • How to wear my java blackberry application to BB10

    Can someone please tell me how I can do?

    I have builf this from windows eclipse BB pluginh

    All the tools used? and no matter what other coding more?

    Thank you

    Java applications not supported for Blackberry 10, you must start with qt c ++ and Qml. see this link for abt blackberry 10 of info and tools:
    https://developer.BlackBerry.com/Cascades/documentation/Getting_started/setting_up.html
    https://developer.BlackBerry.com/native/documentation/BB10/Getting_started.html

  • BlackBerry 10 - Bar App download to the phone

    Hello fellow developers, and support BlackBerry

    I managed to create a Phonegap .bar file (my application is written in HTML 5 and Javascript).

    Now, I don't know what to do with this .bar file to get on my phone (before that I have send to BlackBerry World, I need to double-check CSS issues).

    On my BlackBerry 7 application, I simply created a Web page and has made a link to download a .jad file, which, in turn, set the properties of the .cod.

    For BlackBerry 10, I'm not sure of the process. Download directly says 'Cannot open the file'.bar file on BlackBerry, and using the .jad file it just opens the .jad file in a text file...

    Any help please?

    Another question - when I used my signing keys? Only for the BlackBerry world upload or when I actually create the app?

    Thank you for any assistance.

    Kind regards

    Gary Shergill

    You can use development tools to deploy on the device. Look at deploying blackberry command line. Give him the bar code device and IP access.

  • tutorial open gl for developer java blackberry

    I want a java opengl for blackberry developer tutorial... Please help me...

    I want to create a game then I want the bigenner high-level tutorial...

  • Java Blackberry ListField

    I developed an Rss Application for Blackberry (java) and I've posted titles successfully (list of Radio stations must play online) from code Rss File.i already developed to play these list of Radio channels, but my requirement is to play the first channel (the first list) when my list initially displayed (list of strings) , can someone help me where I can write my logic (the first string of default playback) to run after my displayed immediately channels?

    Here my code for Rss:

    SerializableAttribute public class RssScreen extends ListFieldCallback implements screen, FieldChangeListener {}
    Connection _connectionthread;
    private static ListField _list;
    Image of the chain;
    String title;
    private static Vector listElements is new Vector();.
    private static Vector listImage is new Vector();.

    public long mycolor;
    MainManager VerticalFieldManager;
    VerticalFieldManager subManager;
    int selectedList;
    Radio radio;

    public RssScreen() {}
    final Bitmap Imagearriereplan = Bitmap.getBitmapResource ("blackbackground.png");

    mainManager = new VerticalFieldManager(Manager.NO_VERTICAL_SCROLL |) Manager.NO_VERTICAL_SCROLLBAR)
    {

    public void paint (Graphics graphics)
    {
    graphics.drawBitmap (0, 0, Display.getWidth (), Display.getHeight (), Imagearriereplan, 0, 0);

    Super.Paint (Graphics);
    }

    };

    subManager = new VerticalFieldManager(Manager.VERTICAL_SCROLL |) Manager.VERTICAL_SCROLLBAR)
    {
    protected void sublayout (int maxWidth, maxHeight int)
    {
    int displayWidth = Display.getWidth ();
    int displayHeight = Display.getHeight ();

    Super.sublayout (displayWidth, displayHeight);
    setExtent (displayWidth, displayHeight);
    }
    };

    Add (mainManager);

    _list = new ListField()

    {
    protected boolean navigationClick (int status, int time)
    {
    Returns true;
    }
    public void paint (Graphics graphics)

    {
    graphics.setColor ((int) mycolor);
    Super.Paint (Graphics);

    }

    };
    myColor = 0x00FFFFFF;
    _list. Invalidate();
    _list.setEmptyString ("* only supplies not available *", DrawStyle.HCENTER "");
    _list.setRowHeight (50);

    _list.setCallback (this);
    mainManager.add (subManager);
    listElements.removeAllElements ();
    _connectionthread = New Connection();
    _connectionthread. Start();
    }

    private class login extends thread
    {
    Public connection()
    {
    Super();
    }

    public void run() {}
    Doc document;
    StreamConnection conn = null;
    InputStream is = null;
    try {}

    Conn = (StreamConnection) Connector.open ("http://toucheradio.com/toneradio/android/toriLite/toriplaylist.xml" + "; deviceside = true");

    DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance ();
    docBuilderFactory.setIgnoringElementContentWhitespace (true);
    docBuilderFactory.setCoalescing (true);
    DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder ();
    docBuilder.isValidating ();
    is = conn.openInputStream ();
    doc = docBuilder.parse (is);
    doc.getDocumentElement () .normalize ();
    NodeList listImg = doc.getElementsByTagName ("title");
    for (int i = 0; i)< listimg.getlength();="" i++)="">
    Node node = listImg.item (i) .getFirstChild ();
    listElements.addElement (textNode.getNodeValue ());
    image = textNode.getNodeValue ();
    }
    List of NodeList = doc.getElementsByTagName ("image");
    for (int a = 0;< list.getlength();="" a++)="">
    Node textNode1 = list.item (a) .getFirstChild ();
    listImage.addElement (textNode1.getNodeValue ());
    }

    }
    catch (Exception e) {}
    System.out.println (try ());
    } {Finally
    If (is! = null) {}
    try {is.close ();
    } catch (IOException ignored) {}
    } If (conn! = null) {}
    Try {conn.close () ;}
    catch (IOException ignored) {}
    }} UiApplication.getUiApplication () .invokeLater (new Runnable() {}
    public void run() {}
    _list. SetSize (listElements.Size ());

    subManager.add (_list);

    Invalidate();
    }
    });
    }

    }

    ' public void drawListRow (list ListField, Graphics g, int index, int y, int w)
    {
    String title = (String) listElements.elementAt (index);
    Image = (String) listImage.elementAt (index) string.
    Bitmap image1 = getBitmapFromUrl (image);

    System.out.println ("title" + title);
    System.out.println ("image" + image);
    int yPos = 0 + y;
    g.drawLine (0, yPos, w, yPos);

    g.drawText (title, 0, y, 0, w);
    g.drawBitmap (0, image1.getWidth (), image1.getHeight (), image1, 0, 0);

    }

    public {get {Object (ListField list, int index)
    {
    Return listElements.elementAt (index);
    }
    public int indexOfList (String prefix, ListField list, int, string)
    {
    Return listElements.indexOf (prefix, string);
    }
    public int getPreferredWidth (ListField list)
    {
    Return Display.getWidth ();
    }
    public final void insert (String toInsert, int index) {}
    listElements.addElement (toInsert);
    }

    ' Public Sub fieldChanged (field field, int context) {}

    }

    }

    you view the list for help
    subManager.add (_list);
    After this line, you can call play (listElements.elementAt (0)).

  • We can apply in-app with app purchase java blackberry

    Hello

    I want a suggestion that we can apply in-app with blackberry java application purchase. iPhone allows in-app purchase.

    Currently, there no API built to handle this.  However, it is something that is to come this year.

    See this press release for more information on the upcoming BlackBerry payment Service.

    http://press.rim.com/release.jsp?id=2710

  • Need help breaking into Java/BlackBerry development / this sample project

    I have a ton of experience OO, but I am new to Java and I am trying to enter development for BlackBerry, and my first problem is being stuck with this defective sample app that comes w/Eclipse or JDE or something (they call it "CityInfo"). When I run the Simulator, I see the drop-down list box, but by selecting its members does nothing, and I don't know enough about the environment/language to understand why.

    I installed all the packages that are free. They are Eclipse (I can't find a version number), JDE, the Java plugin for Eclipse and the BlackBerry JDE 4.3 to 4.7 components Packages.

    And when this has been resolved, perhaps someone can show me a good set of sample applications with tutorials. I'm trying to follow http://supportforums.blackberry.com/rim/attachments/rim/java_dev@tkb/9/1/Writing_Your_First_Applicat... but it's not compatible w / the environment that I run.

    Here is the code for the project CityInfo:

    package com.mycompany;

    Net.rim.device.api.ui import. *;
    Net.rim.device.api.ui.component import. *;
    Net.rim.device.api.ui.container import. *;
    Net.rim.device.api.system import. *;
    Net.rim.device.api.i18n import. *;

    Import net.rim.device.api.ui.UiApplication;

    SerializableAttribute public class CityInfo extends UiApplication {}

    public CityInfo() {}
    pushScreen (new CityInfoScreen());
    }

    /**
    @param args
    */
    Public Shared Sub main (String [] args) {}
    CityInfo PAP = new CityInfo();
    theApp.enterEventDispatcher ();
    }

    }

    final CityInfoScreen class extends form {}
    Private InfoScreen _infoScreen;
    Private ObjectChoiceField choiceField;
    private int select;

    public CityInfoScreen() {}
    Super();
    LabelField title = new LabelField ("town Information Kiosk", LabelField.ELLIPSIS)
    | LabelField.USE_ALL_WIDTH);
    setTitle (title);

    Add (new RichTextField ("cities"));

    Choice of String() = {"Montreal", "Waterloo", "Ottawa"};
    choiceField = new ObjectChoiceField ("select a city", choice).
    Add (choiceField);
    }

    public boolean onClose() {}
    Dialog.Alert ("Goodbye!");
    System.Exit (0);
    Returns true;
    }

    _viewItem private MenuItem = new MenuItem ("other info", 110, 10) {}
    public void run() {}

    Store the index for the city that selects a BlackBerry device user

    Select = choiceField.getSelectedIndex ();

    Create an instance of the screen that displays information about the city that
    the BlackBerry device user selects

    _infoScreen = new InfoScreen();
    UiApplication.getUiApplication () .pushScreen (_infoScreen);
    }

    };
    private MenuItem _closeItem = new MenuItem {("close", 200000, 10)
    public void run() {}
    onClose();
    }
    };

    protected void makeMenu (menu Menu, for example int) {}
    menu. Add (_viewItem);
    menu. Add (_closeItem);
    }

    private class InfoScreen extends form {}
    public InfoScreen() {}
    Super();
    LabelField lf = new LabelField();
    BasicEditField popField = new BasicEditField ("Population:", null, 20, Field.READONLY);
    BasicEditField stateField = new BasicEditField ("Province:", null, 20, Field.READONLY);
    BasicEditField sightsField = new BasicEditField ("sites:", null, 50, Field.READONLY);

    Add (LF);
    Add (new SeparatorField());
    Add (popField);
    Add (stateField);
    Add (sightsField);

    If (select == 0) {}
    lf.setText ("Ottawa");
    popField.setText ("3,694,820");
    stateField.setText ("Ontario");
    sightsField.setText ("Parliament");

    } ElseIf (select == 1) {}
    lf.setText ("Waterloo");
    popField.setText ("2,896,016");
    stateField.setText ("Ontario");
    sightsField.setText ("University of Waterloo");
    } ElseIf (select == 2) {}
    lf.setText ("Montreal");
    popField.setText ("8,008,278");
    stateField.setText ("Quebec");
    sightsField.setText ("Saint - Joseph Oratory");
    }
    }
    }
    };

    Hi and welcome to our forum!

    1. When you select item in your ObjectChoiceField nothing happens in terms of user interface. You must press menu and select "Details". Try it!
    2. Check out this http://docs.blackberry.com/en/developers/?userType=21
  • Hide the playback on a slide bar?

    Is there a way to hide the playback on a slide in CP8 bar? I know there is an option so it can be hidden on the quiz but I wonder if it was possible on non-quiz slides.

    Yes. There is a system variable that you can set it to 0 (off) using advanced Actions triggered by the event ON Slide enter for this particular slide.

    You must use another event to 1 (on) again otherwise the PlayBar will remain inactive until the end of the lessson.

    Do not exactly remember the name of the system variable (I'm on an iPad at the moment), but it's something like cpCmndPlaybarVisible

  • Reading not systematically hiding on the first slide bar

    Hello

    Another issue/question - I seem to have a large number of them suddenly.

    I build a project with a series of video slides where I want to use the playback bar as a means of uses to turn early, legends, etc. on video slideshow and break.  But I don't want the play bar on the first slide, which is just a simple swipe of welcome or any of the other non-video blades.  I thought it was an easy thing to do by setting "Hide bar reading" action entering the slide.  I thought that was working fine, but now I noticed that when I test the project, using the game in Web browser option or actually publish the site, the PlayBar appears at least half the time.  If I just refresh the browser it disappears... sometimes.  Sometimes, if it does not and if I hit refresh, it pops up so...  I put the project on a server and played from a different computer (a PC, because I'm on a Mac) and I get the same behavior always incompatible.  The playback bar hide work regularly in other slides a simple action or as part of a tip or shared action.

    I don't remember if this happened on earlier versions of the project, but it may well have been because I wasn't really looking for it.  I have nothing particularly advanced past in that the first slide and the only thing I could think was 'different', that an average project was that I used the widget CPGuru OCD, but I took on the first slide just to check, and that doesn't seem to change the question.  Does anyone have an idea, what could be the cause so I can get him to stop?

    I understand a cludge which seems to work, but don't really want to use it.  Basically, I duplicate the slide, remove the break of all elements (in this case a box single click) and then reduce the duration of all the elements and the slide itself juste.1 second - so I basically start the project with a duplicate version of .1second of the first slide that runs immediately in the 'real' first slide.  In this way, it seems that if she fails to close the IPL when he effectively reload this slide it hides the PlayBar so that the user sees only a small Flash.

    Any help in debugging this I can avoid the cludge is greatly appreciated.

    System:

    Mac Pro runs the Mavericks

    Captivate 7.0.1.237

    Flash Player 10 selected in the editing preferences

    Sometimes, depends on several factors, advanced by the first on enter (or simple) action has a slight delay and that's what I think. Was the same in all versions. The only solution is to avoid action on enter on the first slide, to add a short slide you did and trigger the action at the beginning of the second slide.

  • How to make the progress compared to the time of the slide bar

    Hello

    I have videos in my career, and I want to browse a progress bar, as well as videos on youtube. The bar of captivate grogress is relative the holes. I need a progress bar over the duration of the video or the time of the slide.

    Is there a way to make the bar compared to the slide, or maybe add a bar inside the slide"is relative to the time of the slide. I also thought to use the interaction of web object and put a web video player inside, but which player is best for captivate?

    Any help will be appreciated!

    TNX

    You can insert videos as the videos of the event. The videos will have their own progress bar.

    Anthony

  • missing slider bars

    My bars disappeared under the tone control slider. Now there are boxes with arrows instead.  I don't know what I did or how to solve this problem, but you can help me get back them?  PLEASE?

    Hi klm59, I'm guessing it's because you're in the library Module and not the develop Module.

    You can access controls applied to the finest development in Devolp Module. The boxes with the arrows are the quick editing tools.

Maybe you are looking for