Open Incallui \ Res \ Layout \
somc_answer_fragment.xml and after:
<include layout = "@ layout / somc_incoming_sliding_tab" />
Add buttons:
<LinearLayout Android: Orientation = "Horizontal" Android: Gravity = "Bottom | Center" Android: id = "@ID / AnswerandDeclinePanel "Android: layout_width =" fill_parent "android: layout_height =" wrap_content ">
<Button Android: textappearance = "@ STYLE /TextAppearance "Android: TextSize =" 14.0dip "Android: TextColor =" # FF00FF00 "Android: id =" @ ID / AnswercallButton. "Android: background =" @Android: Drawable / Semc_BTN_DEFAULT_HOLO_DARK "Android: layout_width =" Fill_Parent "Android: layout_height =" wrap_content "Android: text =" @ string / clh_call_waiting_answer_txt "Android: Singleline =" True "Android: layout_weight =" 1.0 "/>
<Button Android: textappearance = "@ STYLE /TextAppearance "Android: TextSize =" 14.0dip "Android: TextColor =" # FFFF0000 "Android: id =" @ ID / DeclineCallButton. "Android: background =" @Android: Drawable / Semc_BTN_DEFAULT_HOLO_DARK "Android: layout_width =" fill_parent "Android: layout_height =" wrap_content "Android: text =" @ string / clh_call_waiting_reject_txt "Android: Singleline =" True "Android: layout_weight =" 1.0 "/>
</ LinearLayout>
Add three new IDs to Public (as you do it, I will not paint) and pay attention to the following:
- To add an ID to Public, you can use the HS.Lolex prompt and before Id Add +, but in this case, with the following builds of this folder (in public you will already have the necessary IDs, because Public will need to be replaced), apctuz will swear to these very id, so I advise you to prescribe them in ids.xml (if you do not understand how to see in the first instruction)
- I already have a TextAPPEARANCE style in Incallui, so check your presence and if not, then snap the buttons to any other
- Bekgandund for buttons (in this case it is the buttons yourself) is taken from the frame, if you use this entry, check that you have been in the frame (check in the Drawable folder, the XML file), but no one bothers your add
- In Strings.xml add two new rows of CLH_CALL_WAITING_ANSWER_TXT and CLH_CALL_WAITING_REJECT_TXT
Go to smali, open incallui \ smali \ com \ android \ incallui \
AnswerFragment.smali And at the beginning where the fields are transferred, add 3 new lines:
.field private mAnswerCallButton: Landroid / widget / Button;
.field private mDeclineCallButton: Landroid / widget / Button;
.field Private ManswDecllaYout: Landroid / Widget / LinearLayout;
find the method
OnCreateView. and after the line:
Invoke-Virtual {V1, P0}, LCom / Android / Incallui / SomcansWercallView; ->SETONINCOMINGCALLRSPLISTENER (LCOM / ANDROID / INCALLUI / SOMCANSWERCALLVIEW $ ONINCOMINGCALLRESPONSELISTENER;) V
We add new:
.line 8886.
const v1,0x7F0A0114. # TYPE = "ID" NAME = " answeranddeclinepanel "
invoke-virtual {v0, v1}, Landroid / view / View; ->findViewById (I) Landroid / view / View;
move-result-object v1
check-cast v1, Landroid / widget / LinearLayout;
IPut-Object V1, P0, LCom / Android / Incallui / Answerfragment; ->ManswDecllaYout: Landroid / Widget / Linearlayout;
.line 8887.
const v1,0x7F0A0115 # TYPE = "ID" NAME = " AnswercallButton. "
invoke-virtual {v0, v1}, Landroid / view / View; ->findViewById (I) Landroid / view / View;
move-result-object v1
check-cast v1, Landroid / widget / Button;
IPut-Object V1, P0, LCom / Android / Incallui / Answerfragment; ->mAnswerCallButton: Landroid / widget / Button;
.line 8888.
const v1,0x7F0A0116. # TYPE = "ID" NAME = " declinecallbutton "
invoke-virtual {v0, v1}, Landroid / view / View; ->findViewById (I) Landroid / view / View;
move-result-object v1
check-cast v1, Landroid / widget / Button;
IPut-Object V1, P0, LCom / Android / Incallui / Answerfragment; ->mDeclineCallButton: Landroid / widget / Button;
.line 8889.
Iget-Object V1, P0, LCom / Android / Incallui / Answerfragment; ->mAnswerCallButton: Landroid / widget / Button;
NEW-Instance V2, LCom / Android / Incallui / Answerfragment $ 22;
invoke-direct {v2, p0}, lcom / android / incallui / answerfragment $ 22; -><init>(LCom / Android / Incallui / Answerfragment;) V
invoke-virtual {v1, v2}, Landroid / view / View; ->setOnClickListener (Landroid / view / View $ OnClickListener;) V
Iget-Object V1, P0, LCom / Android / Incallui / Answerfragment; ->mDeclineCallButton: Landroid / widget / Button;
NEW-Instance V2, LCom / Android / Incallui / Answerfragment $ 22;
invoke-direct {v2, p0}, lcom / android / incallui / answerfragment $ 22; -><init>(LCom / Android / Incallui / Answerfragment;) V
invoke-virtual {v1, v2}, Landroid / view / View; ->setOnClickListener (Landroid / view / View $ OnClickListener;) V
The ID is signed, it is difficult to make mistakes,
You will also need to fix the ID in the file Answerfragment $ 22.smali. which is triggered in the appropriate spoiler (for KK and LP, respectively)
find the method
OndestroyView. and after:
IPut-Object V0, P0, LCom / Android / Incallui / Answerfragment; ->mAnswerCallView: Lcom / android / incallui / SomcAnswerCallView;
add two lines:
IPut-Object V0, P0, LCom / Android / Incallui / Answerfragment; ->mAnswerCallButton: Landroid / widget / Button;
IPut-Object V0, P0, LCom / Android / Incallui / Answerfragment; ->mDeclineCallButton: Landroid / widget / Button;
following method
show3rdincomingcallview After:
iget-object v0, p0, Lcom / android / incallui / AnswerFragment; ->mAnswerCallView: Lcom / android / incallui / SomcAnswerCallView;
const / 16 v1, 0x8
invoke-virtual {v0, v1}, Landroid / view / View; ->setVisibility (I) V
add:
iget-object v0, p0, Lcom / android / incallui / AnswerFragment; ->mAnswerCallButton: Landroid / widget / Button;
const / 16 v1, 0x8
invoke-virtual {v0, v1}, Landroid / view / View; ->setVisibility (I) V
iget-object v0, p0, Lcom / android / incallui / AnswerFragment; ->mDeclineCallButton: Landroid / widget / Button;
const / 16 v1, 0x8
invoke-virtual {v0, v1}, Landroid / view / View; ->setVisibility (I) V
method
ShowincomingCallView. Find in it:
iget-object v0, p0, Lcom / android / incallui / AnswerFragment; ->mAnswerCallView: Lcom / android / incallui / SomcAnswerCallView;
const / 4 v1,0x0
invoke-virtual {v0, v1}, Landroid / view / View; ->setVisibility (I) V
and change to:
iget-object v0, p0, Lcom / android / incallui / AnswerFragment; ->mAnswerCallView: Lcom / android / incallui / SomcAnswerCallView;
const / 16 v1, 0x8
invoke-virtual {v0, v1}, Landroid / view / View; ->setVisibility (I) V
And immediately after add:
iget-object v0, p0, Lcom / android / incallui / AnswerFragment; ->mAnswerCallButton: Landroid / widget / Button;
const / 4 v1,0x0
invoke-virtual {v0, v1}, Landroid / view / View; ->setVisibility (I) V
iget-object v0, p0, Lcom / android / incallui / AnswerFragment; ->mDeclineCallButton: Landroid / widget / Button;
const / 4 v1,0x0
invoke-virtual {v0, v1}, Landroid / view / View; ->setVisibility (I) V
For some reason, I have a button in the storm of the bar and did not want to go down to the slider's place, so we write immediately at the previous source:
Old option retreat
iget-object v0, p0, Lcom / android / incallui / AnswerFragment; ->ManswDecllaYout: Landroid / Widget / Linearlayout;
const / 4 v1,0x0
const / 16 v2,0x28f.
invoke-virtual {v0, v1, v2, v1, v1}, Landroid / view / View; ->setPaddingRelative (IIII) V
0x28f- indent for my Ikran, you will have to pick up empirically
and change at the beginning of the method .locals 2 on 3 New option retreat
This option itself counts the 5th part of the Ikran and the buttons raises this magnitude.
Add a new method to the end of the file:
For QK
.methodding () vayoutpadding () v
.locals 4
.prologue
invoke-virtual {p0}, Landroid / app / Fragment; ->getActivity () Landroid / app / Activity;
move-result-object v1
const-string v0, "window"
invoke-virtual {v1, v0}, Landroid / content / Context; ->getSystemService (Ljava / lang / String;) Ljava / lang / Object;
move-result-object v1
Check-Cast V1, Landroid / view / WindowManager;
.line 12
invoke-interface {v1}, Landroid / view / WindowManager; ->getDefaultDisplay () Landroid / view / Display;
move-result-object v2
.line 13
NEW-Instance V3, Landroid / Graphics / Point;
Invoke-Direct {v3}, Landroid / Graphics / Point; -><init>() V
.line 14
INVOKE-VIRTUAL {V2, V3}, Landroid / view / Display; ->GetRealSize (Landroid / Graphics / Point;) V
.line 15
IGET V1, V3, Landroid / Graphics / Point; ->y: I
Div-int / Lit8 v2, v1, 0x5
SUB-INT V3, V1, V2
iget-object v0, p0, Lcom / android / incallui / AnswerFragment; ->ManswDecllaYout: Landroid / Widget / Linearlayout;
const / 4 v1,0x0
INVOKE-VIRTUAL {V0, V1, V3, V1, V1}, Landroid / view / view; ->setPaddingRelative (IIII) V
return-void
.end method
for LP
.methodding () vayoutpadding () v
.locals 4
.prologue
Invoke-Virtual {P0}, LCom / Android / Incallui / Answerfragment; ->getActivity () Landroid / app / Activity;
move-result-object v1
const-string v0, "window"
invoke-virtual {v1, v0}, Landroid / content / Context; ->getSystemService (Ljava / lang / String;) Ljava / lang / Object;
move-result-object v1
Check-Cast V1, Landroid / view / WindowManager;
.line 12
invoke-interface {v1}, Landroid / view / WindowManager; ->getDefaultDisplay () Landroid / view / Display;
move-result-object v2
.line 13
NEW-Instance V3, Landroid / Graphics / Point;
Invoke-Direct {v3}, Landroid / Graphics / Point; -><init>() V
.line 14
INVOKE-VIRTUAL {V2, V3}, Landroid / view / Display; ->GetRealSize (Landroid / Graphics / Point;) V
.line 15
IGET V1, V3, Landroid / Graphics / Point; ->y: I
Div-int / Lit8 v2, v1, 0x5
SUB-INT V3, V1, V2
iget-object v0, p0, Lcom / android / incallui / AnswerFragment; ->ManswDecllaYout: Landroid / Widget / Linearlayout;
const / 4 v1,0x0
INVOKE-VIRTUAL {V0, V1, V3, V1, V1}, Landroid / view / view; ->setPaddingRelative (IIII) V
return-void
.end method
and call it where you need an indent
method
ShowincomingCallView. And immediately after:
iget-object v0, p0, Lcom / android / incallui / AnswerFragment; ->mAnswerCallButton: Landroid / widget / Button;
const / 4 v1,0x0
invoke-virtual {v0, v1}, Landroid / view / View; ->setVisibility (I) V
iget-object v0, p0, Lcom / android / incallui / AnswerFragment; ->mDeclineCallButton: Landroid / widget / Button;
const / 4 v1,0x0
invoke-virtual {v0, v1}, Landroid / view / View; ->setVisibility (I) V
Add a challenge:
invoke-direct {p0}, Lcom / android / incallui / AnswerFragment; ->layoutpadding () v
Also a small bonus, how to remove "reject with the message", to the same method to add strings:
iget-object v0, p0, Lcom / android / incallui / AnswerFragment; ->MSOMCrejectWithmsgView: LCom / Android / Incallui / somcrejectWithmsgView;
const / 4 v1,0x0
Invoke-Virtual {V0, V1}, LCom / Android / Incallui / somcrejectWithmsgView; ->SETREJECTMSGDRAWERVISIBILITY (Z) V
and last part, method
ShowWaitingCallView. For QK
we find
iget-object v0, p0, Lcom / android / incallui / AnswerFragment; ->mAnswerCallView: Lcom / android / incallui / SomcAnswerCallView;
invoke-virtual {v0, v2}, Landroid / view / View; ->setVisibility (I) V
and change as follows:
iget-object v0, p0, Lcom / android / incallui / AnswerFragment; ->mAnswerCallView: Lcom / android / incallui / SomcAnswerCallView;
const / 16 v1, 0x8
invoke-virtual {v0, v1}, Landroid / view / View; ->setVisibility (I) V
after add:
iget-object v0, p0, Lcom / android / incallui / AnswerFragment; ->mAnswerCallButton: Landroid / widget / Button;
invoke-virtual {v0, v2}, Landroid / view / View; ->setVisibility (I) V
iget-object v0, p0, Lcom / android / incallui / AnswerFragment; ->mDeclineCallButton: Landroid / widget / Button;
invoke-virtual {v0, v2}, Landroid / view / View; ->setVisibility (I) V
for LP
Change .locals 2 on 3
Under the first Constanta
Add second
we find
iget-object v0, p0, Lcom / android / incallui / AnswerFragment; ->mAnswerCallView: Lcom / android / incallui / SomcAnswerCallView;
invoke-virtual {v0, v1}, lcom / android / incallui / somcanswercallview; ->setVisibility (I) V
and change v1 on v2
iget-object v0, p0, Lcom / android / incallui / AnswerFragment; ->mAnswerCallView: Lcom / android / incallui / SomcAnswerCallView;
invoke-virtual {v0,v2 }, LCom / Android / Incallui / SomcanswercallView; ->setVisibility (I) V
and immediately add lower
iget-object v0, p0, Lcom / android / incallui / AnswerFragment; ->mAnswerCallButton: Landroid / widget / Button;
invoke-virtual {v0, v1}, Landroid / view / View; ->setVisibility (I) V
iget-object v0, p0, Lcom / android / incallui / AnswerFragment; ->mDeclineCallButton: Landroid / widget / Button;
invoke-virtual {v0, v1}, Landroid / view / View; ->setVisibility (I) V
If the buttons are again somewhere in place, then add a piece of code with
SetPaddingRelative. or with
layoutpadding , depending on what they did before
By tradition, files before and after:
For QK
Do.rar.(4.05 KB)
Posle.rar.(4.36 KB)
for LP
Not yet, I will add like a Sony to my device will release LP: D