[Q] Need help with notepad app tutorial - Android Q&A, Help & Troubleshooting

I tried to create the notepad app from developer.android.com/resources/tutorials/notepad/index.html , wondering if someone can help out with extra options for app as:
1__Setting up a custom striped list for the list of notes.
2__Creating a custom text edit view that overrides the draw() method to make it look like a lined notepad.
3__Implementing a full ContentProvider for notes.
4__Reverting and discarding edits instead of just automatically saving them.
5__Or even adding an audio file or photo!
Any help is appreciated
Thanks in advance

Related

[MOD]SASHIMI - regexport the values YOU want

I recently started to use SASHIMI heavily to customize my HD after a ROM flash. Congrats and credits to bengalih who did an awesome job.
One option i really missed in SASHIMI is to be able to specify specific values for custom registry export, so i decided to modify the script to my needs. From what i've read in various threads/forums other people wants to do the same, so i'll share it here for everyone who wants to try.
The mod allows additional parameters in REGEXPORT.INI:
key1=<yourkeypath1>
key2=<yourkeypath2>,<value1>,<value2>,<value3>, ... ,<valueN>
key3=<yourkeypath3>,*
key1 is the traditional way of exporting registry keys as its already implemented. It exports this key including all values/subkeys.
key2 specifies a key, plus the value names you want to export (value1-valueN). Value names are CASE SENSITIVE (!), if they dont match you end up with an empty key.
key3 specifies a key, plus ALL values, but WITHOUT subkeys.
WARNING: DO NOT mix filtered (like in key2, key3 examples) and unfiltered keys (key1) in the same section, as this will lead to missing values. If you need to do this, split them into separate sections.
examples from my own usage:
[Opera vibration]
RegExportDirMode=Auto
key1=HKEY_LOCAL_MACHINE\Software\Opera\Defaults,VibrationEnabled
[power+backlight settings]
RegExportDirMode=Auto
key1=HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Power\Timeouts,BattSuspendTimeout,BattSuspendTimeoutSave,ACSuspendTimeout,ACSuspendTimeoutSave
key2=HKEY_CURRENT_USER\ControlPanel\BackLight,BatteryTimeout,BatteryTimeoutUnchecked,ACTimeoutUnchecked
If you want to give it a shot here are the downloads:
CustomRegistryExport.txt
SASHIMI.mscr
Nice mod, m'lady!
I hope bengalih will consider it for future SASHIMI versions
Great job!
Very Very helpfull!
Thanks a'lot!
well... just tried this (kept a backup of the original mscr). The only key it exported was key9. It took what felt like 5min to get past the "mysettings.............." line.
Code:
[MySettings]
RegExportDirMode=Auto
key1=HKLM\Ident
key2=HKLM\Software\Microsoft\Clock
key3=HKCU\Software\Microsoft\Vmail\UserProvidedNumber1
key4=HKCU\ControlPanel\Notifications
key5=HKLM\Software\Microsoft\Bluetooth\Devices
key6=HKLM\System\CurrentControlSet\Control\Power\Timeouts
key7=HKCU\Software\HTC\People\OwnerInfo
key8=HKLM\Software\HTC\Manila\Configuration
key9=HKCU\Software\HTC\Manila,Weather.CityList,Weather.ServerURLOverride,Locale,Weather_Focus,Weather.Fahrenheit,Weather.PostRunFirst
key10=HKLM\Software\Arcsoft\ArcSoft MMS UA\Config\mm1
key11=HKCU\Software\HTC\TaskManager
key12=HKLM\Software\HTC\Manila\ProgramLauncher
And Generated this .reg file
Code:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\HTC\Manila\]
"Weather.CityList"="37384,30914,31106,30824"
"Weather.ServerURLOverride"="http://weather.conflipper.com/htcweather/weathertranslate.php?ac=CONFLIPPER&locCode=%25ls&version= 1&device=innovation"
"Locale"="en-US"
"Weather_Focus"="United States"
"Weather.Fahrenheit"=dword:00000001
Notepad shows that all on 1 line w/ carriage returns as open squares.
Sashimi.mscr is in the BIN folder along w/ the .txt file. The weather entries are the main reason I need this mod. I think I did everything right, but looks like I missed something.
ProfEngr said:
well... just tried this (kept a backup of the original mscr). The only key it exported was key9. It took what felt like 5min to get past the "mysettings.............." line.
Notepad shows that all on 1 line w/ carriage returns as open squares.
Sashimi.mscr is in the BIN folder along w/ the .txt file. The weather entries are the main reason I need this mod. I think I did everything right, but looks like I missed something.
Click to expand...
Click to collapse
congrats ... you found a bug
Notepad showing only 1 line is normal, it cant handle lines terminated with LF only.
Is a fix in the works?
ProfEngr said:
Notepad shows that all on 1 line w/ carriage returns as open squares.
Sashimi.mscr is in the BIN folder along w/ the .txt file. The weather entries are the main reason I need this mod. I think I did everything right, but looks like I missed something.
Click to expand...
Click to collapse
Hello ProfEngr,
I'am exporting a lot of keys with Dotfreds taskmanager.... with a simple text editor I place all of them in 1 Reg file..... and afterwards I import only 1 reg file with all the keys in it ...
Not really a solution, but a work-around
Greets from sudist
thanks, I'll try that in the interim.
sudist said:
Hello ProfEngr,
I'am exporting a lot of keys with Dotfreds taskmanager.... with a simple text editor I place all of them in 1 Reg file..... and afterwards I import only 1 reg file with all the keys in it ...
Not really a solution, but a work-around
Greets from sudist
Click to expand...
Click to collapse
I do that with normal SASHIMI too. I setup several registry settings in a text ini file, mysettings1 for registrations and program setup, mysettings2 for CHome setup like weather, used icons, launchers shortcuts etc, mysettings3 for device setup like email, ISP, bluetooth, advanced config etc and so on. So i can restore everything after a hard reset or flash, or only one set of registry at any time. From time to time i do a custom backup of the current registry.
ProfEngr said:
Is a fix in the works?
Click to expand...
Click to collapse
I'll look after that sometime next week
any luck squashing that bug?
I'm currently testing the changes. Looking good so far. If they turn out ok i'll publish them tomorrow.
I tested the changes and they work great, however it takes ages to process a fair amount of regitems.
I wont publish this as its practically unusable. The reason is that i adapted the script to filter out unwanted regentries, which is slow by design. The better way would be to write a filter in C++ or .net and call it from Sashimi.
My advice is this: split the settings in two or more sections, and dont mix regkeys that need filtering with the ones that dont.
For your example this would look like this:
Code:
[MySettings1]
RegExportDirMode=Auto
key1=HKLM\Ident
key2=HKLM\Software\Microsoft\Clock
key3=HKCU\Software\Microsoft\Vmail\UserProvidedNumber1
key4=HKCU\ControlPanel\Notifications
key5=HKLM\Software\Microsoft\Bluetooth\Devices
key6=HKLM\System\CurrentControlSet\Control\Power\Timeouts
key7=HKCU\Software\HTC\People\OwnerInfo
key8=HKLM\Software\HTC\Manila\Configuration
key10=HKLM\Software\Arcsoft\ArcSoft MMS UA\Config\mm1
key11=HKCU\Software\HTC\TaskManager
key12=HKLM\Software\HTC\Manila\ProgramLauncher
[MySettings2]
key9=HKCU\Software\HTC\Manila,Weather.CityList,Weather.ServerURLOverride,Locale,Weather_Focus,Weather.Fahrenheit,Weather.PostRunFirst
Or - and thats the way i prefer - split it into functional portions, one section per key. If you need to troubleshoot something its way easier to handle small bits instead of one megaload of settings.
I added a warning to the first post to make that clear.
Works, but wow - slow
I got it to work, creating two ouput files (allmyregistryneedsnotfiltered.REG & allmyregistryneedsyesfiltered.REG). Output was about 2500 lines and 250 lines respectively. The non-filtered 2500 lines ran in the blink of an eye. The filtered 250 lines took about 40 minutes. It seems to have worked perfectly, but wow, what a time investment.
[AllMyRegistryNeedsNotFiltered]
RegExportDirMode=AUTO
HTC-Camera=HKEY_LOCAL_MACHINE\SOFTWARE\HTC\Camera
Internet-Shortcuts=HKEY_LOCAL_MACHINE\SOFTWARE\HTC\Manila\InternetPush
Keyboard-Config=HKEY_LOCAL_MACHINE\SOFTWARE\KeyboardConfig
LockScreen=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shell\LockScreen
Mail-Settings=HKEY_LOCAL_MACHINE\System\Inbox\Mail Settings
Manila-Home=HKEY_LOCAL_MACHINE\SOFTWARE\HTC\Manila\Home
Manila-Tabs=HKEY_LOCAL_MACHINE\SOFTWARE\HTC\Manila\Configuration
S2U2-Settings=HKEY_CURRENT_USER\Software\A_C\S2U2
Sound-Notifications=HKEY_CURRENT_USER\ControlPanel\Notifications
SPB-Backup=HKEY_CLASSES_ROOT\CLSID\{7B9996D8-B043-4013-98B5-FC12829C28D6}
SPB-Time=HKEY_CLASSES_ROOT\CLSID\{B6C22A2E-6610-4033-990C-C8CDCF73B1BE}
Splashid=HKEY_CURRENT_USER\Software\SplashDataReg\SplashID
Total-Commander=HKEY_CURRENT_USER\Software\Ghisler
XDA-Folders=HKEY_LOCAL_MACHINE\Software\XDA\DirCopy
[AllMyRegistryNeedsYesFiltered]
RegExportDirMode=AUTO
Date-in-Titlebar=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shell,*
Facebook-Photo=HKEY_CURRENT_USER\Software\HTC\People\OwnerInfo,FBPhotoFromFB,PhotoPath
Facebook-Settings=HKEY_LOCAL_MACHINE\SOFTWARE\HTC\FacebookSDK,*
HTC-Accounts=HKEY_LOCAL_MACHINE\SOFTWARE\HTC\HTCAccountManager,*
Identity=HKEY_LOCAL_MACHINE\Ident,*
Manila-Settings-Level-a=HKEY_CURRENT_USER\Software\HTC\Manila,*
Owner=HKEY_CURRENT_USER\ControlPanel\Owner,*
Owner=HKEY_CURRENT_USER\ControlPanel\Owner,*
Softkey=HKEY_LOCAL_MACHINE\SOFTWARE\HTC\Manila,HomeLSKText,HomeLSKPath
Auto install jar games/apps
I'm looking for a software that auto-install .jar games / apps (something like sashimi does with .cab files), may you help me ?
Thank a lot
ciao

XML file Homescreen plusplus

I'm using Homescreen plusplus to record my call/sms/data statistics.
Does anybody know a program for windows that can read and process the xml file so i can see how much i called, have been call, how much i called a specific person?
I'm not that good of a programmer myself!

Possible to remove picture icon from "contacts"?

Probably more of a general Android question, but thought I'd give it a go here. On way to work shortly, so apologies for my lack of proper search.
Once upon a time on my SGS, someone showed me where these icons are located - I'm sure I'll find them again, but I guess I'll have to do some kind of text realignment, which is probably out of my depth.
I just want my contacts to show as a list - no icons, no photos.
Stock KE2, rooted via CWM, have Root Explorer.
Many thanks to anyone who can point me in the right direction - will do further research when I get to work.
Hello!
Yes I have same question!
I Dont use photos for Contacts - So it use Empty Icons and neccesary space so....
Please Help to remove Contacts Photo Icons from Logs and Contacts PLEASE!
XWKK5
SGS 2
wrong forum
Right forum!
Please Help!
Might not be what you want but you could replace the image with a blank one in the framework or twframework file.
Sent from my GT-I9100 using XDA App
No. Pictures(res\drawable-hdpi-finger\contacts_default_image_small_01 - 05.png) are in Contact.apk file. When I remove'em from it - empty spaces remain there - so it's not expand Contacts lines to that space... So we need to encrease table row size...
Well, the contacts db is located here:
/data/data/com.android.providers.contacts/databases/contacts2.db
I don't know how you plan to decipher this file. It's neither xml nor plist (like iphone).
Sent from my GT-I9100 using Tapatalk
I just checked go contacts ex and it can do what you want via a setting. Works very well.
Sent from my GT-I9100 using XDA App
dikai_yang said:
Well, the contacts db is located here:
/data/data/com.android.providers.contacts/databases/contacts2.db
I don't know how you plan to decipher this file. It's neither xml nor plist (like iphone).
Click to expand...
Click to collapse
The contacts2.db is a sqlite database file. You'll need the sqlite3 executable to view it's contents (eg. sqlite3 contacts2.db).
Don't think it'll do what the OP wants as it contains contact details and not the layout of the contact list. Think you'll need to decompile the apk and edit one of the drawable/*.xml files.
Haven't really looked at this but a guess would be it's one of the .XMLs in res/laout in the Contact.apk where you can edit out the imageview for the photo.
Yep, looks like it's in res/layout/favorite_contact_list_item.xml
Someone's reading my mind - I was thinking of bumping this thread last night... spooky!
As suspected, I'm out of my depth here - but thanks for the replies everyone, I may try to get back into my depth over the weekend. It's one of those not-really-a-big-deal-but-it-still-bugs me things.
Just switched from adw to Go launcher. Not a fan of 3rd party apps for contacts/SMS, but I'll give it a look.
Thanks again to all.
I tried GO launcher. Wasn't a fan of it. Anyway on ICS these picture icons are even more of a pain! Why do you need a picture of yourself next to every text you send in the thread!?!? And why do you need a picture of the person you are texting next to their text. Have a picture of the person on the list of threads fine.... but not in the thread itself thats stupid and takes up to much screen space.
Who wrote that into ICS? Not an improvement!
Has anymore found a way to change it in ICS?

[Q] widget editing

Not sure if this belongs here or in the Android Development Forum. I want to modify the SGS2 Digital Clock widget by adding an "onClickpendingIntent"?? (I think that's what its called). Basically , I want to add a function to the widget where if I tap on the widget it opens up to a specific app (clockpackage.apk) so that I can access my alarms easily. Currently I am using Weather and Toggle Widget and it has this with the option to choose which program to launch when you click on the widget. I don't need the option to open up different apk's when I click the widget, I just want it to open up the clockpackage.apk. I have googled the subject and found a page on how to do it, but I am not a programmer nor a developer so this is way over my head. I know how to open an apk to modify the hdpi images it contains but that's about it. Here is the site that explain(somewhat) how to do it. http://stackoverflow.com/questions/3...get-in-android
If someone could give me more info on what xml file I need to create or modify within the apk (and how to create or modify it). I imagine I might only need to insert the specific code into one of the xml files and then insert clock package.apk into the code somewhere and resign the apk, but I want to be sure. Any advice would be appreciated.
radugb out

[Q]How to identify drawable name/id on running app?

Hi! I'm new into creating themes, and I'm looking for a tool that could make it easier. I know how to extract .apk, how to replace images, modify .xmls, but often I don't know what an image is for. Let's say im modding SystemUI and I want to change background of my notification bar. The only thing I know is that inside drawables folder I have to look for something named notification_bar.png, something like that. I was looking for an app that could tell me how an image inside an app is called in code ( example: I'm inside calculator app, I press on background and the app says that file is called background.png and is inside drawables-xxhdpi). I tried Android Studio --> Layout Inspector, but it didn't help me at all because, well, I just don't understand it.
Of course, while modifying SystemUI I can look for explaination of certain pngs on the internet, but
-not every SystemUI is the same
- if I want to change drawables of an app that doesn't have specific explaination I have to know how to identify drawables.
It must be possible somehow, because I've run into some themes that modify external apps (like WhatsApp, SuperSU etc.)
Those ppl had to know what certain .png is for, the question is: How?
I don't believe they just had to sit there and try every possible combination.
Also, inside SystemUI there's A LOT of files that are never used, and their names can be misleading.
Is there any way to identify drawable inside running app easily? Without digging in code and guessing?
Thanks in advance for any answer
I tried to analyze Mms.apk (it's system app). I was looking for a drawable representing default contact icon, here called ic_contact_picture.png .
I actually managed to find a proper layer in Layout Inspector(ConversationListItem.xml), analyzed it and found a code referring to table "id" in resources.arsc . The object the id referred to was called "avatar". And that's it. I couldn't find id(I got it from resources.arsc/drawables) of ic_contact_picture.png anywhere in that layout. There was only id referring to "id/avatar". It doesn't make any sense.
How do I find drawables using Layout Inspector or any other tool?
It was easier when it came to text. I also found an id referring to resources.arsc/id, but that id was included in the layer I was looking at (ConversationListItem.xml).
But I still wasn't able to perform any action on that text, because there wasn't any setting like text color or anything, there was just a line android:textAppearance="@attr/0x1010041"
It is an attrib from framework-res.apk, but when I opened framework-res.apk and found that attrib there was no reference to anything like color, font, so there was nothing I could really do.
Can someone help me with those 2 problems?

Categories

Resources