yashsingh1/xdaforums huggingface dataset:
[Android General] daxgirl:
Step 1 - Importing the project:

1. Perform full installation of the latest stable version of Android Studio in your environment. You can find info about stable and canary releases here

2. You can have more than one version of android studio installed on single platform. For more information please read further on the same page in section Using Multiple Android Studio Versions. I personally do recommend the latest canary build, which is currently AndroidStudio 2.2.0 preview 5. But you can always go with the stable release. Or beta channel.

3. Make sure your sdk is updated, including sdk for platform 24 (nougat). The compile sdk for this project is 24.

4. Make sure your support repositories are configured and updated.

5. Click on our github repository link on the OP first post and make sure you're connected with your github account. If you don't have one - create it! Why? because you will need to share your sources for this project. And because you all use as mantra that you can mod android apps because it's open source. So BE OPEN SOURCE. Have your name on github.

6. Once you're logged in into github, fork our repository. In the right upper corner of our main git repository you have those buttons:

Click "fork" to make a copy of this repository in your own repositories. Now you have your own repository.

7. On YOUR repository find this green button on the top right above the code, which says "Clone and Download". DO NOT DOWNLOAD ZIP. Instead, click the little "clipboard" icon to copy the .git uri and return to studio.

8. In studio: File > New >Project from Version Control > Git

9. Paste the git uri and choose destination. Click ok. Android studio will import the project from git and open it for you.

10. At this point if you're asked to update gradle build tools or anything else, do it. Wait for gradle to sync with project files. If you get errors, resolve them as referenced. If you cannot, google is your friend.

We WILL provide some support for initial importing of the project and setting it up for a very limited period of time. Gradle can be a tricky business. Please be sure to provide us with specific error from gradle log and a line in the gradle script on which the error is made.

11. We WILL know if your errors are because you didn't update sdk and build tools. And we will kick your butts for posting without following instructions. Remember, our time is valuable and given to you for free. Our instructions are clear and we made a huge effort to write them. If you can't be bothered with following them, beware.

12. Once the gradle is done syncing without errors, just in case, click Build > Rebuild Project. Once that is done without errors and it says BUILD SUCCESSFUL, you can start building your project following the instructions on the next post.
[Android General] daxgirl:
Backup and Restore functionality

Backup and restore is done on a background thread using a service. Once the service gets intent with certain action it performs the required activity and shuts down.

The service can be called with wither backup action or restore action. In each case it will act differently.

1. How does that work - BACKUP:

When a request for backup is passed to the service, it does several things:

1. Checks if on your sdcard there exists a folder called RomControl and checks if the folder contains subfolder backups. If they don't exist, they are being created.

2. In our data f folder in data/data/com.wubydax... we have a shared_prefs folder. Inside it we have preference xml files for all of your preferences.

3. We iterate through those files and read them line by line, and once they are read, we take the keys and read the actual database value for that key

4. Then we write those values with their corresponding keys into a new backup file

5. Each backup file has a new name. You can see how it's formed here:

String currentDate = new SimpleDateFormat(getString(R.string.backup_file_prefix_date_format), Locale.ENGLISH).format(Calendar.getInstance().getTime());
String fileName = currentDate + "_" + Build.DISPLAY;
String backupFileName = fileName + getString(R.string.backup_file_suffix);
File newBackupFile = new File(Constants.BACKUP_FOLDER_PATH + File.separator + backupFileName);

As you can see we use 3 components for name:

a. Current date and time up to munites

b. The display id from the build.prop

c. suffix RCBackup​

That is so the users can differentiate between different backups from different roms or versions​

6. It also backs up the file preferences (see the preference explanation post for that)

7. The service finishes and throws a toast that it's done and the file can be found in the backup directory​

2. How does that work - RESTORE:

1. During restoring action, the main activity closes. It also says so in the warning dialog which appears right before restore is activated.

2. We made it so to make sure no onPreferenceChangeListener is triggered for any of your preferences. We also want a clean restart of the activity once the restore is done, so all the items can be loaded from the database, which has been updated by the restore process.

3. During restore we read the selected backup file, break it into pieces and write the values to database. When the activity is reloaded, preferences read from databases and update their own values.

4. For file preferences, during restore process we delete the files saved previously and only create the ones contained in backup file.​

​
[Android General] daxgirl:
reserved 8
[Android General] daxgirl:
reserved 9
[Android General] daxgirl:
reserved 11
[Android General] daxgirl:
reserved 12
[Android General] tdunham:
This blows away the original version folks.

Cant wait for it to go live. And couldn't resist being the first poster as well. :D
[Android General] daxgirl:
You are simply the best ???
[Android General] Kamy:
Wow. This is amazing. Thank you for your time and sharing it. It's just another treasure after v1.0.
[Android General] nguyentankiet:
Waiting
[Android General] thereassaad:
Wooooow , loooong time waiting for this , now time for reading & starting ready for it xD , as usual thanks for ur awesome work , ???
[Android General] daxgirl:
Happy to see you here! Don't read yet. Only posts 1, 2, 3, 4 and 6 are finalized.
[Android General] Kamy:
Wow, I am loving how this version is going to handle killing apps. And about custom preferences I am a bit confused but I guess I should wait till it's out and see how it would work. Setting default_theme it's just mind blowing! Guys before the source is out I think it would be a good idea to try reading and understanding what is outlined in OP I didn't use to sign my rc but it's explained clearly how to do it in studio. :good:
[Android General] tamirda:
WOW!

As I have said before, you and Wuby are the most precious thing to us, the ROM devs :)

What an incredible update!

Sure, I have a lot of work to do on rom control v2, but I have you on my side -that's a good thing hehe.

Amazing work! I am sure my users enjoy it as well.

Keep it up, but make some time for me too ;)

Sent from my SM-G900F boosted by PhoeniX ROM
[Android General] ROBERT CM:
Off topic

[MENTION=2932870]daxgril[/MENTION] you can share source code of Phronesis DPI Changer by wubydax

Im searching, searching but without sucess, maybe it is with other name..

Thanks
[Android General] chee8220:
Anyone try to develop this rom control for Lollipop rom(SDK21, Android 5.0), do it running properly?
[Android General] goodman_east:
thanks for the excellent source code and these explanation.
[Android General] DaOldMan:
It's in my git mate. You can pull it off there :):

https://github.com/Da-OldMan/DpiChanger
[Android General] ROBERT CM:
Thanks mate :)
[Android General] ROBERT CM:
[MENTION=2932870]daxgril[/MENTION] a question

I want at open rc always show navigation drawer..

I try to make with this post in rc v1 but in rc v2 is very different and without sucess :(

http://xdaforums.com/showpost.php?p=62474932&postcount=278

you can help me please :)
[Android General] JonathanRAZ:
[MENTION=4714483]daxgirl[/MENTION] found a way to create the vectors via mobile just with the path and some obviously xml files dont need pc for anything i just felt like telling you this because i am happy lol
[Android General] daxgirl:
Hey, Robert!

It took some time but I didn't forget.

In MainActivity.java find the following method and add the line in blue:

private void initViews() {

Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);

DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
assert drawer != null;
drawer.addDrawerListener(toggle);
toggle.syncState();
[COLOR="Blue"]drawer.openDrawer(GravityCompat.START);[/COLOR]

NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
assert navigationView != null;
navigationView.setNavigationItemSelectedListener(this);
Menu navigationMenu = navigationView.getMenu();
setUpPrefsMenu(navigationMenu);
}
[Android General] ROBERT CM:
do not worry daxgril, I'm happy for this change resolved..

Thanks for reply.. :)
[Android General] heiha10:
help me

Hi I need help

like this

<com.wubydax.romcontrol.v2.prefs.MyListPreference android:entries="@array/double_home_entries" android:title="double tap home settins" android:key="double_tap_home" android:summary="s%" android:entryValues="@array/double_home_values" />

<com.wubydax.romcontrol.v2.prefs.IntentDialogPreference android:title="double tap home with custom app" android:key="double_tap_home_app" android:summary="choose app" app:showSearch="true" app:intentSeparator="/" />

but when I double tap home , my phone will reboot. however with the romcontrol V1.0 doesn't have this question .

my phone is note4, how will I to do . my english is poor，I wish you can understand me。Thanks！！:crying::crying:
[Android General] Wuby986:
The problem is not in rom control but in the mod you applied to one of the system app. We do not answer to modding question here
[Android General] Kamy:
Try removing app:intentSeparator="/" and see if it get sorted. I had the same experience. After removing intentSeparator mod started working fine.
[Android General] daxgirl:
The default separator is "##" so I doubt it will work without changing it explicitly to "/". Because in actual database if I am not mistaken the separator is "/". I have this working fine with separator "/".
[Android General] heiha10:
thanks

I have solved the question to ask someone. the trulble is here

---app:intentSeparator="/" replace ---- app:intentSeparator="\##" the function is ok

You can reply me,I'm feeling happiness! thank you!:):)
[Android General] daxgirl:
Nice for you. There is no need to add escape character \ before any hash strings. Just a note. You can just use "##". Same with colors. We have noticed alot of rom builders are using escape strong before hex strings. It's not necessary. And can actually break functionality.

Good luck.
[Android General] heiha10:
thanks . in my phone "/" doesn't work but "\##" is ok:):)

you are great ,thanks a lot. I have solved . Happy life ！:):)
[Android General] daxgirl:
As I said... it's fine for you to use ## but remove the \. It's an escape character. Do not use escape characters for hashes.

Just use "##".
[Android General] heiha10:
thanks

---------- Post added at 11:11 AM ---------- Previous post was at 11:06 AM ----------

OK ，thank u once again:D:D
[Android General] kep2008:
Can you explain in more detail, for dummies, which buttons to press and where ? :crying:
[Android General] thereassaad:
She's mean you can added ( edited ) in github into your rom control by adding it xxx.java & xxx.xml that they shows in thier github ( latest commits edited ( updated ) ) or download the full source then integrate all your previous editing into your new source , then build it , that's what i do it here , + before you start working on v2.1 just update all repository & plugins & gradle too then you start ..
[Android General] daxgirl:
Actually you can just merge your fork with our master latest commits on git and then pull the changes to your pc and merge code. Just read some git documentation guys. It will make life much easier.
[Android General] #Henkate:
[MENTION=4714483]daxgirl[/MENTION]

Hello!

I have finished my exams ( didnt pass them though) 2 weeks ago and now im working on my rom again.

I wanna ask you if is allowed to add a donate button/image/text with link to my paypal for donating under "About me & Credits" (modified from "About us"), not for the Rom Control, but for the rom, if people wants to.
[Android General] daxgirl:
Of course it is. Even if you want to be donated for rom control, for example sell it, you can... as long as you provide full source code including pro functions and conditions.
[Android General] micky387:
[MENTION=4714483]daxgirl[/MENTION]

Hello.

I port all my work from RC1 to RC 2.1 but i have one issue with one thing. RC2 always FC when i choose one mod.

I have this mod working great with ThumbnailListPreference on RC1 Here

I try to port this to RC2 but i always have a FC with ThumbnailListPreference

E/AndroidRuntime(19494):	at com.wubydax.romcontrol.v2.prefs.ThumbnailListPreference.onBindView(ThumbnailListPreference.java:124)

My code into RC2 is

<com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="false" android:summaryOff="Disabled" android:summaryOn="Enabled" android:title="Dialer Background Switcher" android:key="dialer_background_switcher"/>
<com.wubydax.romcontrol.v2.prefs.ThumbnailListPreference android:defaultValue="0" android:key="dialer_background_style" android:title="Dialer Background Style" app:drawableArray="@array/dialer_drawables" app:entryList="@array/dialer_background_style_entries" app:entryValuesList="@array/dialer_background_style_values" android:dependency="dialer_background_switcher"/>
<com.wubydax.romcontrol.v2.prefs.ColorPickerPreference android:defaultValue="#ffffffff" android:title="Dialer Background Color" android:key="dialer_background_color" android:dependency="dialer_background_switcher"/>

and arrays

<string-array name="dialer_background_style_entries">
<item>Anastasia Style</item>
<item>Glassplate Style</item>
<item>Gold Style</item>
<item>Grill Style</item>
<item>Mesh Style</item>
<item>Motherboard Style</item>
<item>Rainbow Style</item>
<item>Round Style</item>
<item>Silver Style</item>
<item>Stone Style</item>
</string-array>
<string-array name="dialer_background_style_values" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
</string-array>
<array name="dialer_drawables">
<item>@drawable/dialerbutton_1</item>
<item>@drawable/dialerbutton_2</item>
<item>@drawable/dialerbutton_3</item>
<item>@drawable/dialerbutton_4</item>
<item>@drawable/dialerbutton_5</item>
<item>@drawable/dialerbutton_6</item>
<item>@drawable/dialerbutton_7</item>
<item>@drawable/dialerbutton_8</item>
<item>@drawable/dialerbutton_9</item>
<item>@drawable/dialerbutton_10</item>
</array>

Can you help me to fix this please ?

Thanks for all your work and wuby too :good:
[Android General] Wuby986:
Use android studio to get the log first of all. It will most likely point to where error sits.

Looks at first look like you have problems with arrays. Or maybe with the persisted string. Uninstall and reinstall the app after a full reboot and see if studio helps you finding the error or post the error log from it
[Android General] Wuby986:
Well i currently am at seaside.. lol

But i see you have a null pointer exception in thumbnail class at line 124
[Android General] Wuby986:
Did you solved? I finally managed to get in front of pc and i can give you an hint ?
[Android General] micky387:
Not solved.
[Android General] daxgirl:
Mickey, your error points to problem initiating array list. Which is weird because it's a java lib method.

I tried your code and cannot reproduce an error. It works. So that brings to conclusion that the problem could be with Java version, android sdk, android sdk on the device or build tools. In any case, if wuby manages to reproduce an error maybe we can try and help. If not, you will need to dog on your own. This is most vastly used preference after switch and I never had a complaint about it till now. So I really think it's something on either compiling or running side.
[Android General] Wuby986:
I did managed to reproduce.. it is due to name space :)
[Android General] micky387:
Ok,thanks anna. I have the lastest sdk on my windows 10

Where do you see that ?
[Android General] Wuby986:
Well that was the problem on my side when i tried to reproduce. Please check if you have 2 xmlns on top of the xml where you added the code, if so delete one and rename using refractor on the other if you wish to change to a different ns
[Android General] thereassaad:
Yes that's the common problems for too much rc builders , i have got too much pms about this issue , so here the fix just replace it with urs micky ...

<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"

xmlns:app="http://schemas.android.com/apk/res-auto">
[Android General] micky387:
Oh great,working now :good:

You're the master :cool:

Big thanks and best regards
[Android General] edzamber:
Hi all,

Just a question : how to add command for exemple : app:dependentValue="1" in others xml than ui_prefs.xml, for exemple in notification_panel_pref because studio can't build apk because an unbound prefix. There is no notification_panel fragment.

So i can only use this in ui_prefs.xml, even with xmlns:app="http://schemas.android.com/apk/res-auto"

An another tip

For SeekBar preference, minValue and MaxValue doesn't working as in attr.xml minValue doesn't exist, its SeekBar:minValue

So we need to add something like this to make it working :

<com.wubydax.romcontrol.v2.prefs.MySeekBarPreference

xmlns:SeekBar="http://schemas.android.com/apk/res-auto"

android:defaultValue="255"

android:key="gear_bg_opacity"

android:title="Opcaité de l'image"

SeekBar:maxValue="255"

SeekBar:minValue="0"/>
[Android General] sonnguyenpg:
You add app:dependentValur="20" ok.
[Android General] Kamy:
Hi. I just upgraded to 2.1 today.

The APK can be built, signed and installed though there some errors at the end of signing process. See attachment.

Firstly I merged new commits to my existing project. Then when I get this errors I compiled a fresh project from the source code v2.1. I got the same errors on both. I used the same setup (Android Studio and Java version) on both v2 and v2.1. No error used to appear after signing RC v2.

Please forgive me if my issue is not source related.
[Android General] Wuby986:
Weird.. did you try cleaning build?
[Android General] Kamy:
Ye I tried Clean Project option already. The error appeasers right after compiling a clean build or any change. Though no error on building the app.
[Android General] thereassaad:
Uninstall Android Studio completely from everywhere on ur pc , then after uninstall it & deleted all files & folders related to a.s restart ur pc then reinstall it again with updated everything all plugins , repository , gradle , then. Try it again , only this way fixed my errors when i start working on v2.1 , ..
[Android General] Kamy:
Great. Thanks mate. Would do and report.
[Android General] edzamber:
Solved !!!!

Many Thanks to [MENTION=5405448]thereassaad[/MENTION] for his tip [emoji6]

http://xdaforums.com/showthread.php?p=68670992

So for use command as app:packageName ToKill, app:dependentValue, or any other commands witch are working in ui_prefs.xml into all others xml prefs :

Exemple for phone_prefs.xml

I replace at the beginning of xml :

<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">

By

<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
[Android General] amtra:
i have got this during gradle built any one help me a im building RC for the first time..

4:43:11 PM Gradle sync started
4:43:31 PM Gradle sync failed: Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Consult IDE log for more details (Help | Show Log)
4:43:47 PM Error Loading Project: Cannot load 2 modules Details...
[Android General] thereassaad:
Delete all gradle golders / files from everywhere on ur pc then try to sync it again & let it got the updated by itself or u need to launch the latest gradle versions check google about this ,,
[Android General] yash92duster:
Need some help

i have build the rc and it runs fine in emulator and in phone

when sharing to git -> success

but all files are not getting synced

See this pics all the green and red marked files are not present in git

For two drawable images its marked as red and is not present in git account

and new xml prefs are marked green and not shown in git

but its showing in rc fine

when i click->> Validate for some of those red files I get This error

Error:(1, 56) schema_reference.4: Failed to read schema document 'null', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.

Error:(1, 56) s4s-elt-schema-ns: The namespace of element 'x' must be from the schema namespace, 'http://www.w3.org/2001/XMLSchema'.

Error:(5, 39) cvc-elt.1.a: Cannot find the declaration of element 'vector'.

Error:(1, 56) s4s-elt-invalid: Element 'x' is not a valid element in a schema document.

C:\Users\Yashwanth\AndroidStudioProjects\6thGear-RomControl-v2.0\app\src\main\res\drawable\ic_button.xml

C:\Users\Yashwanth\AndroidStudioProjects\6thGear-RomControl-v2.0\app\src\main\res\xml\button_prefs.xml

Error:(2, 78) cvc-elt.1.a: Cannot find the declaration of element 'PreferenceScreen'.

My github link

https://github.com/yash92duster/Wanted_Rom_Control/tree/master/app/src/main/res

Sorry if i shouldn't ask this but i cant find any proper solution

thanks in advance:)
[Android General] daxgirl:
Right click on files which are not synced > Git > add

Then commit and push changes again.

And yeah you can find proper solutions. Android studio git supports is well documented and you only needed to google. Tons of advice and answers on Google documentation and stackoverflow.
[Android General] edzamber:
Hi all,

Is there a way for RC2.1 to auto switch ? I explain : i use a mod witch show Analog clock in Lockscreen instead of stock numeric one.

If i switch off Normal clock i would like to Analog clock switch on automaticly and virse-versa.

Is it possible ?
[Android General] daxgirl:
Did you miss the reverse dependency or what's wrong with you??? ???
[Android General] edzamber:
No i do reverse dependency but it only disable second switch if first one is not enable. It not put on first and put off second off automaticly and virse-versa. So like a command :

if first switch is on then second switch is off

if first switch is off then second switch is on

Or i miss something...
[Android General] daxgirl:
Oh I see. You want cross setChecked... That needs java edits, dear.
[Android General] edzamber:
Yes it that [emoji3]

Do you think java edits can be done ?
[Android General] daxgirl:
Java edits can always be done. Question is whether you're willing to go into java for that.
[Android General] edzamber:
Hummm i don't hide you that i'am noob with java langage
[Android General] ROBERT CM:
Hi [MENTION=4714483]daxgirl[/MENTION]

I want add more themes without default themes on rom control v2

On rom control v1 more easy but on v2 is little more difficult..

You can help me with it..

Thanks!