[Q] Live Templates and $SELECTION$ - Android Studio

I am exploring Live Templates and thought I'd write an extremely simple one that just capitalizes a word. There's even a capitalize() function for me to use .
However, I haven't been able to get this working. I have the following working at this point.
Template text:
Code:
$SELECTION$ "=>" $CAPTEXT$
Edit Variables
Name: CAPTEXT
Expression: capitalize(SELECTION)​​
When I run the above on "hello" I get this output, as expected:
hello "=>" Hello​
The problem is that, if I remove $SELECTION$ from the Template text, it is no longer provided as "surround" Live Template. (i.e., Ctrl+Alt+T doesn't list it). It seems to be the case that surround Live Templates are defined by the presence of $SELECTION$ in the Template text.
Is that the case? Is there a way to provide selected text as a parameter to a function without having to output it as part of the "Template text"? Is there a way to simply capitalize a word ?
Thanks,
Barry

Related

Something like 'grep' for Android?

I have a few hundred text files in a folder on my SD card, and I need some way of searching across them. For instance, if I search for 'balloon', it needs to returns the names of the files that contain the word 'balloon', not in the filename, but in the text.
Bonus points if it would allow for wildcards, or allow me to open the result files in an editor or viewer.
Does anyone know of something like this? It's basically a frontend to 'grep' along with a simple GUI.
EDIT: Oh, and before someone mentions it...Aurora does NOT do this. It can search the filenames, but not within the text files.
An up from a dusty cupboard
Very old thread, up !
I'm looking for a command in Android shell, to do the same job as "grep" for Linux/UNIX ?
Someone got an alternative ?
Thanks

[APP] Notepad v4.0

Name: Notepad
About the app:
The Office app is powerful, but its syncing features slow it down. Notepad by AppsForMe is a great app to choose if you just want to take plaintext notes without the wait. It’s also the only text editor that supports folder structures, and the look of the app makes it feel like a part of the operating system (animations included). You can also pin documents or directories to the Start screen and send documents as emails or text messages.
The app has 4.6/5 stars over 48 reviews.
“Amazing app and it does what it says without any problems. Easily the best Notepad app on the marketplace and the fastest” 5/5
“Superb. You can store email and SMS templates. It makes life a lot easier. Don't miss it.” 5/5
“Very, very, very well done. Thank you.” 5/5
Developer's notes:
I'm always looking for more feedback on Notepad. Unfortunately, I don't get a huge number of support emails, so I'm left up to my own devices to figure out what could be added or needs to be changed.
Please give the application a shot. If you like it, great! If you don't, let me know what's up (in the comments). Chances are I can do something about it. Thanks for reading!
Possible future features (not guaranteed in any way, and not listed in any particular order.)
+ change keyboard theme
+ password-protect
+ lists
+ quick folders (swipe in directory view)
+ "emtpy trash" button
+ scroll sideways on long filenames
+ "import all" to parse "backup all"/"export all"
+ "export all" -> skydrive
+ import from url (skydrive/dropbox)
+ "are you sure?" -> "ready to send?"
+ title of note title -> "document title"
+ custom-name "root"
Source:
http://www.windowsphone.com/en-US/apps/626c487d-f1b0-e011-a53c-78e7d1fa76f8
I'll be watching this thread as well as my developer email, [email protected], for any questions, comments, complaints, or concerns. Thanks!
Some screenshots (attached).
Thank you!!!
Glad you like it!
Please let me know anything about it that seems weird or cool. I do things a lot differently than all of the other text editor applications, and I want to know what's good and what's not.
Wow really good Idea ! I have searched this for Quick Notes ( i use on the PC often the Editor ) and I would use a similiar App on the Phone ...
Thank you!!! i need this for school
simple and does what it says, good app
Notepad Suggestion
First, great Notepad app. I would just like to add a password to a note file.
Thanks!
It's good to see interest in the application! Notepad just hit 15,000 downloads today, and I'm always looking to make that number higher, so the more suggestions you guys have the better.
So far I'm seeing requests for:
(1) a new live tile, particularly for pinned documents/directories
(2) change the name of the "root" directory (to what, though, I wonder?)
(3) password-protect documents
(4) implement lists as well as documents
Anyone have any other suggestions, or want to plus-one a feature?
--AppsForMe
Guess you had missed our review. Skydrive Integration and ability to send notes as attachment.
Yes, I definitely saw your review! I actually did implement two of your suggestions (preview of content when pinned, ability to move folders).
Here's how I feel about your other requests:
First, the Windows Phone operating system prevents third-party developers (read: me) from sending email attachments. Same goes for speech-to-text.
Second, as soon as you want SkyDrive, you should just be using Office. The Office app supports either (a) local files without folders, or (b) SkyDrive files with SkyDrive folders. Goodness knows that I can never match the Office app for stability, integration, features, or UI. Plus, Notepad's other sell is that it's fast--loading notes, saving notes, navigating folders--implementing web functions would slow everything wayyyy down. I see the lack of SkyDrive as a selling point.
(Side note: Office supports sending documents as attachments. Two birds with one stone!)
Notepad for WP the best
I think the requests thus far are pretty much what is missing although it seems it's going to be an uphill battle due to OS restrictions. Installed the app last week on my Lumia and it's amazing, clean and easy to use. Keep up the good work.
I used to use this app, but it had this bug where i could not scroll to the bottom of the longer note. Has that been resloved in the meantime?
Also, I think skydrive sync is important (or even dropbox). When someone changes phones, how is he going to transfer notes?
thank you i need this apps
All the problems with long notes have been fixed.
I'm going to leave the auto-syncing between SkyDrive and the phone up to the native Office application--it does it better, faster, and more reliably than I ever could.
If you need to back up your documents, use the "backup all" feature to email yourself the text of the documents.
Hi Isaac,
Great app. I registered here just to say that, and thank you. I'm a note taking person but one that wants to keep them organize and your app is the only one that does it with ease. (I must of downloaded a dozen to try and removed..only one other did folders, the rest was just one giant list of notes).
If you're serious about taking users feedback, here are some of mine...all are minor little things that are mostly ui based and these are just my opinions. I think your application here is quite impressive so take these only to help out for those you agree with..
- replace 'root' with 'home' or 'my folders' perhaps?
- replace 'Remarks' when creating a new directory with 'Note: ' or remove the word entirely and place the remark note under the text field.
- titles of Directories and Notes become all lower-cased when viewing
- clicking the back button when in Search mode hides the keyboard only, so it requires clicking the back button again to exit the search function..this may be an OS thing I've seen and not something that can be changed unless you can find a way around this.
- add a Folders button at the bottom when in a non root directory to take you back, just like how it appears when in a note to take you back to its directory.
- when in a directory, can the word Notepad and the Directory name on top take you back to the folder list view or one folder out if in a subfolder?
- possible to allow user to choose which directory(ies) to list mango-syle to the right where they can swipe to the right and to go into that directory (sorry if this is unclear, I'm not too familiar with WP terminology yet)
- Button to empty trash when viewing trash directory. btw, how does the trash work..deletes automatically after so long?
- when viewing a file that has a long filename (and the feature is turned on), can it scroll?
- reduce space between documents filenames ..currently lists 5 before needing to scroll?
- backup all..cool feature. I would change 'Are you sure?' which sounds a little scary to something like 'Ready to Send?' btw, can you import back into Notepad? If note, perhaps call the feature 'email all' instead for now..
- when creating a new note it shows 'new document', the next screen where it ask for the file name it displays 'new note' ..just a consistence thing
- are all notes saved as txt files on the device? what if you remove the .txt? does it need to be displayed if it's automatically saving them as txt files.
- Can titles of notes and directories names be the system's accent color and turn black when choosing them? ..the reverse essentially.
- when adjusting toggle sliders in Settings, the phone wants to swipe to it's neighboring page a little too freely (btw, love all the settings you have here!)
- remove the larger 'root' when in the root directory list to gain some real estate back to see more directories and so it's not repeating perhaps?
And if you need any simple graphics help, I can help out.
I'd love to see Dropbox support with everything being saved to dropbox and loaded from dropbox. I'd even pay for a dropbox enabled version.
Can it handle long text file ?
Can it import text file from skydrive?
Can we Password lock the app or folder?
thanx
First: Thanks, Lumiame, for the excellent feedback. You've greatly extended the set of features I'm considering adding, and you've noted UI inconsistencies and confusions that I'll make sure to address in the next update.
To everyone who's commented so far: thanks for the good feedback. This quarter at my university is slower than my last quarter, so I should be able to get to work on the app.
Look for a good number of changes in the next updates.
thanks for sharing

[APP] RK Noter - save excerpts from documents to your SD card

Here is a little app I've been writing which I think will be useful for eReader users. It adds an entry in the share menu when you share some text, and it saves what you shared to your SD card in a folder you can specify. You can also set a divider (or no divider) to separate the notes you've saved. The file name is set to be either the 'subject' of the share intent (e.g. the name of the file/book you were viewing), or the name of the app which you shared from if it doesn't provide a subject field.
To do:
- Note headers e.g. time and date
- Optional editing/selection of note file and optional editing of note content prior to saving (current insta-save is nice but more options are also nice!)
- Implement a folder browser instead of typing in manually
- Preview of note dividers
- ??
Let me know if you have any suggestions or requests for additional features.
Downloads here: https://www.mediafire.com/folder/63k32it3d7mdt/RK_Noter
P.S. If your regular reader apps don't have an option to select and share text, my recommendations are Orion Viewer for PDF/djvu, and EBook Reader by Rabbit for most anything else. I would recommend AI Reader which I really like, but it has a few more steps involved to share text, and it provides a really over-helpful subject string, complete with the time the text was shared, thus a new file is generated each time...
...reserved? Accidental post actually, can be deleted!

Development question - error resource file has much lines

Hey buddies. On my app to pebble, on IDE CloudPebble, I created a new resource, is a simple txt file, but this file have 3000 lines. If I cut some lines, the app install normally(example 500 lines), but I want that it read all txt(the 3000 lines). To read, I use the recomended functions of Developer GetPebble, after I add the strings to a array 'n execute a function, after this array is cleaned, to read a new line of strings. Exists a configuration to resolve this? I really want read all lines. I don't wanna install it app into pebble smartwatch, I created it app only to test, before use into watch without read the resource file, only capturing data of accelerometer.
Language C.
Resource type: Raw Binary Blob.
This file has 78,5 kb. Thanks!

How do I rename spreadsheet columns and alter app to suit?

I have built an app from a tutorial but I am having problems adapting it to my needs. I need to rename the spreadsheet columns but when I do (and match the names in the app) if fails to get the data.
I'm not sure what spreadsheet you are referring to, but just going off my excel & VBA knowledge, can you check that auto calc is turned on? and/or hit F9 to recalc. How about the name manager section in the tool ribbon in excel? Say for example the column you want is called "variables" and it was originally defined as $A:$A (i.e., all of column A) but you did something and now it's been altered so that it's $A:$B (i.e., is all of columns A & B) then that could cause problems. Similar thing if it the area was smaller, like $A$2:$A$6. If you added a row to cell A7, the name manager is not looking past A6 in this example so your new info won't get a hit.
Hope that helps
I am using a google sheet to hold data for the app, one entry per row. I have tried with the code I have that builds the basic app. The tutorial app has first_name, last_name, email as column headers. I need them to be gridref, fallname, w3w. I have to name the data fields (?) within the app but if I use GridRef it fails but gridref works. can string names not have/be capitalised?
Also if I create a new project called WF the code I'm using works but if I name it waterfalls it fails.
I can rename them in the spreadsheet, there are no calculation fields etc. just simply text in a cell, typed in to be passed over to the app in JSON format.
I can add a new line which displays in tha app as a new entry which is what I want. I will need to add columns at some stage but I'll be happy to get this working first.
I have managed to rename 3 of the four columns but it fails when i change the name of the 4th That may not be a problem but changing last_name to aw3w causes an issue. In the app I think they are called 'holders', are some names reserved by the system?
I have figured this one out.

Categories

Resources