Fix font and font size in android application - java

Is there anyway to fix my font and font size for my android application?
I wanted to prevent people to change my application font even if they have installed app like bytafont.
I really have no idea what to do to fix it as the results that I have search are all about how to change the font but not fixing the font.
Thank you all.

Giving you a different perspective here: why do you want do that?
If some of your users are so unhappy with the fonts that your App is using that they get into the business of installing other Apps in order to manipulate that; who are you to prevent them from doing that?
In other words: even if it is technical possible: consider not doing this. As an App developer, your goal is to attract users; not to annoy them!
EDIT: as you say you are worried that changing fonts could affect the responsiveness/usability of your App - don't assume. Make experiments to see what happens! Maybe it is not such a problem at all!
And even if it is: users have override things to get there. In other words, coming from the business perspective: is it worth spending your time on this?
Maybe 0.1% of your users manipulate fonts; and and afterwards 50% of those people are unhappy with your App. Is it worth spending efforts for that small group at all? Versus: simply working on other, great features that attract more customers? Your development time is a limited resource; so you have to be careful what you are spending it for!

Related

JavaFX sporadic rendering issue - disappearing buttons / controls

I have a Java/JavaFX application deployed as a native install for Windows and Mac. The bundled runtime is currently 8.121. You can find the installers and the Java code here: George download
I have been using this application in the classroom weekly (with 20 children) for the last 15 months, and right from the start I have seen the following problem:
From time to time, buttons disappear. That is to say, they are simply rendered as a white rectangle, making them effectively almost invisible. Both the background and label/text disappear.
This mainly happens on mouse-over, but then does not correct itself.
The buttons are still there, and clickable.
It only happens sporadically, but it seems to recur on certain machines more than others. Windows 10 now, but used to the same happened on tiny Windows 7 machines previously.
I am not able to reproduce it myself and have never seen it on a Mac, I think.
It now also happens sometimes with other widgets/controls, and even before any user interaction.
Is there some known issue around this?
Has anyone else described something similar?
Might it have something to do with certain minor operating system adjustments?
Any thoughts or ideas would be much appreciated.
Update (2018-11-06)
Just started testing my application in Java 8 in VirtualBox with Windows 10, and I now get the rendering error myself. Hurra!
Looking into the -Dprism.xxx options, I found this article:
http://werner.yellowcouch.org/log/javafx-8-command-line-options/
Testing with -Dprism.threadcheck=true, I get a lot of
"ERROR: PrismPen / FX threads co-running: DIRTY: false" with stack traces.
Setting -Dprism.dirtopts=falsedoes not solve it for me, though.
But running with -Dprism.order=sw does. But this is not a good solution for an application that may do some demanding rendering (Turtle Geometry).
Will keep digging.
I've been having the same issue, I tried updating to Java 10 but the issue remained. I then edited the properties on java.exe and on the 'Compatibility' tab I set 'Override high DPI scaling behavior' to 'System (enhanced)' and the problem seems to have gone away (or at least it hasn't happened again yet).
I observed the same thing: Visually disappearing (but still functional) buttons and other controls (except labels) especially in areas outside the original size of the window after I have resized it manually)
In my case -Dprism.dirtopts=false reduced the problem but also didn't solve it (and was not really a satisfying solution anyway).
Additionally I observed that some TextField controls also showed rendering glitches (looked like the same text was rendered twice with a little offset). That finally put me on the right track:
It turned out to be just a missing Platform.runLater(...) around some calls to TextField.setText(...) (from another thread) for exactly these TextField controls, which was causing this (even for e.g. a Button which is at a totally different place - also in the widget hierarchy).
I know, this is probably not the answer in all cases, but hopefully it helps at least some others facing the same problem (took me a full day to find out).

Where should I get started when learning how to code Android apps?

Recently I have grown great interest in apps and how they function, but I want to create one on my own. I have no experience with this and I want to know where should I start and how. I have great knowledge in java but I have no idea what to start learning. Thank you!
This is my first question so if I have mistakes please tell me and I will fix them or delete the post all together
Here's a list of some of the resources I use
https://www.udacity.com/course/android-basics-nanodegree-by-google--nd803 (Unfortunately the entire course isn't free)
https://www.edx.org/course/introduction-mobile-application-hkustx-comp107x-4 (100% free course)
https://www.edx.org/course/android-developer-capstone-project-galileox-caad005x-0 (100% free course)
https://github.com/codepath/android_guides/wiki/Home/6c236e883cc70912ccdd859173050fc147d409f1 (Because I'm lazy and don't feel like reading text walls sometimes)
http://www.vogella.com/tutorials/Android/article.html
https://www.tutorialspoint.com/android/
https://www.youtube.com/playlist?list=PL2F07DBCDCC01493A (100+ videos)
https://www.androidauthority.com/android-studio-tutorial-beginners-637572/

Scroll able Arc Menu android

we have got a requirement in our ongoing project where we need to show menu items in arc style at both upper space and lower space of the screen in reverse direction(will show you samples). i've tried to use some of the code from the demo of ArcMenu used in Path android application, but what i came up with is this:
This is not what i want to achieve but something like menus in following images.
I am trying to achieve this from last 4 to 5 days but not getting it right. if any one out there has done any research on such problem then please guide me.
any help would be greatly appreciated.
Make ListView in Circular
Follow this its working code. Code is provided by Samsung
may be it will workfor your issues
http://developer.samsung.com/android/samples/Circle-Launcher
That's quite a complicated task, especially since you want it to scroll while respecting its arc shape. There are probably no fixed answers for this, you'll have to manually create this type of interaction. Unless you have specific code examples of what you've tried and failed at, I don't think anyone can really help you here. Besides the technical difficulty, you could wonder if it is really a smart idea to have THAT many options in an already pretty unclear/overwhelming widget, that you can scroll to even more options. Maybe some design re-thinking is a better option.
Some examples though which could you get on the way would be here;
https://stackoverflow.com/questions/12072692/a-circular-layout-with-scrollable-contents-in-it

How can I stop using a mouse while programming in my IDE?

I love using an IDE, because I get some great productivity gains. However, I have a couple reasons to stop using a mouse with an IDE:
To code faster - It definitely slows down my coding when my typing is interrupted with all of the constant point and clicking.
To relieve pain - I've never had pain from the keyboard, but I get tendinitis from the mouse.
I've got my cheat sheet for my IDE printed out and now I'm ready.
What's the best way get off the mouse?
Are there any hurdles that I'm going to run into?
Are there any tips for specific IDEs (Visual Studio, Eclipse, etc.) ?
Move it to the wrong side (eg if you are right handed then put it on the left of the keyboard). That way, you can still use it if necessary, but you should find you aren't using it unecessarily.
If changing sides isn't enough to confuse your brain, then moving it to a place where it is accessible but you have to think before reaching for it. As long as you can't reach for the mouse without thinking about it, then you will find that it is easier to use keyboard shortcuts instead. Essentially you want the mouse to be an option but the keyboard to be a better/easier/more convenient one!
As for pitfalls, well you may find that if you have to test any interfaces (web based or dektop) that you need to revert back to using the mouse. Also I find that if I have to work outside of the IDE, then it is just not as efficient to do without the mouse. Often we use WOrd for specifications and documentation, and trying to get away with using that without a mouse, is tricky (in my experience).
Another potential source of annoyance, is when switching between applications (Eclipse, VS, etc), you find that they often use different keyboard shortcuts, and so it can take a while to get back up to speed again, or you have to spend some time reconfiguring the shortcuts to be consistent.
Unplug it.
If your mouse is completely gone then you will be forced to learn how to live without it and therefore will become productive without it.
Anytime you're about to use the mouse, forcibly stop yourself and look up the keyboard shortcut for that operation. Do that a few times per operation and soon your muscle memory will kick in and you won't even have to think about it anymore.
Learn the keyboard short cuts :)
Also some editors are better suited for mouse free operation. I use ViEmu with Visual Studio which has helped me reduce, but not eliminate the need for using the mouse.
Get a trackball.
Your real question is about pain and productivity, the mouse is just a by-product of your circumstances. I would rephrase the question to reflect your real purpose.
Check out the wrist braces. I've heard from people that it makes a huge difference.
For VS, check out Sara Ford's blog.
Bind Macros to Keyboard Shortcuts
Keyboard Shortcuts to navigate task list
Search her blog for plenty of other tips and tricks.
Use the command line whenever you can (Install Powershell)
Switch to vim or emacs for code editing (or use ViEmu if you really need the intellisense)
If you develop web applications and/or spend a lot of time on the web, get the Vimperator or Firemacs extensions
Learn keyboard shortcuts for everything else.
???
Profit!!! (from your increased productivity)
Hide the mouse under a copy of your cheat sheet.
For visual studio I use the ViEmu plugin that allows you to use vi commands in visual studio. It's a bit difficult to get the hang of it but once you're done you'll only be using the mouse on the designer.
Get a webcam and eye-tracking software. Then you can fix bugs just by looking at them. It makes you feel all-powerful.
I've summed up some shortcuts that will get you working faster with Visual Studio in my blog.
I recommend you start at this article, that shows you the shortcuts I'd recommend you should get to know first...
Switch to emacs.
Open the nearest drawer and shove it in and close the drawer. That way, when you really do need it it'll be inconvenient to use it!!!
Also, if you're using multiple IDEs it pays to configure key bindings that are common across them, so that you can switch between them easily.
Change your keys to Emacs setup , Learn the Keyboard Shortcuts. I rarely use the mouse, if ever, in eclipse. i find it alot easier to just use emacs key short cuts.
When I contracted for an investment bank in NYC, there was this guy who didn't use a mouse. He was a java/kdb dev and just used vim. I used to think it was the strangest thing that he didn't have a mouse attached to his computer, but damn.. that guy was productive. Probably the most productive guy I've ever worked with.
So yea, if you really want to go that route you could try using vim, or something similar. You'll lose the features you're used to in your IDE, but it worked for him...
Become a better typer. As a slow
typer, I find myself going to the
mouse so I dont have to type. If I
were more efficient at typing, I would
be less inclined to use the mouse.
If you are using a laptop and a
mouse, remove the mouse and leave the
trackpad as your only option. That
will be so painful that you will be
forced to learn more keyboard
shortcuts.
Some very good answers above.
I spent a while injured with RSI and mousing was an issue. I already used shortcuts a LOT.
But coding using strictly the keyboard was definitely slower, especially when it comes to navigating around the code.
As I was using vi at the time, I would primarily move around the screen by doing searches for text at the location I wanted to go to; this is very fast, assuming you pick unambiguous text. Leaving line-numbers on and then going to the line number is another way to rapidly navigating. Judicious use of code folding (available in many IDEs) helps, too.
Finally, consider an alternate pointing device. A trackpad sucks for games but can be more accessible for coding, especially if you put it in easy reach of the keys (e.g., if you use a split keyboard, between the two hands). Try switching between two or more styles of device, to avoid injury because of one specific device. And don't ignore wrist pain! Treat it before it gets worse and you end up non-productive for a year or something.
Configure your IDE to use VI or EMACS keyboard controls (and learn them.) Both options allow you do do most tasks without moving your hands of the home row. You'll see your productivity drop during the learning curve but jump way up after as you save a lot of time by not moving your hand of the keyboard to use the mouse.
As a side note, learning to use a terminal based editor is a good skill to have in case you ever need to remotely administer a *nix machine. It will save your bacon some day.
MouseFeeds plugin will help you in eclipse:
http://www.mousefeed.com/installation
All these coders and no one suggested to write some code to hide the pointer when the IDE's window is active??
Great question... A co-worker suggested Launchy to me as a way to reduce mouse-use/be more productive. It searches your Start Menu (or non-windows equivalent) for apps, docs, shortcuts, etc. Type alt+spacebar to bring up its prompt where you type what you want to launch. Here are a few examples - what you type depends on other things in your Start Menu.
ch for Chrome, f for Firefox
ca for Calculator
expl for Windows Explorer
A power-user can fiddle with its settings to get more out of it but even basic users will benefit from it. Hope it helps.
Change your keyboard:
(source: datahand.com)
Hide your mouse - at least one arm's length away - then you can always get it back in an emergency
Move it far enough away that it's inconvenient to use, while your cheat sheet is close enough to easily lookup whenever you are in doubt about how to do something. I would not suggest unplugging it, since it is a useful tool for some operations, such as moving files around. I find drag and drop in some sort of tree like file system view is much easier than the alternatives. The majority of editing operations though, are quickly accomplished via key strokes once you remember them.
I am using IntellijIDEA IDE. There is one very annoying plugin - "Key promoter".
For every mouse-inited action it shows annoying alert with keyboard shortcut which you could use to do the same action.
Well, it took about 2 or 3 weeks for me to stop using mouse at all. It was hard to not turn it off (plugin), but very useful :)
IMHO the best answer is combination of two already given answers:
Print out the keyboard shortcut cheat sheet of your IDE and tape it to the wall next to the screen.
Unplug it. Also this makes a bit harder to procrastinate by switching to SO in the other window...
You may also want to consider doing your coding on a Macbook/Macbook pro. I generally HATE touchpads, but I've had to do some coding on the plane and the new touch-sensitive pads are actually really convenient. For example, you can do things like scrolling with a flick of two singers, and it's a lot more accurate.
It may not be perfect, but it might help with your hands.
I don't think avoiding the mouse completely is practical (you need things like hovers, etc.)
First off, don't try to do everything with a keyboard, start by forcing yourself to use keyboards for the top 3 things that you do all the time. Get the biggest bang for your buck/effort and you will quickly want to use more.
Keep a sheet of paper near by where you write down keyboard short cuts you use. (Alternatively, add this to a company wiki so others can benefit.)
Pay attention to menu items, they frequently have keyboard short cuts.
Find out the keyboard shortcuts that show all other keyboard short cuts.
I use Eclipse all the time, there are several keyboard short cuts that I find invaluable:
CTRL + SPACE - Content Assist
CTRL + 3 - Open any UI Element in eclipse by typing
CTRL + SHIFT + T - Open by type (Uses Capital letters to do word searches and * for wild card, for instance NuPoEx would find NullPointerException)
ALT + SHIFT + R - Rename current selection
ALT + SHIFT + T - Refactor Menu
And CTRL+SHIFT + L gives you a list of all keyboard shortcuts

Best batch photo upload applet

I'm looking to handle image uploads on a site I'm building. All the behind the scenes stuff is fine, but creating an intuitive front-end is causing me head pains.
The problem with handling photos in a world where most people have asynchronous internet connections is the photos' size. I want each user to upload (at least) 10-20 images of an event. On modern cameras, 10-20 images translates to 50-200megs.
If people have 256kbps upload speed, it's already ~15 minutes just in transfer. My experience is that people are just not that patient when it comes to waiting for something to happen... So I need to do something about it.
I'm looking for a Flash/Java (no Silverlight, please) applet that can resize images on the client-side to a specified width and upload that much smaller file. If I can get images down to a few hundred KB, it might be a usable system.
Edit: This is for a personal project. The one suggestion so far is for something that costs $184. I wish I had that much disposable cash for these days! My max budget is around $40 though I'd naturally prefer something free and open source =)
http://www.jumploader.com/demo_control.html - Free
we use this:
http://www.aurigma.com/
runs perfactly since a few years! (both java and activex)
Try the following: http://www.jfileupload.com/products/jbatchupload/index.html
[Disclosure: This is my site]
Can upload thousands of files and folders.
I am researching this myself.
jupload.sourceforge.net looks like one possible answer.
http://jupload.sourceforge.net/advanced_js_demo.html
mike

Categories

Resources