Please Can Android Home screen Widget written in Kotlin load files from app's fold? - Android Q&A, Help & Troubleshooting

ok i will try to explain as precise as possible
I made Android Kotlin app for learning chemical compounds. My app has a full UI where user can add his chem compounds( and they are stored in a file "compounds.txt" in the app's folder) and also app is kinda testing user by asking some questions. When you open that file "compounds.txt", it looks something like this:
Ethanol=C2H5OH
Methanol=CH3OH
Hydrogen Peroxide=H2O2
Baking Soda=NaHCO3
etc...
So... I made all this, and it works and is ok.
What I would like now?
I would like to make a home screen widget which will be like a "random test" (or "random reminder") for a user when he is not even using my app.
Example: I add my widget on my home screen next to a clock...My widget is sitting there on home screen... and I am like... I take my phone.. I make a phone call... finish the call.. and then i see on my widget written "H2SO4"..
If I know what is a H2SO4.. then cool.. I dont do anything... i just continue my life...
But... if i cant remember what is H2SO4 i would just like to click the button on my widget (or not even a button. I can click directly TextView field) and then instead of "H2SO4" will be written "Sulfuric acid"
But... I would not like when I click button on my widget, that appears main UI of my app. Simple click on a widget should just toggle text between "H2SO4" and "Sulfuric acid"
Now... the question is... How to do this?
If i have 2 KT files MainActivity.kt and Widget.kt, and if i am able somehow with Widget.kt to load file "compounds.txt" then excellent. That would be the easiest way i think. Just load file... Split lines... and every 30 min..just change the text on widget...
But... If widget.kt can't load "compounds.txt" then what would be the next best solution for me?
I am very sorry for my long text. English is not my native language, so it is difficult for me to express myself

Related

Copy and Paste

Hey everyone,
Is there a way i can copy and paste on the hero ?
eg in a sentence like ...
With HTC Hero, personalization reaches a level never before possible. Rather than burying important content under layers of menus, the HTC Hero lets you put it at glance view, with a selection of widgets that can be placed right on the home screen. The widgets themselves can be personalized with a variety of designs and sizes that best match your personality.
If i just wanted to put .. with a selection of widgets that can be placed right on the home screen. ... into an email how would i do that ?
Cheers James
Just hold your finger on the input field, a pop up will appear and you can tell your freaky and oh-so-lovely Hero that you want to select text, then select the text and hold down again and tell it that you want to copy the selection.
Yeah, I know that you love your Hero :-D
Android <3!
/Edit:
Maybe I didn´t really read your post lol Let´s see what you´ll say.
Hey, so I tried this from the gtalk application, but I can't figure out how to copy text from a chat or response that has already been entered. Is there a way to do this?
TIA,
- JustPyro

Help Build up Max-Sense

As many are aware the new Max-Sense Manilla Mod for windows devices isint perfect, but there are many things that do give it a nice feel. I thought i would open this thread to help in posting bugs/things that could be better or more intuitive.
Let start guys, if there are some helpful comments in this thread ill be happy to add them to the OP as suggestions. Please post what you would like changed or made better, and keep flaming out of the question.
Personally What I'd like to see added in future updates:
Internet link widgets for the homepages
The ability to have more than one blank widget
Live Facebook widget, kinda like the sense tab
Sync Calender with Facebook events
Would like to see a picture Slideshow widget..
i'd like to see the memory and battery widgets have assignable actions, ex when you touch the memory widget it opens ark switch, taskmanager, clean ram, or a program of your choice, and battery would open the power settings, etc.
i would like to see more favorite people widgets
i would like the option to change the max sense taskbar from just minimized, maximized, or none to the windows default taskbar as well
i would like the backup/restore script that beegee_tokyo created implemented into the menu under max sense settings
i would like to be able to press the whole widget for your notifications to take you to the sense tab not just the icon.
it would be nice if the left soft key in the home screens was easily assignable, some people like have the start menu assigned or an app of choice.
i wish the back hard key did somthing, even if it just sent you to the homescreens instead of actually backing up.
i'm not trying to be negative in any way, i absolutely love max sense and all of the work everyone has put into it, but these are all features i think everyone would appreciate
lastly just somthing that came to mind would be a notes widget
I have not tried it. I am still waiting for the author to get back to me about being able to use it my roms. As soon as i am able to use i will let you know. Thanks
racer0018 said:
I have not tried it. I am still waiting for the author to get back to me about being able to use it my roms. As soon as i am able to use i will let you know. Thanks
Click to expand...
Click to collapse
+1 to that
ws6nightcat said:
i'd like to see the memory and battery widgets have assignable actions, ex when you touch the memory widget it opens ark switch, taskmanager, clean ram, or a program of your choice, and battery would open the power settings, etc.
<snip>
i would like the backup/restore script that beegee_tokyo created implemented into the menu under max sense settings
i would like to be able to press the whole widget for your notifications to take you to the sense tab not just the icon.
<snip>
i wish the back hard key did somthing, even if it just sent you to the homescreens instead of actually backing up.
<snip>
Click to expand...
Click to collapse
+1 for these, especially the "press the whole widget, not just the icon" one. I though my installation was broken until I figured out that you have to push the icon, not the number (eg. missed calls)
My personal feature request would be the ability to insert a table of quicklinks into one of the three main home screens, rather than only on the home button flick left action.
i.e. To fill-in the empty left screen of my theme here:
http://forum.xda-developers.com/showpost.php?p=6743591&postcount=26
Thanks for all Max and BIGnAdAd's work!
Phrak
young blade said:
Would like to see a picture Slideshow widget..
Click to expand...
Click to collapse
I agree...I'd love to have my pictures at my main screen and be able to scroll like favorite contacts.....
Okay i have used every ROm on this planet and so far MAX is the most intuitive yet. Here are a few issues i have come across...
1- when returning from a tab based application there is a pause or slight hesitation where the notification bar return to back to the max sense appearance
2- all max sense ROMS are having the small MMS issues and for some reason the quick fix works and then doesn't and reverts back to the original settings
3-MAJOR battery eating - although i did notice when removing all the tmobile crap and the facebook tab that it was a HUGE success on saving batter...Now after one day of minimal use and testing often i was able to have 80% battery !!
4- I think that the Favs. widget could be smarter...quick sms mms or email buttons should or could be applied
thats all for now im sure I will have more ideas soon....thanks devs for making my windows phone make the iphone look retarded ....Nothing better then to see my buddy who just got the iphone 4 and then is caught staring at my HD2...And i know exactly what he's thinking...what phone is that? Phone envy is a sin i say....haha
well.. when we put a new widget, for example want to put a music player widget.. i put it but I want to choose a specific widget (of music player) to put.
So I want to have the option for me to choose what widget I want to put, and not put one itself that maybe i dont like it

[Q] Themes with folders?

I got Themer today, and I really love how a lot of them look, but I ended up sticking with my plain stock because I like to have most things on the home screen in folders. I tried making a folder, but it didn't work.
Are there any themes that incorporate folders? Did I just do it incorrectly or are they not an option? I realize you can go into apps, and then use the categories, but I'd much rather have them on my home screen.
Plus, if I have an app, like my flashlight, that I really need on my home screen for accessibility, it's kind of obnoxious against the pretty, cohesive theme, and sticks out. If there was a folder I could stick it in on the home screen that matched the rest of the theme, it would look better. Does that make sense? I might just be rambling now.
It's a really cool app though, I like that you can do these things without rooting, I didn't realize that was possible. (My noob is showing... )
Lumosx said:
I got Themer today, and I really love how a lot of them look, but I ended up sticking with my plain stock because I like to have most things on the home screen in folders. I tried making a folder, but it didn't work.
Are there any themes that incorporate folders? Did I just do it incorrectly or are they not an option? I realize you can go into apps, and then use the categories, but I'd much rather have them on my home screen.
Plus, if I have an app, like my flashlight, that I really need on my home screen for accessibility, it's kind of obnoxious against the pretty, cohesive theme, and sticks out. If there was a folder I could stick it in on the home screen that matched the rest of the theme, it would look better. Does that make sense? I might just be rambling now.
It's a really cool app though, I like that you can do these things without rooting, I didn't realize that was possible. (My noob is showing... )
Click to expand...
Click to collapse
Hi Lumosx,
With Themer, there are multiple ways of adding folders.
First, you can drag and drop apps from the app drawer onto one you've already added. To do this:
1. Drag an app onto the app drawer that you'd like in your folder.
2. Then drag another app next to it; a popup may appear asking you to unlock widgets.
3. Select Yes and open the Desktop menu and deselect Lock homescreeen Icons.
You're now able to drag icons into one another, creating folders accordingly.
Alternatively, you can use Smart Category folders. These are the categories you see in the app drawer, and adding one of these does come with some advantages. To add one:
1. Long press on the homescreen > Advanced > Desktop > Unlock homescreen Icons.
2. Long press on the homescreen > Smart Categories > choose your preferred category.
3. Tap the icon > Select the overflow icon (3-dot icon) > Manage, in order to manually add/remove apps.
Now this category will be saved for every theme that you use.
To change the look of a folder (with both methods), long press on the icon > Edit > then select an icon either from selected packs or a simple image. Let us know if you need to find an image/icon to match your theme.
Hope this helps!
-Marco
I got it to work, thank you very much! I'm very happy with it now.
One more question: The only issue I have now is that there's one particular widget that tells me it's already added when I try to put it on the screen, but it's not actually there. Do you know what the problem could be? It came with the phone (Walkmate) if that matters.
Lumosx said:
I got it to work, thank you very much! I'm very happy with it now.
One more question: The only issue I have now is that there's one particular widget that tells me it's already added when I try to put it on the screen, but it's not actually there. Do you know what the problem could be? It came with the phone (Walkmate) if that matters.
Click to expand...
Click to collapse
What's your device and the widget called? We want to see if we can replicate this issue.
Also does it happen with all themes or one specific theme?
Lastly, is there room for the widget? What may happen is that a widget might take up the whole screen, not allowing for any widgets to be added. Deleting all the widgets on the page and try to add this widget will help us figure out what's causing the problem.
I have a Galaxy S3, the widget is Walkmate. It should fit, it's small and I have at least half the screen free. I tried when the screen was blank as well. The theme is Frosted Glass. I tried using a random theme as well and it still didn't work (it was Hi-Tech).
It's not a huge issue or anything.

First impressions and questions

Hi,
I have played with Themer and widgets last few hours, and it looks very nice. I have looked through the introduction videos, and they were informative, but there is always some information missing, and here is what I could not find:
How to lock widgets without right click?
When we unlock the widgets for editing, we need to lock them back. Every tutorial that I looked does this using right click on screen, but what if there is no place on screen available to right click (widget occupies to whole screen)?. I guess we could add one screen temporarily, lock the widgets, and remove the "dummy" screen, but I guess there should be some quicker method?
How to dock particular widget to appear on all screens?
I would like one widget to appear on all screens, something like a Dock on the stock Android. How to mark widget as docked (locked) on all screens?
How to preview a custom (exported) theme?
In the video tutorials it is said to put an image with the same name to thumbs folder (I noticed that it must be png also, not jpeg). However, this only shows the screenshot in the thumbnail preview of exported themes. What about when we select a particular theme, which opens a screen with Delete Apply choices? This preview is still blank screen, which means that it does not use the image from the thumbs. The same behavior is seen in the video tutorials.
How to know if there is an empty widget on screen?
For example, lets say that I have dropped a widget on the screen accidentally, and I did not place any element in it. This widget would be transparent by default. How can I see those widgets, so I can remove them?
Thanks.
Goran_ said:
Hi,
I have played with Themer and widgets last few hours, and it looks very nice. I have looked through the introduction videos, and they were informative, but there is always some information missing, and here is what I could not find:
How to lock widgets without right click?
When we unlock the widgets for editing, we need to lock them back. Every tutorial that I looked does this using right click on screen, but what if there is no place on screen available to right click (widget occupies to whole screen)?. I guess we could add one screen temporarily, lock the widgets, and remove the "dummy" screen, but I guess there should be some quicker method?
How to dock particular widget to appear on all screens?
I would like one widget to appear on all screens, something like a Dock on the stock Android. How to mark widget as docked (locked) on all screens?
How to preview a custom (exported) theme?
In the video tutorials it is said to put an image with the same name to thumbs folder (I noticed that it must be png also, not jpeg). However, this only shows the screenshot in the thumbnail preview of exported themes. What about when we select a particular theme, which opens a screen with Delete Apply choices? This preview is still blank screen, which means that it does not use the image from the thumbs. The same behavior is seen in the video tutorials.
How to know if there is an empty widget on screen?
For example, lets say that I have dropped a widget on the screen accidentally, and I did not place any element in it. This widget would be transparent by default. How can I see those widgets, so I can remove them?
Thanks.
Click to expand...
Click to collapse
Hi Goran,
So sorry for taking an incredibly long time to reply, I'm on a semi-vacation in Thailand at the moment and getting access to internet isn't easy. I'll try help as best I can.
1. Thanks for pointing this one out! The option to do this via the app drawer was removed in the last update, so I'll speak to the team about adding it in again. The only other way would be to enable the Themer notification bar, which has a Themer icon that brings up new themes. From here you can tap the back button to go into the Advanced Settings and then into Desktop.
2. This feature has been requested before, however it will take us a while to add it into Themer, as the resources required are quite vast to say the least. Hopefully in the new year we will have more time to focus on features like this. Right now the team is more focused on fixing bugs and improving the performance.
3. Another requested feature. We still want to improve the front end as much as possible before moving onto the back end. Trust me though we haven't forgotten about the designer side of Themer.
4. I've never heard of this feature before, but it sounds like a good one to have. I think because many users focus on adding widgets that instantly show information, it hasn't been as a priority. I'll speak to the team and see what they think.
I hope this has answered your questions. If you have any more just ask, I have a stable connection now and will be able to reply within the day.
- Marco

[UI] CoordinatorLayout with NestScrollView behavior

First of all let me thank you for your time,
I am a Android newbie programmer and I am stuck with a UI problem. My goal is to achieve something closer to this:
https ://image.ibb.co/e1Y2af/unnamed.png
I thought about it and I decided to do it with a CoordinatorLayout, AppBarLayout / CollapsingToolbarLayout and a NestedScrollView with a CardView. Sounds just fine for this problem, right?
With my actual XML I already have the toolbar, image and the scroll feature.
However, the scroll feature isn't 100% like I wanted. First of all, it's not possible to scroll down since around mid screen (probably because of android:layout_height="275dp"), it is only possible to scroll up. (and of course collapse the toolbar). My main goal is to "open" the image fullscreen. Do you have any idea how can I achieve this behaviour? Maybe controlling % in .java?!
Also have one annoying bug, but I can leave with it for now, just try to help if it also gives you some OCD condition :angel:
I tried to add an transparent property to my LinearLayout but it didn't work.
Normal scroll:
https ://image.ibb.co/duPxQf/normal.png
Buggy 'panel' as it is close to collapse:
https ://image.ibb.co/ms1NrL/buggy.png
My all XML can be found at https: //pastebin.com/R8DSCVXE
Thank you so much
P.S: Links broken to avoid spam message
NelsonPRSousa said:
First of all let me thank you for your time,
I am a Android newbie programmer and I am stuck with a UI problem. My goal is to achieve something closer to this:
https ://image.ibb.co/e1Y2af/unnamed.png
I thought about it and I decided to do it with a CoordinatorLayout, AppBarLayout / CollapsingToolbarLayout and a NestedScrollView with a CardView. Sounds just fine for this problem, right?
With my actual XML I already have the toolbar, image and the scroll feature.
However, the scroll feature isn't 100% like I wanted. First of all, it's not possible to scroll down since around mid screen (probably because of android:layout_height="275dp"), it is only possible to scroll up. (and of course collapse the toolbar). My main goal is to "open" the image fullscreen. Do you have any idea how can I achieve this behaviour? Maybe controlling % in .java?!
Also have one annoying bug, but I can leave with it for now, just try to help if it also gives you some OCD condition :angel:
I tried to add an transparent property to my LinearLayout but it didn't work.
Normal scroll:
https ://image.ibb.co/duPxQf/normal.png
Buggy 'panel' as it is close to collapse:
https ://image.ibb.co/ms1NrL/buggy.png
My all XML can be found at https: //pastebin.com/R8DSCVXE
Thank you so much
Click to expand...
Click to collapse
P.S: Links broken to avoid spam message

Categories

Resources