Ask Your Mother, Ask Your Father...

trailblazer101

Senior Member
Dec 17, 2010
926
782
123
Pennsylvania
I have successfully managed to incorporate orientation changes into the Ticker Display!!! However, my part/know-how is done with... The coding for the rotation is in there, and it works great, however I need modified XML Layouts for the main Ticker display in LANDSCAPE... I wouldn't even know where to begin...
So basically, I would like it if when the phone is put into landscape, the main ticker display goes into landscape also! So, your job is here... Either you figure it out, or ask around, if you can take the main ticker display (standbymode.xml in framework-res.apk) and rotate it....

Right now, I have it set as my own custom text instead :p Pics:

I automatically made it go back to the default vertical view when you lock the phone...






Please help my dream come true! (P.S. I am really tired while writing this, so.... yeah... haha)
 
Last edited:
  • Like
Reactions: ciscogee

ciscogee

Senior Member
Aug 13, 2011
889
192
0
Wa State
awesome job as always!
Scavanger hunt time! Ill try and make some time to look into or redirect to what I find.

Questions:
1. The layout code (<Layout> etc) needed you say are ones for whatever you want to put on that screen ie shorcuts or even a ticker apk?

2. Thus needing deminisions and actions and parameters?

I need hints lol
 
Last edited:

trailblazer101

Senior Member
Dec 17, 2010
926
782
123
Pennsylvania
awesome job as always!
Scavanger hunt time! Ill try and make some time to look into or redirect to what I find.

Questions:
1. The layout code (<Layout> etc) needed you say are ones for whatever you want to put on that screen ie shorcuts or even a ticker apk?

2. Thus needing deminisions and actions and parameters?

I need hints lol
Thanks man! and haha, alright sounds good!

And the only thing that needs to be done is just rotating the Layouts, TextViews, and ImageViews of the main ticker Display, NOT the code for them! The code for them is already stored within the Services file, thanks to me, but they need to be properly defined! So basically, take this:

Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:layout_gravity="bottom" android:orientation="horizontal" android:id="@id/standbymode_default_vertical" android:background="@null" android:layout_width="fill_parent" android:layout_height="wrap_content"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <RelativeLayout android:layout_gravity="top|left|center" android:id="@id/RelativeLayout01" android:layout_width="103.0px" android:layout_height="96.0px">
        <ImageView android:layout_gravity="top" android:id="@id/WeatherIcon" android:layout_width="80.0px" android:layout_height="80.0px" android:layout_marginLeft="8.0px" android:layout_marginTop="8.0px" />
        <ImageView android:id="@id/IconSel" android:background="@drawable/weather_press" android:visibility="gone" android:layout_width="80.0px" android:layout_height="80.0px" android:layout_marginLeft="8.0px" android:layout_marginTop="8.0px" android:layout_marginBottom="8.0px" />
    </RelativeLayout>
    <LinearLayout android:orientation="vertical" android:id="@id/LinearLayout02" android:layout_width="0.0dip" android:layout_height="96.0px" android:layout_weight="1.0">
        <TextView android:textSize="@dimen/data.text.size" android:textStyle="bold" android:textColor="#ffffffff" android:layout_gravity="top|left|center" android:id="@id/TextView02" android:layout_width="wrap_content" android:layout_height="@dimen/data.layout.height" android:layout_marginTop="@dimen/data.layout.margin.top" android:layout_marginBottom="@dimen/data.layout.margin.bottom" />
        <LinearLayout android:gravity="top" android:layout_width="fill_parent" android:layout_height="fill_parent">
            <TextView android:textSize="@dimen/time.text.size" android:typeface="normal" android:textColor="@color/clockcolor" android:layout_gravity="top|left|center" android:id="@id/TextView03" android:layout_width="wrap_content" android:layout_height="@dimen/time.layout.height" android:layout_marginBottom="@dimen/time.layout.margin.bottom" />
            <TextView android:textSize="@dimen/data.text.size" android:typeface="normal" android:textColor="@color/clockcolor" android:layout_gravity="top|left|center" android:id="@id/TextView04" android:paddingLeft="5.0px" android:layout_width="wrap_content" android:layout_height="@dimen/time.layout.height" android:layout_marginBottom="@dimen/time.layout.margin.bottom" />
        </LinearLayout>
    </LinearLayout>
    <RelativeLayout android:id="@id/RelativeLayout02" android:layout_width="68.0px" android:layout_height="wrap_content">
        <ImageButton android:id="@id/HistoryButton" android:background="@null" android:focusable="true" android:layout_width="68.0px" android:layout_height="wrap_content" android:src="@drawable/tt_tickerhistory_buttonup" android:scaleType="fitXY" android:layout_alignParentRight="true" />
    </RelativeLayout>
</LinearLayout>
and make it for ONLY Landscape, so it is forced into that position! :)

Oh, and important side note for any and all developers, I cleaned up the standbymode XML, so that all of the layouts (vertical, horizontal, quick launch, sleep mode) aren't being called in the same place... Instead, they are being branched out into specific sub-XMLs... So, for the vertical view, the file where the layout is stored is now "standbymode_default_vertical." This is all just behind the scenes, nothing changes up front, but in the background it makes everything a lot neater :)
I haven't released the framework-res with this in it yet, (or the specific source) because it isn't really a big deal, but once I get the modified layout for the Horizontal (Landscape) view of the code above, i'll incorporate the cleaner format and the code into my new release :)
 
  • Like
Reactions: ciscogee

ciscogee

Senior Member
Aug 13, 2011
889
192
0
Wa State
im on it.

ticker port question:
have u discovered all the stock ticker functions files (from the platform ie smali and xmls)? i ask because im looking at i500 gb sources and i may be able to either port the ticker into the build (but platform would also have to be ported with ticker inserted etc) or if its feasible, to just mod the gb kernel with our display specs?

try this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:layout_gravity="bottom" android:orientation="horizontal" android:id="@id/standbymode_default_vertical" android:background="@null" android:layout_width="fill_parent" android:layout_height="wrap_content"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <RelativeLayout android:layout_gravity="top|left|center" android:id="@id/RelativeLayout01" android:layout_width="103.0px" android:layout_height="96.0px">
        <ImageView android:layout_gravity="top" android:id="@id/WeatherIcon" android:layout_width="80.0px" android:layout_height="80.0px" android:layout_marginLeft="8.0px" android:layout_marginTop="8.0px" />
        <ImageView android:id="@id/IconSel" android:background="@drawable/weather_press" android:visibility="gone" android:layout_width="80.0px" android:layout_height="80.0px" android:layout_marginLeft="8.0px" android:layout_marginTop="8.0px" android:layout_marginBottom="8.0px" />
    </RelativeLayout>
    <LinearLayout android:orientation="vertical" android:id="@id/LinearLayout02" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1.0">
        <TextView android:textSize="@dimen/data.text.size" android:textStyle="bold" android:textColor="#ffffffff" android:layout_gravity="top|left|center" android:id="@id/TextView02" android:layout_width="wrap_content" android:layout_height="@dimen/data.layout.height" android:layout_marginTop="@dimen/data.layout.margin.top" android:layout_marginBottom="@dimen/data.layout.margin.bottom" />
        <LinearLayout android:gravity="top" android:layout_width="match_parent" android:layout_height="match_parent">
            <TextView android:textSize="@dimen/time.text.size" android:typeface="normal" android:textColor="@color/clockcolor" android:layout_gravity="top|left|center" android:id="@id/TextView03" android:layout_width="wrap_content" android:layout_height="@dimen/time.layout.height" android:layout_marginBottom="@dimen/time.layout.margin.bottom" />
            <TextView android:textSize="@dimen/data.text.size" android:typeface="normal" android:textColor="@color/clockcolor" android:layout_gravity="top|left|center" android:id="@id/TextView04" android:paddingLeft="5.0px" android:layout_width="wrap_content" android:layout_height="@dimen/time.layout.height" android:layout_marginBottom="@dimen/time.layout.margin.bottom" />
        </LinearLayout>
    </LinearLayout>
    <RelativeLayout android:id="@id/RelativeLayout02" android:layout_width="wrap_content" android:layout_height="wrap_content">
        <ImageButton android:id="@id/HistoryButton" android:background="@null" android:focusable="true" android:layout_width="68.0px" android:layout_height="wrap_content" android:src="@drawable/tt_tickerhistory_buttonup" android:scaleType="fitXY" android:layout_alignParentRight="true" />
    </RelativeLayout>
</LinearLayout>
may need to toggle imgbutton layout_width="wrap_content" or if im way off, this is what i found on it.
 
Last edited:

trailblazer101

Senior Member
Dec 17, 2010
926
782
123
Pennsylvania
haha, thanks for the update, I didn't notice it until now :p I will try it shortly, and let you know!

EDIT: Nope, it didn't work... Thanks though; any other ideas? :) All that shows up is a non rotated weather icon, everything else is gone...
 
Last edited:

ciscogee

Senior Member
Aug 13, 2011
889
192
0
Wa State
Hmm.
So the xml posted was just for the HI screen right?
Or for every ticker screen?
Cause since its fuctions are written already(awesome job) it should only be in the layout scripts.
Ill look it over again.

Sent from my SPH-M580BST using Tapatalk 2
 

trailblazer101

Senior Member
Dec 17, 2010
926
782
123
Pennsylvania
The text posted was the original main layout for the vertical view (standbymode_default_vertical.xml) on the ticker, which will be used solely for standbymode_default_horizontal.xml...
This is what the main standbymode.xml looks like now:
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.server.ticker.TickerStandByView android:orientation="vertical" android:focusable="true" android:descendantFocusability="afterDescendants"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <LinearLayout android:layout_gravity="bottom" android:orientation="horizontal" android:id="@id/LinearLayout01" android:background="@drawable/tt_noti_bg_01" android:layout_width="480.0px" android:layout_height="96.0px">
        <include android:id="@id/standbymode_default_vertical" android:layout_width="fill_parent" layout="@layout/standbymode_default_vertical" />
        <include android:id="@id/standbymode_default_horizontal" android:visibility="gone" android:layout_width="fill_parent" layout="@layout/standbymode_default_horizontal" />
        <include android:id="@id/standbymode_quicklaunch" android:visibility="gone" android:layout_width="fill_parent" layout="@layout/standbymode_quicklaunch" />
        <include android:id="@id/standbymode_sleepmode" android:visibility="gone" android:layout_width="fill_parent" layout="@layout/standbymode_sleepmode" />
    </LinearLayout>
    <ImageView android:id="@id/cacheImageView" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" />
</com.android.server.ticker.TickerStandByView>
But you know what I just noticed??? The first line of the main standbymode.xml page includes
Code:
android:orientation="vertical"
. I'm going to test something out...
 

ciscogee

Senior Member
Aug 13, 2011
889
192
0
Wa State
The text posted was the original main layout for the vertical view (standbymode_default_vertical.xml) on the ticker, which will be used solely for standbymode_default_horizontal.xml...
This is what the main standbymode.xml looks like now:
Code:
But you know what I just noticed??? The first line of the main standbymode.xml page includes
Code:
android:orientation="vertical"
. I'm going to test something out...
Yes I see it too.. also try reversing the hieght and width

Also isn't vertical=lanscape and horizontal=portrait?
Because when in portrait the lines are horizontal ya know what I mean?

Sent from my SPH-M580BST using Tapatalk 2
 

trailblazer101

Senior Member
Dec 17, 2010
926
782
123
Pennsylvania
To be honest Jaggar345, I kinda sideburner-ed it, since I sorta got sucked up into this rotation project, haha... Is there a time frame thouegh that you would like it done by? Because I could focus my energy onto it again if you wanted it soon! :)

and yeah Ciscogee, you're right! haha.. Wasn't thinking straight there for a second :p
 

ciscogee

Senior Member
Aug 13, 2011
889
192
0
Wa State
off topic, kinda

so this is the only instance of the ticker shown as the 3rd screen,
Code:
#define FULL_SCREEN_WIDTH        479
#define MAIN_SCREEN_HEIGHT       799
#define SOFTKEYS_SCREEN_HEIGHT   96
#define TICKER_SCREEN_HEIGHT     96

#define SOFTKEYS_WIDTH           120
#define MAIN_SCREEN              1
#define SOFTKEYS_SCREEN          2
#define TICKER_SCREEN            3

#define DEFAULT_PRESSURE_UP      0
#define DEFAULT_PRESSURE_DOWN    256
my question is:
what are the fascinates dimensions if a simple,
REMOVE ticker from this module AND port dimensions
OR
just REMOVE ticker from module? (cause if removed, do i extend the max hieght and width? or does it know what to do[LOL]?)

what are your thoughts since you put so much effort into cracking the ticker? there is also an api viewer that you can see the ticker smali, cause im just thinking that since we dont have ticker sources then it would be most difficult to write the ticker into each platform if i can work out errors in 2.6.32.9 kernel we could up date the linux kernel to boot GB+.
 

Jaggar345

Senior Member
May 24, 2012
1,109
158
0
Amston
To be honest Jaggar345, I kinda sideburner-ed it, since I sorta got sucked up into this rotation project, haha... Is there a time frame thouegh that you would like it done by? Because I could focus my energy onto it again if you wanted it soon! :)

and yeah Ciscogee, you're right! haha.. Wasn't thinking straight there for a second :p
Not really a time frame but im kinda looking for something new on my phone and what I requested is what I would like, You don't need to rush with it but try not to take ages to do it.

Thanks