yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] daxgirl:
All your folders and repositories are messed up to the point of no return. Uninstall studio, delete all repositories and sdk. Delete app folder... reinstall studio in a normal manner. Let it install sdk it needs. Clone new copy of app code from git...

Sent from my ACTUAL SM-N920C using transporter...
[Android Apps and Games] ROBERT CM:
nothing.. Apparently this is the error File path too long on Windows, keep below 240 characters... I hate it.. :crying:

Error:Error: File path too long on Windows, keep below 240 characters : C:\Program Files\Android\Android Studio\plugins\android\lib\templates\other\CustomSettingsForDevs-master\CustomSettingsForDevs\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.3.0\res\drawable-mdpi-v4\abc_btn_switch_to_on_mtrl_00012.9.png

Error:Execution failed for task ':app:mergeDebugResources'.
> C:\Program Files\Android\Android Studio\plugins\android\lib\templates\other\CustomSettingsForDevs-master\CustomSettingsForDevs\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.3.0\res\drawable-mdpi-v4\abc_btn_switch_to_on_mtrl_00012.9.png: Error: File path too long on Windows, keep below 240 characters : C:\Program Files\Android\Android Studio\plugins\android\lib\templates\other\CustomSettingsForDevs-master\CustomSettingsForDevs\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.3.0\res\drawable-mdpi-v4\abc_btn_switch_to_on_mtrl_00012.9.png
[Android Apps and Games] Wuby986:
move the studio folder from /program files/android/ to C:\\studio directly it might help..

or switch to linux :D
[Android Apps and Games] ROBERT CM:
Yes working..! Thanks you are best..

I reinstall Android Studio but change directory and No problem with default configuration in source code

En my case working from

C:\\Android\Android Studio\.......

In directly NO from Program Files

Thanks for all [MENTION=5493353]Wuby986[/MENTION] [MENTION=4714483]daxgirl[/MENTION]
[Android Apps and Games] Wuby986:
cool !!

you're welcome
[Android Apps and Games] aceqott:
Good afternoon, I want to do several things, I commented:

1.- How I can add an entry so that pressing a file is downloaded by entering the URL of the download?

2.-I want to add in the inning, right, an icon how I show below and press image to open:

3.-And one last question, this guide works correctly?: http://xdaforums.com/showpost.php?p=64265106&postcount=502
[Android Apps and Games] Wuby986:
1 - you can, create an Intent to the http, look at api's reference for it

http://developer.android.com/reference/android/preference/PreferenceFragment.html

2 - not understand the question.. what's the pourpose ?

3- yes works, in case you miss array it's one post after i guess.. any other error post it..

Will be further improved one day ?
[Android Apps and Games] aceqott:
Ok, thank you very much for responding so quickly.

2. I would like to add a small image or icon to the right like the one shown in the attached capture in the previous message, and pressing it look bigger, to display more information about what is downloaded.

Sorry for my English.
[Android Apps and Games] Wuby986:
So you mean like the profile picture of mms apk or whatsapp? When you click it popus up a bigger image?

In this case i am afraid a new custom preference is necessary. None of the stock api's preference allow this.. must be created from scratch as dax did for pretty much any prefs you see inside the app.. but that requires time unfortunately i don't have atm
[Android Apps and Games] aceqott:
Exactly, clicking larger image appears.

Do not worry, it is a secondary thing, unimportant.

Thanks again.
[Android Apps and Games] malbert16442:
Okay I have this error which I cant find through search or thread. [MENTION=4714483]daxgirl[/MENTION]

I can't open apps or links from rom control. They work because I used the same links from a rom control that works.

I have compiled source tons of times already. My last working rom control didn't have this issue. I even tried CrissCross Rom source a couple pages back. Problem could be my computer but I don't know where to start. I need advise. My java is the right folder. Any ideas?

My source is here zipped:https://drive.google.com/file/d/0BygvCxF-ULTtelMxYUIzcktlVWc/view?usp=sharing
[Android Apps and Games] daxgirl:
It's really hard to debug. Make sure you have the changes in Java mentioned earlier in one of the posts that made getting intent from screen preference possible. It could be you need to make the changes to onPreferenceClick method.

Frankly is difficult to debug outside of downloading your code and testing, which is, as you can understand, very problematic.

The sources on git don't have updated onPreferenceClick method. You need to dig back in thread to see what I mentioned needed to be changed.

I am in the middle of project wrap up these days and definitely can't go over your entire source. Maybe adding log statements to specific methods can help you. Specifically Co paring to your old source which works. Maybe use Meld or something.

I hope this puts you on a right track. Please let us know if you managed and what your findings were.

Sent from my ACTUAL SM-N920C using transporter...
[Android Apps and Games] malbert16442:
Just to let you know it was an easy fix, thanks for your help the answer was in front of me. Solved after 10mins lol
[Android Apps and Games] ROBERT CM:
Hi

I'm customizing my rom control, I will like to know where I can edit the size, color, background color, etc of the text (items) in this part of the nav drawer and toolbar

EDIT: Problem solved [emoji16]
[Android Apps and Games] intxeon:
[MENTION=4714483]daxgirl[/MENTION]

I'm trying to add shortcut for adaway using this string under app_link_prefs tab:

<PreferenceScreen

android:key="org.adaway.ui.BaseActivity"

android:summary="@string/ad"

android:title="AdAway" />

but I cannot see it in rom control. Of course adaway is properly installed
[Android Apps and Games] daxgirl:
We had a discussion about it several times... look back in a thread. Was mentioned and solved.

Sent from my ACTUAL SM-N920C using transporter...
[Android Apps and Games] Kamy:
There is discussion about it on post #148. You would also like to see post #246 to show custom icons in your preferences.
[Android Apps and Games] daxgirl:
Oh you're amazing... I was like... when I wake up I will look up the posts for him. And bam... you already did?

Sent from my ACTUAL SM-N920C using transporter...
[Android Apps and Games] Kamy:
[emoji16] This thread is precious.
[Android Apps and Games] daxgirl:
Sorry Robert! I missed your post! For some reason had no notification for it. I am glad you solved it!

Sent from my ACTUAL SM-N920C using transporter...
[Android Apps and Games] intxeon:
Problem solved.

Thanks both of you [MENTION=4714483]daxgirl[/MENTION] [MENTION=4819130]kmokhtar79[/MENTION] ;)
[Android Apps and Games] Martillero:
Hi guys, i have been very busy since a couple weeks, so thats why i didnt answer some pm's.

Some of them asking me how can we replace the font style in different layouts of awesome wuby & dax app.

Default app font can be changed for other one programatically in java, but if we want to use default font and just change some of them on xmls (separated) it wont work.

So, there's a small and nice library we can use to achieve this and is very simple to implement.

Library's name is Calligraphy, original source code by Christopher Jenkins.

It has a readme file on github:

https://github.com/chrisjenx/Calligraphy/blob/master/README.md

You can check there different ways to use this library and possible fixes and workarounds.

To use this library we are going to do the following:

Go to your app/build.gradle file and add inside dependencies the Calligraphy repository:

dependencies {
compile 'com.android.support:support-'
compile 'com.android.etcetcetc'
[COLOR="Blue"] compile 'uk.co.chrisjenx:calligraphy:2.1.0'
[/COLOR] compile files('libs/RootTools.jar')
}

(you will need to sync gradle project)

Then, we need to add the calligraphy font on our app onCreate, so we go to java/com.wubydax.romcontrol/MainViewActivity

We will add this on onCreate:

...
...
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
[COLOR="blue"] CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
.setFontAttrId(R.attr.fontPath)
.build()
);
[/COLOR] /*Calling theme selector class to set theme upon start activity*/
ThemeSelectorUtility theme = new ThemeSelectorUtility(this);
...
...

Then add this new method:

[COLOR="blue"] @Override
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(CalligraphyContextWrapper.wrap(newBase));
}
[/COLOR]

And that's it for the java part (A.Studio will ask to import the classes, blabla u know how it is, just press alt+enter).

Now, how can we use a custom font for rc.

Well we will just add this line inside the TextView we want:

- of course use your font name ;) -

<TextView
android:text="@string/hello_world"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
...
...
[COLOR="blue"]fontPath="fonts/name_of_your_font.ttf"[/COLOR]/>

Your fonts must be placed on src/main/assets/fonts/

You can use this on your textviews now.

For more ussages you can check the readme file on Source Code.

Ana, wuby, if you guys think this shouldn't be here just tell me.

Cheers.
[Android Apps and Games] asc1977:
can someone please tell me how i deactivate color choosing if switch preference is of

<PreferenceCategory android:title="Expanded view colors">
<SwitchPreference android:title="On/Off colors" android:key="link_colors" android:summaryOn="enabled" android:summaryOff="disabled" />
<com.wubydax.romcontrol.prefs.ColorPickerPreference android:title="Expanded view bg color" android:key="expanded_view_bg_color" android:summary="Choose expanded view background color" android:defaultValue="\#ffffffff" alphaSlider="true" hexValue="true" />
<com.wubydax.romcontrol.prefs.ColorPickerPreference android:title="Expanded view header icon color" android:key="expand_header_icon_color" android:summary="Choose expanded view header icon color" android:defaultValue="\#ffffffff" alphaSlider="true" hexValue="true" />
</PreferenceCategory>
[Android Apps and Games] Martillero:
Add dependency attribute like this:

android:dependency="link_colors"

On both colors pickers.
[Android Apps and Games] asc1977:
Thx
[Android Apps and Games] Er. Aditya:
thanks alot bro but as soon as i add in dependencies i get this error

D:\RomControl\app\build\intermediates\res\merged\debug\values-v23\values-v23.xml
Error:(3) [B]Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.[/B]
Error:(24) [B]Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.[/B]
Error:Execution failed for task ':app:processDebugResources'.
> [B]com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Bhuvi\AppData\Local\Android\Sdk\build-tools\21.1.2\aapt.exe'' finished with non-zero exit value 1[/B]
[Android Apps and Games] Wuby986:
it is something most likely related to styles.xml

you don't have that parent

if you guys don't want to use a separate library you can edit this way

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="android:textViewStyle">@style/RobotoTextViewStyle</item>
<item name="buttonStyle">@style/RobotoButtonStyle</item>
</style>

<style name="RobotoTextViewStyle" parent="android:Widget.TextView">
<item name="android:fontFamily">sans-serif-light</item>
</style>

<style name="RobotoButtonStyle" parent="android:Widget.Holo.Button">
<item name="android:fontFamily">sans-serif-light</item>
</style>

for example directly in style xml
[Android Apps and Games] Er. Aditya:
and put the custom font in assets/fonts/ ?
[Android Apps and Games] Wuby986:
sorry my bad.. if you want to use a custom one - for what i know, [MENTION=4714483]daxgirl[/MENTION] can correct me - you either have to set it for each textView ( a pain! ) or as i can see the lib posted by [MENTION=4830018]Martillero[/MENTION]

the method i posted uses "stock" fonts
[Android Apps and Games] Er. Aditya:
thanks bro , can u help me sort the errors i got above ?
[Android Apps and Games] Wuby986:
so.. i now got homw and added this as well to my local project.. didn't got the error so it's hard to debug it.. i think it's related to edits you might have done to style, but i am not sure.. also i don't have those values for parent items so i guess you added.. try to find and change those..

also make sure you made all edits required to add this library.

also a small note, reading the readme for the lib i see you have to set the default attr or it won't apply a font at all.. other chance is to set as defult in the onCreate as per library readme
[Android Apps and Games] Martillero:
mmm maybe [MENTION=5493353]Wuby986[/MENTION] knows more about this, but could be an old appcompat dependency (or other one)?

Im using this:

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

Im totally gussing here, but i dont have values-23/styles on my local proyect (i have it on my build folder, so its probably dependencies sync related).

Yep, wit this lib you can set the default font in onCreate with this line (for ex):

.setDefaultFontPath("fonts/Roboto-RobotoRegular.ttf")

I just remove it so it will use my device default font for the app, and i can use personalized fonts on the layouts i want.
[Android Apps and Games] Er. Aditya:
i started a new project by importing project from dev's git but i again have v23/style.xml but this folder isnt in my res folder, thats strange
[Android Apps and Games] Wuby986:
Well try now that you imported the project as new

Inviato dal mio SM-G935F utilizzando Tapatalk
[Android Apps and Games] Er. Aditya:
tried bro , same error
[Android Apps and Games] Martillero:
That folder is created when you build the app, so if you didnt it wont appear.

I think this has to be something related to your build tools (sdk). There's a couple of issues like this on stack overflow about it, and probably how to solve it:

http://stackoverflow.com/questions/...no-resource-found-that-matches-the-given-name

First try using this on dependecies instead:

compile 'uk.co.chrisjenx:calligraphy:2.1.0'

Maybe callygrapy lib (2.2.0) is forcing to use new sdk tools.
[Android Apps and Games] Wuby986:
mmmmmm really weird!

as fresh imported it shouldt..

is this the first time you import the project? i mena before was fine? it really shouldn't matter this edit.. make sure you have all the right sdk package installed. you can also try to invalidate cache and rebuild it, even tho re-importing should be fine..
[Android Apps and Games] Er. Aditya:
i have uninstalled the android studio gotta start fresh with new project and will let you know , thanks a million guys
[Android Apps and Games] Er. Aditya:
you my friend are a genius 2.1.0 did the trick no issues , just one last thing where shall i add the method

@Override

protected void attachBaseContext(Context newBase) {

super.attachBaseContext(CalligraphyContextWrapper.wrap(newBase));

}

at the end of the mainactivity ?

edit got it now :D

thanks a million ...support here is magical , just like kmokhtar says this thread is precious
[Android Apps and Games] Martillero:
Looks awesome mate, gald to help!

And i think the same, this thread is wonderful to learn, thanks so much team wubydax :highfive:
[Android Apps and Games] Er. Aditya:
bro one more thing the background is an image i am using atm , but if i change dpi the text size decreases but the image remains same , any way outs ?
[Android Apps and Games] thereassaad:
As far as i know background isn't image its in colors.xml & style.xml

See my ss i make it as blackish ui ,
[Android Apps and Games] Er. Aditya:
thanks bro :D

[MENTION=5493353]Wuby986[/MENTION] , [MENTION=4714483]daxgirl[/MENTION] how can i choose to show changelogs for my rom in rom control ?
[Android Apps and Games] Wuby986:
Well instead of adding a PreferenceFragment to the navbar you add a regular Fragment and you'll override the onCreateView inflating your desired layout which will have a TextView inside.

Inviato dal mio SM-G935F utilizzando Tapatalk
[Android Apps and Games] Martillero:
This is more a theming thing i guess, but i will tell what i did on mine.

Is a little bit long so i will hide it.

I ve created a new layout called preferences_category

Inside i use this code:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5.0dp"
android:background="@drawable/cornerbackground"
android:orientation="vertical">

<TextView
android:id="@+android:id/title"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingTop="1dp"
android:textColor="?attr/navitextcolor"
android:textAllCaps="false"
android:textSize="17sp"/>

</LinearLayout>
</LinearLayout>

The text color of my categories will be "?attr/navitextcolor", using atributes.

And the background of my categories will be this one:

android:background="@drawable/cornerbackground"

Thtat's an xml drawable, i did it like that so we can change theme's and color will change all along with them.

On drawables folder, create a new xml, i just called it cornerbackground cause i have no inspiration to use a better name and want it to be with corners :p

XML code:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="?attr/mynewColor"/>
<corners
android:bottomRightRadius="3dp"
android:bottomLeftRadius="3dp"
android:topLeftRadius="3dp"
android:topRightRadius="3dp"
/>
<stroke android:width="1.5dip" android:color="?attr/navitextcolor" />
</shape>

I have used an atribute for solid color and an atribute for stroke (the outer line), so those colors will change with the theme.

If u want to use same attr as me, do this:

go to values/attrs.xml and add:

<attr name="mynewColor" format="color"/>
<attr name="navitextcolor" format="color"/>

Styles will use those strings to theme the background.

Then go to values-21/styles.xml and add:

Inside:

<style name="AppTheme" parent="@style/Theme.AppCompat.NoActionBar">

Add:

<item name="mynewColor">@color/myPrimaryColor</item>
<item name="navitextcolor">#ffffff</item>

And in your other theme:

<style name="AppThemeLight" parent="@style/Theme.AppCompat.Light.NoActionBar">

Add:

<item name="mynewColor">@color/myPrimaryColorLight</item>
<item name="navitextcolor">#000000</item>

This can be made on all your themes, i'm using 5 themes so i had to paste those attr. thing in all 5.

And the final result is very nice, without using extra png's.

When i want to use that layout on a preference category i call it like this:

<PreferenceCategory

android:layout="@layout/preferences_category"

android:title="BLA-BLA-BLA">
[Android Apps and Games] Martillero:
That's kind of what i did, but later a find a beautiful modified library for that.

Look at this:

https://github.com/ahornerr/ckChangeLog

After adding it u can launch it from navdrawer and looks great :good:
[Android Apps and Games] Wuby986:
Well that's a DialogFragment with a custom layout - which is nice!! - but you can customize it better as per your need without a library, and creating your custom layout

Inviato dal mio SM-G935F utilizzando Tapatalk
[Android Apps and Games] Martillero:
I completly understand what u mean...i will give it a try my friend cause i want to change a few things in it :good:
[Android Apps and Games] Wuby986:
let us know how it goes [emoji2]
[Android Apps and Games] Er. Aditya:
i am currently out of thanks but i still cant thankyou guys enough you guys are a blessing to android starters

just want to know changelog shows for once when i start the app , how shall i link it to the navbar and change the color
[Android Apps and Games] Wuby986:
well i dunno about that library, but if you use a custom one, you can for sure make it open a popop only once and only when you open the app.. you'll need to deal with sharedPreference in order to write there once the popup as been displayed once to read on next app onCreate and so not show it anymore.. you'll have to make an AlertDialog for it and put if condition for the sharedPrefs.. let's say once you click ok on the popup you write into sharedPrefs that is not anymore first usage, so next time the if condition reads that is the sharedPrefs and won't show the popup
[Android Apps and Games] sieuan:
Hi mate, can you tell me where is color code of orange, white, gray color. Thanks
[Android Apps and Games] thereassaad:
Its in colors.xml & & some in style.xml ,
[Android Apps and Games] asc1977:
Hi [MENTION=535343]all[/MENTION]

Can someone please tell me what i have to do to force or to inform the user that he must a ui restart after he change a color or switch a toggle?
[Android Apps and Games] daxgirl:
We have a method for needed restart. Silent and with dialog.

Sent from my ACTUAL SM-N920C using transporter...
[Android Apps and Games] asc1977:
And how i can add it to my RC. Its additional to a colorpickerpreference entry or how it works lady [emoji6]

Please tell me
[Android Apps and Games] daxgirl:
Please refer to explanation in post 4 about special preference conditions. I think it's post 4... you can also refer to one of the source codes people keep on git to see how others achieved it.

Sent from my ACTUAL SM-N920C using transporter...
[Android Apps and Games] aceqott:
Can you make a similar guide which made [MENTION=4830018]Martillero[/MENTION] here to add the Changelog? http://bit.ly/1TcGUlB

It would be very helpful. :D
[Android Apps and Games] Wuby986:
you mean without using the library? because what martillero posted is perfect and easier, what we can archieve doing it "by hand" is the ability to use different layouts, for exampe you might want a popup or a new full page fragment and so on.

it really depends a lot on what you want the result to be, you tastes and theme used etc etc.

you can make it open on first app usage and only then or might want to create an entry in the navbar..

i think the best thing is you start to add it as you prefer and then if you encounter issues we sort out together
[Android Apps and Games] aceqott:
If you can help or raise a guide to do it "by hand", the better.

The design is secondary in my case, same appearance as the selected topic.

That is there will be a popup, it would be ideal.

And then an entry is created in the navigation bar for easy reference when needed.

Thankss:)

I hope you understand what I want. I make a great effort to translate my language and that is well understood.
[Android Apps and Games] Wuby986:
i do understand, thanks :)

okk tomorrow morning i'll take a look at it if i have time.. this evening i am gonna fix a friend's car :D lool
[Android Apps and Games] micky387:
you're rock man :good:
[Android Apps and Games] Er. Aditya:
nailed it , damn good brother

edit : bro i was getting the following error

so just in case if anyone else has this issue i added to resolve the issue ,

allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}

in build gradle , that sorted out for me but now i am facing an issue like before

the issue --> http://xdaforums.com/showpost.php?p=66725013&postcount=714

the fix --> http://xdaforums.com/showpost.php?p=66725373&postcount=717

any help ? [MENTION=5493353]Wuby986[/MENTION] [MENTION=4830018]Martillero[/MENTION]
[Android Apps and Games] aceqott:
Great [MENTION=4830018]Martillero[/MENTION]:victory::victory::victory::victory::victory:, thank you very much for your time.
[Android Apps and Games] Wuby986:
did you tried using the v23 support library? i see the reciclerview has an older one