change font size option for mobile web app? - java

I'm developing an app with phonegap and i want to add text size option for users. but i want this text size change saves to app so when the user reopen the app the text size stays the same he/she choose the last time?

Look at phonegap localstorage, it could be what you're looking for:
http://docs.phonegap.com/en/edge/cordova_storage_localstorage_localstorage.md.html
Alternatively you might want to write some kind of an user configuration file using the file api:
http://docs.phonegap.com/en/edge/cordova_file_file.md.html#File

Related

How to display HTML on EditText?

I am trying to make an Android Application, it is intended to be a notes app, similar to Evernote.
For the ones that have used Evernote (or every other good notes app) you may already know that it allows users to not only save text, but to add images, files, and other formatting features too.
So I came up with the idea of using HTML so the user can attach images and have different text styles (bold, regular, italics, etc...).
The user would select an Image of his files, and the HTML should show it in the EditText itself. Same thing with the Text Style.
Is it possible to achieve this? Would I need to use a library?
EDIT
I followed Lena's answer, and it works fine, but the main problem now is that it does not displays the images properly, whether they are from Internet or from the sd card. I do have Internet permission available and the Write/Read external storage too.
This is my code:
Edit.setText(Html.fromHtml("<strong>IT IS STRONG</strong>" +
"<p>Tiptoe</p>" +
"<img src=\"/sdcard/Pictures/Screenshots/Screenshot_20200204-230814.png\"/>"));
editText.setText(Html.fromHtml(yourHtmlText))

Set every phone can use the module of android application one time

My case now is for example select item, when i select that item, the item will become colour and after i uninstall and reinstall back, the item still is that coloured. I want to know is it possible the item selected of android application still can keep with using the method android_id? I mean this method.
private String android_id = Secure.getString(getContext().getContentResolver(),Secure.ANDROID_ID);
Because I plan to do is every android phone can use the function one time only. Hope can understand my question. I am using android studio.
Yes you can, basically you just need external configuration file that will be saved on external folder outside your application folder. For example you can save your configuration file in sd card. Then on your startup application, always check that file

How to use file picker in android app

I am developing a simple android app, I want to use file picker when I press button, so how can I implement file picker in my app.
I spent some time earlier figuring this out so to wrap up
Intents provide the ability to hook into third-party app components
for content selection. This works well for media files, but if you
want users to be able to select any file, they must have an existing
"file explorer" app installed. Because many Android devices don't have
stock File Explorers, the developer must often instruct the user to
install one, or build one, themselves. aFileChooser solves this issue.
You can clone it from iPaulPro/aFileChooser.

Filling out and Saving a PDF on android

so basically what I am attempting to do, is to create a PDF that information can be inputted by the user of that document. and when all the information is entered, be able to click the save button below on the PDF document, and a window prompt open allowing the user to "save as" the document to a certain directory.
I currently have the button working for Windows OS, and the prompt comes up to save as, however when opened on Adobe reader on an android phone and the save button is clicked, nothing happens.. is there a java script code that differs from the Windows version to what android would look like.
If you would consider Xamarin for android app development then you could take a look at the following blog post showing how to create PDF file with arbitrary content on Android and iOS using the same library.

Use blackberry camera in java app to select a photo that was already on file

I know you can use
Invoke.invokeApplication(Invoke.APP_TYPE_CAMERA, null);
to get the blackberry camera application to be shown and allow the user to take photos. From which you can use a FileJournalListener to find any created files.
(As shown/implied in this forum post: http://supportforums.blackberry.com/t5/Java-Development/How-to-use-FileJournalListener/td-p/295424)
There are times however, when the user chooses not to take a photo but selects one from the file system. Since this wasn't created at the time I opened it, using the FileJournalListener is not going to meet my needs.
What should I use to get the selected file?
EDIT: The functionality I'm trying to produce I've seen in the Twitter for blackberry application
I think you should create a file picker first,
http://docs.blackberry.com/en/developers/deliverables/11958/Create_a_file_picker_856986_11.jsp
After that in the application, user could select whether to capture new picture or browse from their storage.
If user select the later, open up this file picker and for every images found user can view the image, and the application can save the path where the images located for further processing.

Categories