I am attempting to use the materialize framework. I am very much liking the features it provides but I don't really care too much about making everything "responsive" right now. I would like to make things somewhat "static", meaning when I resize the browser, everything stays the same size (and user can scroll around in a smaller window to find what they want). I plan to later work on the full "responsiveness" to support things like mobile, window resizing, etc. Below shows whats currently happening. I downloaded the whole framework so I'm free to alter the .css that comes along with it, but I'm not really a .css expert so not really sure where to begin.
Full Screen
Resized Screen - obviously cannot stay like this forever
Any help is much appreciated.
First to answer your question directly: I assume you are using the Materialize grid? Meaning you have divs with class names like "col l6"? To have non responsive elements you should not use any materialize column class names. It will then just be regular old HTML and CSS that you define. Materialize only applies its CSS to elements that use its classnames.
Now for a recommendation: This will probably break some of the features of Materialize. Or at the very least, it will look gross and you will have to add padding/margins everywhere manually. Then if you want to go back and enable mobile responsiveness, you will have to manually remove all of that. You will also have to use old fashioned CSS rules to determine you element sizing. Every element will need a height and width rule applied to it. It is a lot harder to add mobile responsive classes later. It will save you a lot of time if you just do it now. It's quite easy in Materialize once you get the hang of it.
One of the main reasons that Materialize and Bootstrap and the like are used, is to make mobile responsive websites easy. It really is an essential skill to learn for web development these days.
Related
I am wondering what the best way to approach this problem will be. The approach I had thought of doesn't seem very optimal, and I was hoping someone might have encountered this problem before, or might have a better solution.
My approach seems to be to get the coordinates of my screenshot and the element I am trying to remove, along with the length and width of both my screenshot and the element I am trying to remove. Then I would have to make sure that the element exists at least partially within my screenshot, and set two points at the opposite points of the region that exist within the screenshot, and finally paint over that area.
I am implementing automated layout testing, which will require me to test whether web elements remain the same between tests, while ignoring web elements that may exist inside of these web elements. One example of this may be the Stack Overflow navigation bar. I might expect the logo, help bar and search bar to appear in the same place every time I visit Stack Overflow, but I do not care about the number of inbox messages that I have, and nor do I care about testing the reputation number and the profile image, nor whether I have new achievements.
What would be your approach to this problem?
Everything what you've asked [One example of this may be the Stack Overflow navigation bar. I might expect the logo, help bar and search bar to appear in the same place every time I visit Stack Overflow, but I do not care about the number of inbox messages that I have, and nor do I care about testing the reputation number and the profile image, nor whether I have new achievements] can be achieved easily via Galen Framework
Galen is an open-source tool for testing layout and responsive design of web applications. It is also a powerfull functional testing framework.
How does it work?
Galen Framework uses Selenium in order to open web browser and select the tested elements on page. It has a special language to describe the layout of web page for different browser sizes. You just need to define your own tags for devices and sizes and then using the galen spec language write checks for each element on page. The best way to test the layout is to check location and dimensions of elements relatively to each other.
I'm adding in some functionality to a MIDP-based app which requires me to track whether or not an Item has focus. I'm only really concerned with field-style Items and need to determine when the user has finished inputting data into the Item.
I'm aware that CustomItem has the traverse() callback, but I can't find anything similar for classes like DateField, TextField and ChoiceGroup.
I'm also aware of Display.setCurrentItem() but for some strange reason there doesn't seem to be a Display.getCurrentItem() method.
Implementing all the controls as CustomItems isn't really an option as it's a pre-existing app and there are quite a lot of controls to deal with. I can't believe that nobody has run into this issue before, but I've searched on here and google to no avail. Hopefully I'm just missing something obvious in the API, but if there isn't a definite answer then creative solutions are welcome!
In MIDP 2 lcdui API, the only field-style Items are, well, interactive subclasses of Item: TextField, DateField, Gauge.
For above items the closest match to what you are asking about seem to be provided by ItemStateListener (take a look at API javadocs here if you're interested).
...used by applications which need to receive events that indicate changes in the internal state of the interactive items...For implementations that have the concept of an input focus, the listener should be called no later than when the focus moves away from an item whose state has been changed.
If you plan to use this API, carefully check the docs to verify that it indeed gives you what you want - there are some subtle limitations there. If it turns out that you need greater control than that, your options are either to use low level UI (Canvas, events) or 3rd party library like LWUIT, J2ME Polish...
I have a table that displays the output from a database, this can often be up to or over 10,000 rows. I'm looking to implement a 'quick find' function that will allow the user to easily scroll to a row with the value for which they search.
The idea is for this to be very similar to Chrome or Firefox's quick find. So:
User hits 'CTRL+F'
A box pops up:
The user can then quickly skim through the table pushing / or /\ to each matching value
My question is, does such a table already exist? I have looked at NatTable and XViewer but they both seem like rather large additions for a relatively minor change.
Another library I've looked at that is close to fitting the billl is Lucene TableSearcher unfortunately this is designed for filtering rather than highlighting. However it may be an avenue worth investigating.
It's not quite the same, but JFace does have support for filtering views. You type in a text box and view contents shrink to what matches the filter. It's basically another way to present search/find functionality to the user.
You can see this in action in Eclipse Preferences (the filter text field about the navigation tree in the dialog). See org.eclipse.ui.dialogs.FilteredTree class. I don't believe there is a FilteredTable or equivalent, but underlying facilities are pretty generic, so it shouldn't take much work to put one together. Take a look at FilteredTree source and go from there.
The solution I chose wasn't as simple as I'd hoped but has a satisfactory performance.
The tables involved are virtual tables that can be very large. So on top of this upon loading the dataset we start a thread to build an index in the form of a list. Because these tables can be very large (but aren't often) we set a 50mb limit to this list and stop indexing it when we hit it. For most cases this is perfectly acceptable but for the larger tables it means that whilst it may be slower, it is considerably more stable than other options.
The 'search' is a simple SWT textbox with ModifyListener that iterates over the list, performing a 'contains' on each entry. Upon a match the row and column are calculated from the index number (0=0,0, 1=0,1 ..).
It would have been nice to have a simple 'drop in' solution for this but all of the tables on offer had too many features.
Use FilteredItemsSelectionDialog dialog box
I have to generate results of searching i Vaadin.
Probably the fastest way to do it is to put results into table, but I need some custom layout and the FormLayout for every row would be the best.
Unfortunately if I put rows formatted by FormLayout into table - the generation of the results takes about 15-20 seconds.
If i put just some labels/buttons without putting it in a layout the generation takes about a second - and that's fine.
I've read the vaadin manual about optimising UI and I still don't know what to do to shorten the time needed to generate the results.
How do you generate results in Vaadin if it can't be presented as a table?
Ok, the solution is... use CssLayout inside a table. Although CssLayout still consists of 3 div's it's much faster than FormLayout.
I think that using a FlowPanel from GWT would be even better but I didn't have enough time to check it.
And don't forget about setPageLength method of a Table - the lazy loading is the main reason to use a Table :).
Offering a few more layout options:
WeeLayout add-on: fast layout, not many expensive layout calculations in JavaScript, and a lighter DOM structure than in CssLayout
DashLayout add-on: even lighter DOM structure (but more JS calculations), and offers more flexible styling options for CSS (arbitrary margin/border/padding values).
to start with I've gone through the entire notepad tutorial, I'm a professional game programmer who has some extra time. (though most of my time has been in C++, I did take a year or two of Java classes in college, and remember some of it).
I'm not sure the site is a good site to ask questions like this.. If someone has a Forum that might be a good place to ask these newbie questions, please feel free to point me in the direction.
I've examined a few of the samples, and think I've a grasp of what I want to do. I've a three to four project plan for some Android releases to sharpen my skills, but since this is my first project and I have never really developed for a mobile phone or the android before, I'd like to make sure I have a solid plan.
The first project is an example of the license plate game, however I want to do a few things to change it. Heck maybe when I'm done it'll become a bingo style game, with bluetooth connectivity, you never know.
The base idea is I want to offer a list of states, with checkboxes next to them. so to do this, I'll be starting with a Linear List layout similar to the note pad example, and then have a row that is only a Checkbox. I can use text and call strike through if it's been checked off. Perhaps offer an option to not show them if they are checked.
But I want the list to be generated from a set of lists. Maybe all of America's states, maybe reasonable American states (no Hawaii, no Alaska) maybe a North American list, (add in Mexico and some Canadian provinces), a European list, who knows.
I'd probably have to have a pop up window that lists all of the lists I suppose using a radiogroup of some sort.
So then as far as the data, after weighing options I think best solution is to make a database with two fields, "checked" and "name".
I figure I can use the menu for most of the user interaction (aside from clicking on stuff we want to check off) with maybe a few context menu items, I understand how to make all of those already so I should be good.
The question I have is what is the best way to populate the lists? Should I create raw data, and have different files for all the lists? Or is there some other way to do this? I've seen this done on the searchable dictionary, but I'd like to hear what people who have actually generated the data like this before.
In addition is there an easy way to look at the sql database these applications create, or do you have to run searches on them and output the data?
Finally any other suggestion or advice? I definitely want to try to get something like this on the market so I can see the full life cycle and see if anyone actually likes it. (luckily there's not a plethora of them already) but I also want a few people to look over my code if they're willing when I'm done to make sure I've done this right or at least not missing any basic mistakes.
Thank you for your time,
Frank
As far as check boxes, you can design your list item layout to have a checkbox in it. You should make some sort of object that will hold all of the data for each list item, including the status of their checkbox (something like isChecked). Instead of storing a list of String objects containing the names of states, you should have a list of State objects. then, say you wanted to take some action on every checked item, you can easily iterate through the list you gave to the ListAdapter and see which ones are selected.
Was this helpful?
You can stick to C++ if thats your thing (there are some limitations, there are some benefits) , please read this primer for details.
For data folks are going to steer you towards SQLite since is available OOTB with Android.