FORUMS
Remove All Ads from XDA

XML 101 - XML Modding Made Easy!

5,876 posts
Thanks Meter: 7,212
 
By Ticklefish, Recognized Themer on 5th November 2014, 04:01 PM
Post Reply Email Thread
17th May 2017, 04:51 PM |#601  
deewfrank's Avatar
Member
Temuco - Chile
Thanks Meter: 7
 
More
Quote:
Originally Posted by Ticklefish

Okay, your signal_cluster_view.xml contains this line:

Code:
<LinearLayout android:id="@id/mobile_signal_group" android:layout_width="wrap_content" android:layout_height="wrap_content" />
This is the line that controls the display of your signal icons and data icons. There's nothing much we can do with this line but, handily, there is a layout file called mobile_signal_group.xml which is worth a look at. That looks like this:

Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/mobile_combo" android:layout_width="wrap_content" android:layout_height="wrap_content"
  xmlns:android="http://schemas.android.com/apk/res/android" xmlns:systemui="http://schemas.android.com/apk/res-auto">
    <com.android.systemui.statusbar.AnimatedImageView android:theme="@style/DualToneLightTheme" android:id="@id/mobile_signal" android:layout_width="wrap_content" android:layout_height="wrap_content" systemui:hasOverlappingRendering="false" />
    <com.android.systemui.statusbar.AnimatedImageView android:theme="@style/DualToneDarkTheme" android:id="@id/mobile_signal_dark" android:layout_width="wrap_content" android:layout_height="wrap_content" android:alpha="0.0" systemui:hasOverlappingRendering="false" />
    <ImageView android:id="@id/mobile_type" android:layout_width="wrap_content" android:layout_height="wrap_content" />
    <ImageView android:id="@id/mobile_roaming" android:paddingTop="1.5dip" android:paddingBottom="3.0dip" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="17.0dip" android:src="@drawable/stat_sys_roaming" android:scaleType="fitCenter" android:contentDescription="@string/accessibility_data_connection_roaming" android:paddingStart="22.0dip" />
</FrameLayout>
This uses a FrameLayout to display the signal icon (@id/mobile_signal and @id/mobile_signal_dark), data icon (@id/mobile_type) and roaming icon (@id/mobile_roaming). FrameLayouts display their contents on top of each other, like they're in a frame. That's why you see the data icon on top of the signal icon.

Try changing that FrameLayout to a LinearLayout and that should put the icons next to each other.

You may want to consider redrawing the icons though. These are now Android Vector Drawables which are XML files in the drawable. You can either edit the existing code in those files (complicated), replace the code with brand new code (less complicated but still takes time) or delete the XML files completely and create your own PNG files instead. These will need to be in the suitable drawable-?dpi folder and have the same filenames.

The above paragraph is simple but it does involve a bit of thought and time.

it works!!!!! thanks bro, the only thing is the data icon is showing on right side of signal, next to battery haha, any tip to move it to the r̶i̶g̶h̶t̶ left of the signal icon?
 
 
17th May 2017, 04:57 PM |#602  
Quote:
Originally Posted by deewfrank

it works!!!!! thanks bro, the only thing is the data icon is showing on right side of signal, next to battery haha, any tip to move it to the right of the signal icon?

So...the data icon is on the right side of the signal and you want to move it to the...right side of the signal?

If you want to move it to the left side of the icon, you just need to change the order of the lines inside that Layout. The line at the top will be displayed first, then the next line down and so on.
The Following User Says Thank You to Ticklefish For This Useful Post: [ View ] Gift Ticklefish Ad-Free
17th May 2017, 05:57 PM |#603  
deewfrank's Avatar
Member
Temuco - Chile
Thanks Meter: 7
 
More
Quote:
Originally Posted by Ticklefish

So...the data icon is on the right side of the signal and you want to move it to the...right side of the signal?

If you want to move it to the left side of the icon, you just need to change the order of the lines inside that Layout. The line at the top will be displayed first, then the next line down and so on.

thanks so much
finally... thanks for your help bro
The Following User Says Thank You to deewfrank For This Useful Post: [ View ] Gift deewfrank Ad-Free
18th May 2017, 03:36 AM |#604  
deewfrank's Avatar
Member
Temuco - Chile
Thanks Meter: 7
 
More
now im trying to edit this icons, but cant find any line with "signal" or something.... weird xD
you know what xml manage this icons? thanks <3
18th May 2017, 07:41 AM |#605  
Quote:
Originally Posted by deewfrank

now im trying to edit this icons, but cant find any line with "signal" or something.... weird xD
you know what xml manage this icons? thanks <3

It'll be something like "ic_gs_*.xml" in the drawable folder.

Sent from my Sony Xperia XA1 using XDA Labs
The Following User Says Thank You to Ticklefish For This Useful Post: [ View ] Gift Ticklefish Ad-Free
Post Reply Subscribe to Thread

Tags
center, clock, statusbar, tutorial, xml

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes