Just wait a couple of days. You won't need this.Hi @daxgirl
using the latest Android Studio, i could not able to find this? can you give me instruction what to do here?
2. Go to the preference fragment repository and download the master as zip. Extract the zip contents into /your android adt directory/android-studio/plugins/android/lib/templates/other/
bunch of thanks!
thanks!!!Just wait a couple of days. You won't need this.
But in general in Windows studio is in ProgramFilesx86 under android
Sent from my SM-G920F using Tapatalk
Couple of days, you mean v2.0?[emoji6]Just wait a couple of days. You won't need this.
But in general in Windows studio is in ProgramFilesx86 under android
Sent from my SM-G920F using Tapatalk
Yes. Making OP now. It's going slooowwww.... much work... the code is ready.Couple of days, you mean v2.0?[emoji6]
Hey!@daxgirl,
Thanks for this tool, it's proven very useful. One question I can't seem to figure out. Is there any way to have the seekbars allow decimals? Say a scale where you can go 0.1 - 3.0? One of my values requires finer tuning. Is there any way to accomplish this out of the box with ROM Control? Or will editing be required somewhere?
<menu
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:orderInCategory="1" android:title="@string/more_options">
<menu>
<item android:icon="@drawable/ic_setting_grid_adaway" android:id="@id/adaway_id" android:title="@string/adaway" android:targetPackage="org.adaway" android:action=".intent.action.MAIN" android:targetClass="org.adaway.ui.BaseActivity" />
</menu>
</item>
</menu>
You just need to use right way the information we provided in OP. Have a look at the OpenAppPreference class.@daxgirl
i want to add menu buttons that open an app like adaway xposed something like that
this is the code but nothing happen
PHP:
could u please help me ^^
I followed the guide from @daxgirl for Rounded Notification
I cant figer out what is causing this
When change from stock shape to round shape
I lose all text and the fuction to even customize notification panel
Any one got any ideas what could be causing this?
I followed the guide from @daxgirl for Rounded Notification
I cant figer out what is causing this
When change from stock shape to round shape
I lose all text and the fuction to even customize notification panel
Any one got any ideas what could be causing this?
This is not thread topic.You got another thread![]()
This is not thread topic.
Since you brought it up, there is no such a thing as guide doesn't work. Guide is a reference for example on how to implement. It's not literal. If the example doesn't work, you need to work to adapt it. Which what a developer does. If you're not a developer, you probably should study before modding. No guide is literal.
And please do not tag me everywhere. There is no warranty on any of the guides we post. Which means we share our knowledge. With no obligation to fix/adapt them. Tagging people for help imo is rude. And coming to this thread, which is completely unrelated, and shoving this question here as well just because it's our thread is even ruder.
You have been told by asc1977 that the mod needs tweaking to work on grace ux. So start tweaking. And stop posting same question on every possible thread and tagging people.
Bottom line, it's enough that people take time to post guides. Don't come demanding fixes. Fix yourself if you need. No one owes you anything that warrants 3 threads and 3 tags on same topic. Especially over something we nothing to do with.
Great work! I am sure many will benefit from this modification! Looking forward to seeing your guide.To be Clear!!!
On your cavaliere respect for others
I never complained about about your guide I found it helpful
I don't follow you or tag you I only the subject at hand
Ive seen that you have not only been rude to me but to other members as well
lve been with XDA since 2008 and never heard of you until
now you don't own me anything and l don't expect anything from you
My self and along other appreciate the knowledge youve have
shared
But that doesn't give you and any one else the right to tell
other members where when and what to post
Again I didn't post my findings only for you or to be rude to you
I shared my fiinding to the XDA community hoping that it
would help someone else trying to do the same thing or who have had the same experience with the updated Systemul
Since I've been with XDA thats what its been about
I posted the same thing on other threads too not trying to
be rude and I didn't get rude responses
as I said before my post is only to communicate with anyone working on the new SystemUI
With your guide and modifications to the Rom Control and SystemUI l solved the problem with the new SystemUI changing from Stock to Rounded Notification
This is your thread and out of respect for you I won't post
Think you for help
1) Download and install Android Studio and android sdk for your platform. Make sure all are updated
2) Go to the preference fragment repository and download the master as zip. Extract the zip contents into /your android adt directory/android-studio/plugins/android/lib/templates/other/
3) Reopen android studio
4) File > New > Project from Version Control > Git
5) The git repository is https://github.com/daxgirl/CustomSettingsForDevs.git
you should first of all clone the v2 not v1.. much easier..where exactly should i extract the contents of the master zip template, i see a lot of folders like activities, eclipse, gradle, gradle-projects, other
in android studio, in the first page, i selected "check out project from version control->git", then entered "https://github.com/daxgirl/CustomSettingsForDevs.git" and click on Clone, I get the error "clone failed....failed to start git process"
how do i clone v1 and git has to be installed via manager?you should first of all clone the v2 not v1.. much easier..
then in any case you probably didn't installed git
Inviato dal mio SM-G930F utilizzando Tapatalk
...For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights...
<string-array name="nav_drawer_items">
<item>SystemUI Mods</item>
<item>Phone Mods</item>
<item>Framework and General</item>
[COLOR="Blue"][B]<item>Power Menu</item>[/B][/COLOR]
<item>Useful Apps</item>
<item>Set Theme</item>
</string-array>
//Creates a list of NavItem objects to retrieve elements for the Navigation Drawer list of choices
public List<NavItem> getMenu() {
List<com.wubydax.romcontrol.NavItem> items = new ArrayList<>();
/*String array of item names is located in strings.xml under name nav_drawer_items
* If you wish to add more items you need to:
* 1. Add item to nav_drawer_items array
* 2. Add a valid material design icon/image to dir drawable
* 3. Add that image ID to the integer array below (int[] mIcons
* 4. The POSITION of your new item in the string array MUST CORRESPOND to the position of your image in the integer array mIcons
* 5. Create new PreferenceFragment or your own fragment or a method that you would like to invoke when a user clicks on your new item
* 6. Continue down this file to a method onNavigationDrawerItemSelected(int position) - next method
* 7. Add an action based on position. Remember that positions in array are beginning at 0. So if your item is number 6 in array, it will have a position of 5... etc
* 8. You need to add same items to the int array in NavigationDrawerFragment, which has the same method*/
String[] mTitles = getResources().getStringArray(R.array.nav_drawer_items);
int[] mIcons =
{R.drawable.ic_ui_mods,
R.drawable.ic_phone_mods,
R.drawable.ic_general_framework,
[B][COLOR="Blue"]R.drawable.ic_reboot,[/COLOR][/B]
R.drawable.ic_apps,
R.drawable.ic_settings};
for (int i = 0; i < mTitles.length && i < mIcons.length; i++) {
com.wubydax.romcontrol.NavItem current = new com.wubydax.romcontrol.NavItem();
current.setText(mTitles[i]);
current.setDrawable(mIcons[i]);
items.add(current);
}
return items;
}
@Override
public void onNavigationDrawerItemSelected(int position) {
/* update the main content by replacing fragments
* See more detailed instructions on the thread or in annotations to the previous method*/
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;
case 3:
getFragmentManager().beginTransaction().addToBackStack(null).replace(R.id.container, new AppLinksFragment()).commitAllowingStateLoss();
break;
case 4:
showThemeChooserDialog();
break;
}
}
@Override
public void onNavigationDrawerItemSelected(int position) {
/* update the main content by replacing fragments
* See more detailed instructions on the thread or in annotations to the previous method*/
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="blue"][B]case 3:
getFragmentManager().beginTransaction().addToBackStack(null).replace(R.id.container, new PowerMenuFragment()).commitAllowingStateLoss();
break;[/B][/COLOR]
case [COLOR="blue"][B]4[/B][/COLOR]:
getFragmentManager().beginTransaction().addToBackStack(null).replace(R.id.container, new AppLinksFragment()).commitAllowingStateLoss();
break;
case [COLOR="blue"][B]5[/B][/COLOR]:
showThemeChooserDialog();
break;
}
}
<[COLOR="red"]SwitchPreference[/COLOR]
android:defaultValue="true"
android:key="[COLOR="Red"]toggle_call_recording[/COLOR]"
android:summaryOff="Call recording is disabled"
android:summaryOn="Call recording is enabled"
android:title="Enable/Disable Call Recording" />
case "SwitchPreference":
SwitchPreference s = (SwitchPreference) pf.findPreference(key);
s.setChecked(sharedPreferences.getBoolean(key, true));
break;
case "SwitchPreference":
SwitchPreference s = (SwitchPreference) pf.findPreference(key);
s.setChecked(sharedPreferences.getBoolean(key, true));
[COLOR="Blue"][B]if (key.equals("toggle_call_recording")) {
Command c = new Command(0, "pkill com.android.incallui");
try {
RootTools.getShell(true).add(c);
} catch (IOException e) {
e.printStackTrace();
} catch (TimeoutException e) {
e.printStackTrace();
} catch (RootDeniedException e) {
e.printStackTrace();
}
}[/B][/COLOR]
break;
case "SwitchPreference":
SwitchPreference s = (SwitchPreference) pf.findPreference(key);
s.setChecked(sharedPreferences.getBoolean(key, true));
[COLOR="blue"][B]if (key.equals("toggle_call_recording")) {
appRebootRequired("com.android.incallui");
}[/B][/COLOR]
break;
case "SwitchPreference":
SwitchPreference s = (SwitchPreference) pf.findPreference(key);
s.setChecked(sharedPreferences.getBoolean(key, true));
[COLOR="blue"][B] if (key.equals("toggle_call_recording")) {
appRebootRequired("com.android.incallui");
} else if (key.equals("some_other_key")) {
//do something you want
} else if (key.equals("again_some_key")) {
//do something different
}[/B][/COLOR]
break;
case "SwitchPreference":
SwitchPreference s = (SwitchPreference) pf.findPreference(key);
s.setChecked(sharedPreferences.getBoolean(key, true));
[COLOR="Blue"][B]switch (key){
case("toggle_call_recording"):
appRebootRequired("com.android.incallui");
break;
case("toggle_clock_visibility"):
appRebootRequired("com.android.systemui");
break;
case("some_other_key"):
//do something
break;
case("some_other_different_key"):
//do something different
break;
}[/B][/COLOR]
break;
<SwitchPreference
android:defaultValue="true"
android:key="clock_visibility"
android:summaryOff="Clock is hidden"
android:summaryOn="Clock is visible"
android:title="Set Clock Visibility" />
<CheckBoxPreference
android:defaultValue="false"
android:key="brightness_visibility"
android:summaryOff="Brightness slider hidden"
android:summaryOn="Brightness slider is visible"
android:title="Notification Brightness Visibility" />
<com.wubydax.romcontrol.prefs.MyListPreference
android:defaultValue="2"
android:entries="@array/clock_position_entries"
android:entryValues="@array/clock_position_values"
android:key="any_clock_position"
android:title="Status Bar Clock Position" />
<com.wubydax.romcontrol.prefs.MyEditTextPreference
android:defaultValue="simpletext"
android:key="carrier_text"
android:title="Set Custom Carrier Text" />
<com.wubydax.romcontrol.prefs.ColorPickerPreference
alphaSlider="true"
android:defaultValue="-16777215"
android:key="clock_color"
android:title="Choose Clock Color" />
<com.wubydax.romcontrol.prefs.SeekBarPreference
min="0"
unitsRight="Kb/s"
android:defaultValue="10"
android:key="network_traffic_autohide_threshold"
android:max="100"
android:title="Autohide Threshold" />
<com.wubydax.romcontrol.prefs.IntentDialogPreference
includeSearch="true"
setSeparatorString="\##"
android:key="choosen_app_gear"
android:title="Choose App" />
<com.wubydax.romcontrol.prefs.FilePreference
android:key=[COLOR="red"]"testfile"[/COLOR]
android:summaryOff="File doesn't exist"
android:summaryOn="File exists"
android:title="Test File Preference" />
[COLOR="Green"]File[/COLOR] [COLOR="Blue"]file[/COLOR] = new [COLOR="green"]File[/COLOR]("[COLOR="Purple"]/data/data/com.wubydax.romcontrol/testfile[/COLOR]");
if(file.exists){
int i = 1;
} else {
i = 0;
}
<PreferenceScreen
android:key=[COLOR="Red"]"script#test"[/COLOR]
android:summary="Click see what happens"
android:title="New Preference Screen" />
if (script.exists()) {
[COLOR="Blue"][B]boolean isChmoded = script.canExecute() ? true : false;
if (!isChmoded) {
script.setExecutable(true);
}[/B][/COLOR]
Command command = new Command(0, pathToScript) {
@Override
public void commandCompleted(int id, int exitcode) {
super.commandCompleted(id, exitcode);
if (exitcode != 0) {
Toast.makeText(c, String.valueOf(exitcode), Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(c, "Executed Successfully", Toast.LENGTH_SHORT).show();
}
}
};
try {
RootTools.getShell(true).add(command);
} catch (IOException e) {
e.printStackTrace();
} catch (TimeoutException e) {
e.printStackTrace();
} catch (RootDeniedException e) {
e.printStackTrace();
}
}
<PreferenceScreen
android:key=[COLOR="Red"]"com.wubydax.gearreboot.RebootActivity"[/COLOR]
android:summary="Opens TWSwipe app to help you choose a different swipe activity"
android:title="Reset TWSwipe Action" />
[COLOR="Red"]<PreferenceScreen
android:summary="New Preference screen"
android:title="New Preference Screen">[/COLOR] [COLOR="Green"]<-- Start of nested preference screen[/COLOR]
<PreferenceCategory android:title="new category" />
<CheckBoxPreference
android:key="text_checkbox"
android:title="Checkbox" />
<SwitchPreference
android:key="test_switch"
android:title="Switch" />
[COLOR="Red"]</PreferenceScreen>[/COLOR] [COLOR="Green"]<-- End of nested preference screen[/COLOR]
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
[COLOR="Red"] <PreferenceCategory android:title="Status Bar Mods">[/COLOR] [COLOR="Green"]<-- start of preference category[/COLOR]
<SwitchPreference
android:defaultValue="true"
android:key="clock_visibility"
android:summaryOff="Clock is hidden"
android:summaryOn="Clock is visible"
android:title="Set Clock Visibility" />
<CheckBoxPreference
android:defaultValue="false"
android:key="brightness_visibility"
android:summaryOff="Brightness slider hidden"
android:summaryOn="Brightness slider is visible"
android:title="Notification Brightness Visibility" />
<com.wubydax.romcontrol.prefs.MyListPreference
android:defaultValue="2"
android:entries="@array/clock_position_entries"
android:entryValues="@array/clock_position_values"
android:key="any_clock_position"
android:title="Status Bar Clock Position" />
<com.wubydax.romcontrol.prefs.MyEditTextPreference
android:defaultValue="simpletext"
android:key="carrier_text"
android:title="Set Custom Carrier Text"
/>
<com.wubydax.romcontrol.prefs.ColorPickerPreference
alphaSlider="true"
android:defaultValue="-16777215"
android:key="clock_color"
android:title="Choose Clock Color" />
<PreferenceScreen
android:key="script#test"
android:summary="Click see what happens"
android:title="New Preference Screen" />
<com.wubydax.romcontrol.prefs.SeekBarPreference
min="0"
unitsRight="Kb/s"
android:defaultValue="10"
android:icon="@null"
android:key="network_traffic_autohide_threshold"
android:max="100"
android:title="Autohide Threshold" />
<PreferenceScreen
android:summary="New Preference screen"
android:title="New Preference Screen">
<PreferenceCategory android:title="new category" />
<CheckBoxPreference
android:key="text_checkbox"
android:title="Checkbox" />
<SwitchPreference
android:key="test_switch"
android:title="Switch" />
</PreferenceScreen>
<com.wubydax.romcontrol.prefs.IntentDialogPreference
includeSearch="true"
setSeparatorString="\##"
android:key="choosen_app_gear"
android:title="Choose App" />
<com.wubydax.romcontrol.prefs.FilePreference
android:key="testfile"
android:summaryOff="File doesn't exist"
android:summaryOn="File exists"
android:title="Test File Preference" />
[COLOR="red"]</PreferenceCategory>[/COLOR] [COLOR="Green"]<-- end of PreferenceCategory[/COLOR]
</PreferenceScreen>
<attr name="my_logo" format="reference"/>
<item name="my_logo">@drawable/logo_dark</item>
<item name="my_logo">@drawable/logo_light</item>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:gravity="center"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<ImageView
android:layout_width="fill_parent"
android:layout_marginLeft="45dp"
android:layout_marginRight="45dp"
android:layout_height="wrap_content"
android:src="?my_logo" />
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceScreen
android:layout_width="match_parent"
android:layout_height="135dp"
android:layout="@layout/my_logo" >
</PreferenceScreen>
<PreferenceCategory
android:title="External Links" />
<PreferenceScreen
android:icon="@drawable/xda"
android:title="XDA ROM Thread"
android:summary="Click to visit the ROM thread">
<intent
android:action="android.intent.action.VIEW"
android:data="http://forum.xda-developers.com/sprint-galaxy-s5/development/rom-v5-0-mod-control-floating-windows-t3016692" />
</PreferenceScreen>
<PreferenceScreen
android:icon="@drawable/darksyde"
android:title="Team Darksyde Themes"
android:summary="By willowmaker420 and JoeyDuran ">
<intent
android:action="android.intent.action.VIEW"
android:data="http://forum.xda-developers.com/sprint-galaxy-s5/themes-apps/theme-mod-t3043481" />
</PreferenceScreen>
<PreferenceCategory
android:title="MOAR ROM Developers" />
<PreferenceScreen
android:icon="@drawable/tdunham"
android:title="tdunham"
android:summary="The mod master" >
<intent
android:icon="@drawable/tdunham"
android:action="android.intent.action.VIEW"
android:data="http://forum.xda-developers.com/member.php?u=1042140" />
</PreferenceScreen>
<PreferenceScreen
android:icon="@drawable/rompnit"
android:title="rompnit"
android:summary="What's he do?">
<intent
android:icon="@drawable/rompnit"
android:action="android.intent.action.VIEW"
android:data="http://forum.xda-developers.com/member.php?u=1167171" />
</PreferenceScreen>
</PreferenceScreen>
public void allGroups(Preference p) {
PreferenceScreen ps = (PreferenceScreen) p;
ps.setOnPreferenceClickListener(this);
[COLOR="Red"]
if(ps.getIntent()!=null){
Intent intent = ps.getIntent();
try {
Drawable iconFromIntent = c.getPackageManager().getActivityIcon(intent);
ps.setIcon(iconFromIntent);
} catch (PackageManager.NameNotFoundException e) {
Map<Preference, PreferenceScreen> preferenceParentTree = buildPreferenceParentTree();
PreferenceScreen preferenceParent = preferenceParentTree.get(ps);
preferenceParent.removePreference(ps);
}
}
/*Initiate icon view for preferences with keys that are interpreted as Intent
*For more info see OnPreferenceClick method*/
if (ps.getKey() != null) {
if (ps.getKey().contains(".")) {
int lastDot = ps.getKey().lastIndexOf(".");
String pkgName = ps.getKey().substring(0, lastDot);
try {
//if application package exists, we will set the icon successfully
Drawable icon = c.getPackageManager().getApplicationIcon(pkgName);
ps.setIcon(icon);
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
/*In case of exception, icon will not be set and we will remove the preference to avoid crashes on clicks
*To find the parent for each preference screen we use HashMap to build the parent tree*/
Map<Preference, PreferenceScreen> preferenceParentTree = buildPreferenceParentTree();
PreferenceScreen preferenceParent = preferenceParentTree.get(ps);
preferenceParent.removePreference(ps);
}
}
}[/COLOR]
for (int i = 0; i < ps.getPreferenceCount(); i++) {
Preference p1 = ps.getPreference(i);
if (p1 instanceof PreferenceScreen) {
/*As we descend further on a preference tree, if we meet another PreferenceScreen, we repeat the allGroups method.
*This method will loop untill we don't have nested screeens anymore.*/
allGroups(p1);
}
}
}
public void allGroups(Preference p) {
PreferenceScreen ps = (PreferenceScreen) p;
ps.setOnPreferenceClickListener(this);
for (int i = 0; i < ps.getPreferenceCount(); i++) {
Preference p1 = ps.getPreference(i);
if (p1 instanceof PreferenceScreen) {
/*As we descend further on a preference tree, if we meet another PreferenceScreen, we repeat the allGroups method.
*This method will loop until we don't have nested screens anymore.*/
allGroups(p1);
}
}
}