Need Updated StickerView with auto face detect functionality - java

I have tried to find out a new updated Stickerview library but no updated library available on GitHub.
https://github.com/kencheung4/android-StickerView
https://github.com/nimengbo/StickerView
All the Above library not working well.
Functionality Needed:
Auto Face detects and applies the sticker on it very well.
Multiple stickers can add/replace at a time.
Please suggests how to look for a good library for Stickerview.
(This is not a request for finding a tool)

You can refer to the "Network" section of those two repositories:
https://github.com/kencheung4/android-StickerView/network
https://github.com/nimengbo/StickerView/network
You will see the forks created from said repositories, and the newer commits done in those forks.
That way, you might find the one fork which include the fixes you want.
For example: usmanrana07/android-StickerView includes:
Added 'controlFrameVisibility' method
The controller frame should hide after particular time of ACTION_UP even because if user wants to take screenshot then those icons also remain visible in picture.
I have added pieces of code which will hide the controller frame after 2 seconds of action completion and it would be visible again on touch to the view.
And yongjhih/StickerView adds a StickerManager for simpler application, which could be of interest in your case.
There might not be the exact features you are looking for, but the "Network" section is a good way to assess if said features were already coded, or if you need to implement them.

Related

Remove Unexpected border of JTabbedPane

I am trying to add tabs in a JTabbedPane. It is displaying the below mentioned white borderline which I am not expecting here as Every color is already set to Black except the white color for the text colors. What I might be missing.
I am trying to change this class from jitsi project
Here is what I've tried so far.
OS: Ubuntu 19.10: Java Version: 1.8.0_242
Windows 10 Pro: Java Version: 1.8.0_241
I am using default look and feel for this Frame whereas, for my manually created design, it is Nimbus.
The answer for the question heavily depends on the Look and Feel you're using for your application. I can't tell which one you're using by just looking at the screenshot because you modified it a lot and you've left out part of the code in your question that installs it. In case you aren't installing any specific one - you're running the default Look and Feel, which might also be different depending on the OS/JDK versions, if I'm not wrong.
So as #sleepToken already said in the comment - do not post random parts of your code or all of the code, instead post an SSCCE. While sometimes you might think it is unnecessary and/or unrelated - in many cases it is not, and it does help whoever will read and try to answer your question to run the code & debug the issue if necessary.
That being said - I can give a general answer to your question: All component are painted by their respective UI implementation (TabbedPaneUI in this particular case) and in some cases parts of the painting code might not be configurable, for instance some colors or other options might be hard-coded. You can simply look into the source code of the particular UI implementation that your application uses, find the painting code that you want to configure and see if it is actually configurable in the first place.
In case your application uses MetalLookAndFeel - the implementation is MetalTabbedPaneUI. From what I can tell by looking at it's code - it uses colors from TabbedPane.highlight, TabbedPane.borderHightlightColor and TabbedPane.darkShadow UI defaults for the border. Adding custom color for TabbedPane.highlight might fix the issue for you since you didn't mention that you modified that one in your question.
In case it doesn't - I once again recommend posting an SSCCE along with your OS type/version in case you're using a native Look and Feel. Native Look and Feel differs between different JDK versions for different OS version and often uses a highly customized UI implementation that might not be as configurable.

Remove Default WMS Layer From WorldWind Java

How do you remove the default WMS Layer from a basic WorldWind Java application? If I remove it like so, my application is still trying to reach the public WorldWind WMS servers:
import gov.nasa.worldwind.Model;
Model testModel = new BasicModel();
testModel.getLayers().clear(); // Makes default geo invisible, but still queries server in background.
// Add my own layers, here
Oh wow - thanks for reminding me about an old love !
However, regarding your question:
If you want to work completely offline, use property
gov.nasa.worldwind.avkey.OfflineMode
(answer found here)
If you want to remove individual layers, take a look at the config folder.
config/worlwind.layers.xml contains the layer config, just comment out layer you do not want to use.
The folder resides in worldwind.jar when using the standard build, but you can specify a different location - take a look at the Configuration class on how to do that.
There is also another interesting file there, DataFileStore.xml, which lets you define the cache location. If you fill the cache with your area of interest while being online, this data will also be used when in offline mode. Once there were also Cachepacks available but it seem these are not available anymore.
I think there was also a tool to select an area and download the data into the cache for offline mode.
Have fun !

Is there any way to add Autocorrect to my Android Keyboard?

I am working on an Android Keyboard, and I was trying to see if there was any way to add in Autocorrect into it. Or is Autocorrect provided with the Spelling Checker Framework? I cannot find a clear cut answer anywhere on here or any other place that I have looked.
My code for my keyboard can be found here > https://github.com/MJonesDev/AndroidKeyboardPractice
You can't rely on the Spellchecker framework. It isn't included on all devices- specifically Samsung ones. (Which may be my fault- when I worked at Swype and 4.0 was new, its UI was interacting badly with Swype. I asked them to turn it off by default, they decided to remove it entirely).
Even when it exists it doesn't really provide autocorrect. At best it can give you possibilities, and its then your job to display them, and handle the text correction when one is chosen.
There are various spelling correction libraries out there of different qualities. Its possible to find open source ones to include if you aren't looking to do anything special.

Add an Eclipse 4.4 Perspective in existing Eclipse 3 Application

I have an existing Eclipse 3 RCP application (the compatibility layer is already added to the existing application) in which I would like to add a perspective (of course containing parts, toolbars, menus..) developed with Eclipse 4.4 (Luna).
1) Is this possible ?
2) If, yes could you please give me more information on how to do that and perhaps links containing more informations ?
UPDATE : So I finally manage it to make it work so for those of you who had the same questions here are the answers. So yes it is possible to mix Eclipse 3 and Eclipse 4(some complications but you can manage it :) ) for more information on how I did you can go to the link I left in a comment down below. Hope this going to be helpfull :)
You can likely do something close. You could implement the 'createInitialPerspective' method of the your IPerspectiveFactory to downCast the given IPageLayout to its underlying class "ModeledPageLayout". This will give you access to the new MPerspective's model (as well as the useful utility methods). Then you're off to the races and can set the model for your perspective up as you desire (as long as the result can be rendered).
I tried something that Alexander adviced me to do and it worked perfectly :) The only issue that I have now, is how to add the perspective added to the perspective switcher. (The method I followed enabled me to add the perspective but when I run the application it is displayed in the tool bar and I don't want it to be like that I want it to be only present in the perspective switcher). Anyway here's the link for the solution I tried. Hope this gona be help full.
https://www.eclipse.org/forums/index.php/m/1690630/#msg_1690630

Sikuli issue - capturing an area

What I am trying to accomplish is to select an area on the screen with the mouse (outside of the may frame) and get the resulting region coordinates using Sikuli.
The code that should do this looks is below:
Screen screen = Screen.getPrimaryScreen();
Region region = screen.selectRegion("Select the area.");
What happens is that the cursor turns into a selector cross (the ones you usually see when you expect this function), but I can't select the area and actually the only way I can get back from the application is by killing it. Not too many examples I have found so I am asking for help here.
How can I make this work?
Also one other question:
I have downloaded the following script version:
Sikuli-IDE-1.0.0-Win64.zip
This means if I want to create a crossplatform solution I have to include like 6 jars? I have found a more universal Java API it seems (that is what it is called actually):
https://code.google.com/p/sikuli-api/
With all required supported OS but I can't find a single example on what I am trying to do that is similar to the little code snippet I pasted here. The sikuli script I am using now and this Sikuli API (apparently not the same) seems to be just different enough to amke this difficult.
Any suggestions? Thanks a lot in advance.
As it turns out, this only happens if I put this functionality on a Swing button's actionhandler. I have reported the bug to Sikuli and it will be probably fixed in the next release.

Categories