yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] Er. Aditya:
no sir i still have these

compile 'com.android.support:support-v4:22.1.1'

compile 'com.android.support:appcompat-v7:22.1.1'

compile 'com.android.support:recyclerview-v7:22.1.1'
[Android Apps and Games] daxgirl:
Update to latest studio and support libraries. [MENTION=5493353]Wuby986[/MENTION] and [MENTION=4830018]Martillero[/MENTION] you guys rock!!! I've been away at work and reading your posts is pure pleasure!!!
[Android Apps and Games] Martillero:
Good call, i forgot to add that :good:

Yep, as wuby and dax said, that's because of the libraries, im using the lastest (stable) so i dont have any trouble, you can try to do the same as before and use an older library on the last two added, but i recommend to update everything so you wont face this issue again with new libs, go to the sdk manager on android studio and update to v23 :good:

Well, this is all thanks to you guys, i wouldn't dare to mess with this stuff without this thread, support and guides :highfive:
[Android Apps and Games] Er. Aditya:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:23.3.0'
compile 'com.android.support:appcompat-v7:22.1.1'
compile 'com.android.support:recyclerview-v7:23.3.0'
compile 'com.github.shell-software:fab:1.1.1'
compile 'se.emilsjolander:stickylistheaders:+'
compile('com.afollestad.material-dialogs:core:0.8.5.6') {
transitive = true
}

i did but it still shows me error

Error:(33) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.

Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.

---------- Post added at 09:05 PM ---------- Previous post was at 09:02 PM ----------

i am now on latest android studio with build tools 23.0.3 bro and i am still facing this
[Android Apps and Games] Martillero:
Can u paste your build.gradle code maybe something else need to be changed.
[Android Apps and Games] Er. Aditya:
apply plugin: 'com.android.application'

android {
compileSdkVersion 21
buildToolsVersion "23.0.3"

defaultConfig {
applicationId "com.nammeless.control"
minSdkVersion 21
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:23.1.0'
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:recyclerview-v7:23.1.0'
compile 'se.emilsjolander:stickylistheaders:+'
compile('com.afollestad.material-dialogs:core:0.8.5.6') {
transitive = true
}
compile files('libs/RootTools.jar')

allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
}
[Android Apps and Games] Martillero:
ok, i use:

android {
compileSdkVersion [COLOR="blue"]23[/COLOR]

and

defaultConfig {
applicationId "com.nammeless.control"
minSdkVersion 21
targetSdkVersion [COLOR="Blue"]23[/COLOR]

I dont know if that one will do the trick, but u can try it.
[Android Apps and Games] Er. Aditya:
u are the best bro that sorted that issue

import se.emilsjolander.stickylistheaders.StickyListHeadersListView;

error

Error:(53, 42) error: package se.emilsjolander.stickylistheaders does not exist
[Android Apps and Games] Martillero:
Try to use this line on build.gradle instead:

compile 'se.emilsjolander:stickylistheaders:2.5.0'

I put the "+" symbol to use always the newest version but that can also get u some issues.

Sync and then:

Try to remove this line on top of changelog.java:

import se.emilsjolander.stickylistheaders.StickyListHeadersListView;

And add it manually (alt+intro)
[Android Apps and Games] Martillero:
ok, according to your log (check the bold parts) there's something wrong with your database, could be something related to mm security (i have read about it im not on mm).

Maybe some of the keys is causing an issue.

I think Anna or wuby could know more about what's going on.
[Android Apps and Games] asc1977:
hi i added now in java to force a ui reboot after changing a special color but i want to do it for all colors in my app. do i must add every key or is there a way for all keys like *.*

here my code
[Android Apps and Games] Martillero:
Yeah sure, but instead:

if (key.equals("toggle_buttons_background_color")) {

use something like this:

if (key.contains("_color")) {

All will depend on the name of your keys, usually when we are coloring stuff, we pick a name which ends with "_color", so maybe that works for u.
[Android Apps and Games] asc1977:
Worked. Thx. I do it now silent way. Its better to do that way as to to it manual every time after changes

Gesendet von meinem SM-G925F mit Tapatalk
[Android Apps and Games] Er. Aditya:
Before this mod everything works fine... thanks alot bro
[Android Apps and Games] Kamy:
OK since yesterday I am trying to add this in my rom control and no luck then I cloned a fresh project and attempted to add this prior to any other code and again failed. I am not sure whether there is something missing or I am not doing it well.

Here is my log

Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
Error:(33) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Kamran\AppData\Local\Android\sdk\build-tools\21.1.2\aapt.exe'' finished with non-zero exit value 1

I am on android studio 2.1.1, jdk1.8.0_92. I would appreciate if you could share your source code so that I can see how is done.
[Android Apps and Games] aceqott:
The same happens to me, the same log.:(
[Android Apps and Games] and2:
It looks like Er. Aditya had the same error in post #751 and could solve it by following the next posts (if you haven't tried it) or i'm totaly wrong :angel:
[Android Apps and Games] daxgirl:
Guys it seems like you have screwed up your sources. I would revert changes and try adding it again. I have tried the method Martillero posted and it works fine looks like you have had some kinks on the way which got tangled to a huge nod. From your logs I can't see what you all are doing wrong. Also is not the same problem. So as I said, revert your changes. Try to add again.
[Android Apps and Games] aceqott:
If companion, but when I fix the error it brings me to another and so on. Same records as the friend [MENTION=5750672]Er. Aditya[/MENTION]

That's great, thanks [MENTION=4714483]daxgirl[/MENTION], hope impatient. :victory:
[Android Apps and Games] daxgirl:
And another question... why use external library for change log? Can't we just build our own dialog or fragment for that? Seems kinda too much work for something this simple.
[Android Apps and Games] Er. Aditya:
Can u please share your build gradle ma'am
[Android Apps and Games] daxgirl:
When I am at pc I will.

But I promise you I changed nothing other than adding a dependency into app build gradle script. I didn't touch the project gradle file.

Just undo all your changes, open the link for git repository for the changelog library, follow the instructions, just add the dependency added sync gradle. It's as simple as that.
[Android Apps and Games] Er. Aditya:
anna , [MENTION=5493353]Wuby986[/MENTION] , [MENTION=4830018]Martillero[/MENTION] guys a strange thing is happening assume i add a ColorPickerPreference and define its android:defaultValue="-1" it app fc's if i remove the default value everything's fine ..never happened to me before
[Android Apps and Games] daxgirl:
Mmmmmm that is interesting.. log?
[Android Apps and Games] Er. Aditya:
Thanks anna
[Android Apps and Games] daxgirl:
You have a problem. It seems like maybe you have similar key for one of your switch preferences and color picker preference. Why do you think it's related to color pucker preference? We're you able to isolate it as only issue? The log doesn't reflect it. It just says there is a problem setting value for summary for one of the two state preferences. Which is probably switch. Which is what led me believe there might be duplicate key problem. Please tell us why you think it's this preference.

Edit: and for crying out loud start using LOGCAT the normal way and get rid of the android LOGCAT app. It's terrible! You could have printed a full stacktrace from studio in this time 1000 times ???
[Android Apps and Games] Er. Aditya:
was using logcat sorry wasnt on desktop to post the log cat , and il try again to pick my issue and sort it out :)

thanks anna for the direction
[Android Apps and Games] thereassaad:
From the app u use it , click on the icon that in circle + then u will see the saved/send click on it then its will create folder as LogcatX in ur internal sd then just u will see the text for ur logcat that u search for it , then simply copy the text & posted here or upload the text to any cloud & give the link to Anna , that's it ,,
[Android Apps and Games] Er. Aditya:
Sorted sir just a little clue did it..app is running well now
[Android Apps and Games] daxgirl:
So was I right?
[Android Apps and Games] daxgirl:
actually I meant copy paste stacktrace from android studio ?
[Android Apps and Games] thereassaad:
Nah xD , i also but what i mean its from his App LogcatX that he use it in his phone ?
[Android Apps and Games] Kamy:
Hey eventually it's here. I am enjoying to see it on my PC and reading your "precious manual".

I am a noob in this so forgive me if my question is going to sound silly or not in a correct thread as it's a dev thread but I cannot find as helpful as you Anna;

This point when you say:

My question is "how can I add the icon in studio?" I have added the fragment and string parts

<string-array name="nav_drawer_items">
<item>SystemUI Mods</item>
<item>Phone Mods</item>
<item>Framework and General</item>
<item>Useful Apps</item>
[COLOR="RoyalBlue"]<item>Power Menu</item>[/COLOR]
<item>Set Theme</item>

Man activity

int[] mIcons = {R.drawable.ic_ui_mods,
R.drawable.ic_phone_mods,
R.drawable.ic_general_framework,
R.drawable.ic_apps,
[COLOR="RoyalBlue"]R.drawable.ic_reboot,[/COLOR]
R.drawable.ic_settings};

.
.
.

setTitle(getMenu().get(position).getText());
switch (position) {
case 0:
getFragmentManager().beginTransaction().addToBackStack(null).replace(R.id.container, new UIPrefsFragment()).commitAllowingStateLoss();
break;
case 1:
getFragmentManager().beginTransaction().addToBackStack(null).replace(R.id.container, new PhonePrefsFragment()).commitAllowingStateLoss();
break;
case 2:
getFragmentManager().beginTransaction().addToBackStack(null).replace(R.id.container, new FrameworksGeneralFragment()).commitAllowingStateLoss();
break;
[COLOR="RoyalBlue"] case 3:
getFragmentManager().beginTransaction().addToBackStack(null).replace(R.id.container, new PowerMenuFragment()).commitAllowingStateLoss();
break;[/COLOR]
case 4:
getFragmentManager().beginTransaction().addToBackStack(null).replace(R.id.container, new AppLinksFragment()).commitAllowingStateLoss();
break;
case 5:
showThemeChooserDialog();
break;

power_menu_pref.xml is also there in xml folder, but then when I click on Run 'app' set theme would be switched with power menu and it also shows the gear icon as it was of set theme. I am sure I am going wrong on studio but blind to really see it.
[Android Apps and Games] daxgirl:
1. Make sure you add the R.drawable.ic_reboot also in NavigationDrawerFragment.java. it has the same method getMenu. Put it in the same position you used it in MainViewActivity. Meaning after the app links and before settings.

2. Look at your onItemSelected method. Your power menu section should be at position 4. Not 3. Because in string array and integer array you put it at position 4.

So it should be at case 4. After the app links fragment. And then Theme chooser becomes case 5.

Sent from my awesome g920f powered by 6thGear
[Android Apps and Games] daxgirl:
[MENTION=4819130]kmokhtar79[/MENTION] please let me know if you understand and manage. If not, I have no problem explaining the code in depth to make it more clear. This is what we are here for its important for us that you're able to operate this code freely. So as much explanation that's needed, we will gladly provide.

Sent from my awesome g920f powered by 6thGear
[Android Apps and Games] Kamy:
Appreciate your help. This is first time I am doing this still not a good excuse to not seeing thing but I may do some mistakes on this tool. Your support is always amazing and would do as you mentioned.
[Android Apps and Games] daxgirl:
There is no shame in being new to anything. We are here to make sure everyone feels as comfortable with source code as you feel with smali.

The way you ask your question is also very helpful. Because you mentioned all the steps you took and I could see all your code changes.

To answer your question about how to add icons.

1. Find an icon you like I have given 2 links to huge icons resources. There are many more online.

2. Copy it to your desired resolution drawable folder. You can copy paste to studio. Right click the drawable folder you want to copy to in the left oabel of project structure, and you have "paste" option.

3. Remember how in order to reference an image in smali you needed to compile and decompile in order to get public id? In source code you don't heed to. R.drawable.ic_reboot is actually your public id. It looks like words but it's actually an integer. On runtime it becomes a number. So when I say add a drawable to integer array, it means add the public id number. In java we don't use numbers for ids, we use reference integers. F.e. R.id.myText is a public id of some text view.... R.string.my_title is a public id for string. R.layout.row_item is a public id for layout and so on....

Sent from my awesome g920f powered by 6thGear
[Android Apps and Games] Kamy:
Done! You are amazing in helping :good: It's great to see that I have a gradual progress here by reading and understanding thing.
[Android Apps and Games] daxgirl:
Looks good!

I suggest adding a little padding to the beginning of the text view with rom name. It's in fragment_navigation_drawer.xml if I am not mistaken. Find the text view and add android:layour_paddingStart="5dp". See if you like it better. Maybe increase the text size a bit too.. play around with it a bit. It's not supposed to align to the navigation drawer items, but maybe it should be moved a bit from the left edge. Just an idea... it's up to you of course...
[Android Apps and Games] Kamy:
A lot to learn, and as I noticed if adding the java code in NavigationDrawerFragment, it would give a hint by showing a red test that res file needs to be added to. Done the text padding, I think it's neat now and I like it.
[Android Apps and Games] intxeon:
Hi daxgirl

With that string:

<com.wubydax.romcontrol.prefs.FilePreference android:title="@string/powersave" android:key="powersave" android:summaryOn="On" android:summaryOff="Off" />

I got this:

It works well except for SummaryOn-Off text

P.S what command should I use under shell to terminate an app? I used to use pkill -TERM -f com.android.systemui but doesn't work with your app.I just got a toast message with "1"
[Android Apps and Games] Wuby986:
For the string is quite weird, try using the "@string/on" format, so you will be asked to create the resource in strings.xml

For closing the app try simply

pkill com.android.systemui
[Android Apps and Games] daxgirl:
1. The problem with summary is weird. It could have to do with your java compiler. I have never encountered anything like that. Try some different strings for summary.

2. Please show your script that you're trying to run. When you get a toast saying 1 means the execution of your script failed and 1 is the exit code, which for Unix script mostly means failed. So there is a problem with your script.

Please show the entire step you took to run this script. Preference... script... what's inside it... name of the script... so on

The app doesn't run the shell. Your kernel does. The app only reads the exit code. So your script failed. That's why you get toast with exit number instead of "Executed successfully"

Sent from my awesome g920f powered by 6thGear
[Android Apps and Games] bawffg85:
Hello,my fridends here!

I add a line to xml to disable Google Framework

<PreferenceScreen android:title="关掉谷歌组件" android:key="script#disableGoogleFramework" android:summary="点击关掉Google组件" />

and put disableGoogleFramework.sh into RomControl\assets\scripts as this

#!/system/bin/sh

framework=/system/framework
app=/system/app
privapp="/system/priv-app"

cd $app

if [ -e ./GoogleCalendarSyncAdapter/GoogleCalendarSyncAdapter.apk ]; then
mv ./GoogleCalendarSyncAdapter/GoogleCalendarSyncAdapter.apk ./GoogleCalendarSyncAdapter/GoogleCalendarSyncAdapter.bak
fi

if [ -e ./GoogleContactsSyncAdapter/GoogleContactsSyncAdapter.apk ]; then
mv ./GoogleContactsSyncAdapter/GoogleContactsSyncAdapter.apk ./GoogleContactsSyncAdapter/GoogleContactsSyncAdapter.bak
fi

if [ -e ./Street/Street.apk ]; then
mv ./Street/Street.apk ./Street/Street.bak
fi

cd $privapp

if [ -e ./GmsCore/GmsCore.apk ]; then
mv ./GmsCore/GmsCore.apk ./GmsCore/GmsCore.bak
fi

if [ -e ./GoogleBackupTransport/GoogleBackupTransport.apk ]; then
mv ./GoogleBackupTransport/GoogleBackupTransport.apk ./GoogleBackupTransport/GoogleBackupTransport.bak
fi

if [ -e ./GoogleFeedback/GoogleFeedback.apk ]; then
mv ./GoogleFeedback/GoogleFeedback.apk ./GoogleFeedback/GoogleFeedback.bak
fi

if [ -e ./GoogleLoginService/GoogleLoginService.apk ]; then
mv ./GoogleLoginService/GoogleLoginService.apk ./GoogleLoginService/GoogleLoginService.bak
fi

if [ -e ./GoogleOneTimeInitializer/GoogleOneTimeInitializer.apk ]; then
mv ./GoogleOneTimeInitializer/GoogleOneTimeInitializer.apk ./GoogleOneTimeInitializer/GoogleOneTimeInitializer.bak
fi

if [ -e ./GooglePartnerSetup/GooglePartnerSetup.apk ]; then
mv ./GooglePartnerSetup/GooglePartnerSetup.apk ./GooglePartnerSetup/GooglePartnerSetup.bak
fi

if [ -e ./GoogleServicesFramework/GoogleServicesFramework.apk ]; then
mv ./GoogleServicesFramework/GoogleServicesFramework.apk ./GoogleServicesFramework/GoogleServicesFramework.bak
fi

if [ -e /system/etc/permissions/com.google.android.maps.xml ]; then
mv /system/etc/permissions/com.google.android.maps.xml /system/etc/permissions/com.google.android.maps
fi

#if [ -e /system/etc/permissions/features.xml ]; then
#mv /system/etc/permissions/features.xml /system/etc/permissions/features
#fi

if [ -e /system/etc/preferred-apps/google.xml ]; then
mv /system/etc/preferred-apps/google.xml /system/etc/preferred-apps/google
fi

cd $framework

if [ -e ./com.google.android.maps.jar ]; then
mv ./com.google.android.maps.jar ./com.google.android.maps.bak
fi

exit

But it doesnt work,just toasting "1" instead of "Executed Successfully".Anyone can help me out,thanks in advances！
[Android Apps and Games] Wuby986:
Mounted system before running it?
[Android Apps and Games] daxgirl:
Man do I hate it. .. ???? every script I ever wrote I had to trouble shoot only to realise I keep forgetting to mount system r/w
[Android Apps and Games] Wuby986:
Guess why it now pops me in mind at first???? [emoji23][emoji23][emoji23][emoji23]
[Android Apps and Games] bawffg85:
Thanks for quck and awesome answer!
[Android Apps and Games] daxgirl:
Just to show you what happened to your script.....

And even under su it's the same output...

Sent from my awesome g920f powered by 6thGear
[Android Apps and Games] daxgirl:
If there is a demand for it, we could add a function for you guys to remount system r/w when you open an app and remount it r/o when you exit.

Sent from my awesome g920f powered by 6thGear
[Android Apps and Games] Kamy:
It's really fun implementing those scripts in the custom settings and working very nice here. I always had problem to keep them in system folder
[Android Apps and Games] daxgirl:
Yeah. I couldn't agree more. I always feel like as roms builders we take too much freedom with user's partitions. I mean no one should have the right to my file system unless I specifically agree to it. Pushing files to system while installing rom other than required system files always gave me bad feeling.

Sent from my awesome g920f powered by 6thGear
[Android Apps and Games] Er. Aditya:
Yes m'am u always are
[Android Apps and Games] asc1977:
One question

Is there a seekbar preference for the xml in the rom control?

Edit: found it myself

Gesendet von meinem SM-G925F mit Tapatalk
[Android Apps and Games] Er. Aditya:
hey guys , this might work for those who wants to create change log part in navigation drawer

il try my best i have it working now huge thanks to great guiders here @ daxgirl [MENTION=5493353]Wuby986[/MENTION] and [MENTION=4830018]Martillero[/MENTION]

here's how mine looks

with the superb guide posted here by [MENTION=4830018]Martillero[/MENTION] http://xdaforums.com/showpost.php?p=66829407&postcount=743

follow these steps

on your protected void onCreate method add this method

ChangeLog cl = new ChangeLog(this);
if (cl.isFirstRun()) {
cl.getLogDialog().show();
}

Add this to dependencies

compile 'de.cketti.library.changelog:ckchangelog:1.2.2'

and this to respositories

mavenCentral()

i guess that should do and get your change log running.. thanks again guys :)
[Android Apps and Games] Martillero:
Great Job my friend :good:

Im glad that you sort it out, nicely done!
[Android Apps and Games] Er. Aditya:
your the inspiration bro , thnks alot :)
[Android Apps and Games] daxgirl:
Group hug ???
[Android Apps and Games] Er. Aditya:
bro how do i change fonts for the navigation drawer fonts , systemui mods, framework mods ....

fragment_navigation_drawer.xml ?

always feels good :D
[Android Apps and Games] Martillero:
On layout/drawer_row

Look on the textview and add there the fontpath (if u are using callygraphy lib of course).
[Android Apps and Games] Er. Aditya:
awesome thanks aton bro , yup i have it :D