Snap for 9769041 from feca2d8700 to udc-release
Change-Id: Iec5a290cd44e70f42f85724f29c974b3c7458635
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
style="@style/TaskbarEdu.Button.Close"
|
||||
android:textColor="?android:attr/textColorPrimary"/>
|
||||
|
||||
<com.android.launcher3.pageindicators.PageIndicatorDots
|
||||
<com.android.launcher3.pageindicators.LauncherDotsPageIndicator
|
||||
android:id="@+id/content_page_indicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -63,6 +63,7 @@
|
||||
app:layout_constraintBottom_toBottomOf="@id/edu_start_button"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:indicatorDotColor="@color/folder_pagination_color"
|
||||
android:elevation="1dp" />
|
||||
|
||||
<Button
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"v":"5.9.0","fr":60,"ip":0,"op":180,"w":1280,"h":800,"nm":"3Second_MainWelcomeScreen_Tablet_Landscape_V02","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":3,"nm":"Null 5","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[288,540,0],"ix":2,"l":2},"a":{"a":0,"k":[50,50,0],"ix":1,"l":2},"s":{"a":0,"k":[25,25,100],"ix":6,"l":2}},"ao":0,"ip":0,"op":600,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"colorAccentPrimaryVariant","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"t":180,"s":[56]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.07,"y":0.986},"o":{"x":0.167,"y":0.167},"t":0,"s":[231.832,-1174.545,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.773,"y":0.01},"t":95,"s":[231.832,-1979,0],"to":[0,0,0],"ti":[0,0,0]},{"t":180,"s":[231.832,-1174.545,0]}],"ix":2,"l":2},"a":{"a":0,"k":[-3514.717,-358.642,0],"ix":1,"l":2},"s":{"a":0,"k":[110,110,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[75.615,-96.908],[89.338,-70.276],[111.99,-50.668],[111.764,-20.709],[122.709,7.18],[108.586,33.602],[105.316,63.383],[80.533,80.216],[63.797,105.066],[34.03,108.453],[7.663,122.679],[-20.269,111.845],[-50.226,112.189],[-69.924,89.614],[-96.61,75.997],[-103.56,46.854],[-120.861,22.395],[-113.472,-6.639],[-117.425,-36.337],[-97.389,-58.612],[-87.087,-86.745],[-58.996,-97.158],[-36.8,-117.281],[-7.086,-113.445],[21.918,-120.948],[46.446,-103.744]],"o":[[-75.615,96.909],[-89.338,70.276],[-111.99,50.668],[-111.764,20.709],[-122.709,-7.18],[-108.586,-33.602],[-105.316,-63.383],[-80.533,-80.216],[-63.797,-105.066],[-34.03,-108.453],[-7.663,-122.679],[20.269,-111.845],[50.226,-112.188],[69.924,-89.614],[96.61,-75.997],[103.56,-46.854],[120.861,-22.395],[113.472,6.64],[117.425,36.337],[97.389,58.612],[87.088,86.745],[58.995,97.158],[36.8,117.281],[7.087,113.445],[-21.918,120.948],[-46.446,103.744]],"v":[[733.209,572.105],[531.711,675.932],[383.354,847.313],[156.685,845.606],[-54.323,928.412],[-254.235,821.562],[-479.555,796.823],[-606.913,609.309],[-794.927,482.691],[-820.554,257.47],[-928.191,57.981],[-846.217,-153.353],[-848.817,-380.013],[-678.021,-529.044],[-574.99,-730.949],[-354.499,-783.537],[-169.439,-914.435],[50.234,-858.532],[274.928,-888.434],[443.46,-736.847],[656.313,-658.903],[735.094,-446.359],[887.344,-278.426],[858.327,-53.616],[915.095,165.835],[784.928,351.409]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.839215686275,0.439215686275,0.388235294118,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":10,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[-3509.952,-363.731],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Polystar 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":720,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"colorAccentPrimary","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.07],"y":[1.248]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[-56]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.719],"y":[0.172]},"t":95,"s":[-38]},{"t":180,"s":[-56]}],"ix":10},"p":{"s":true,"x":{"a":1,"k":[{"i":{"x":[0.07],"y":[1.032]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[138]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.719],"y":[0.022]},"t":95,"s":[-38]},{"t":180,"s":[138]}],"ix":3},"y":{"a":1,"k":[{"i":{"x":[0.07],"y":[1.034]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[1535]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.719],"y":[0.024]},"t":95,"s":[1338]},{"t":180,"s":[1535]}],"ix":4}},"a":{"a":0,"k":[164.438,1433.781,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[3079.125,4685.989],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.305882352941,0.309803921569,0.321568627451,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":10,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[164.438,1481.781],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":600,"st":0,"bm":0}],"markers":[]}
|
||||
{"v":"5.8.1","fr":60,"ip":0,"op":180,"w":1280,"h":800,"nm":"3Second_MainWelcomeScreen_Tablet_Landscape_V02","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":3,"nm":"Null 5","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[288,540,0],"ix":2,"l":2},"a":{"a":0,"k":[50,50,0],"ix":1,"l":2},"s":{"a":0,"k":[25,25,100],"ix":6,"l":2}},"ao":0,"ip":0,"op":600,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"F4BA9E","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"t":180,"s":[56]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.07,"y":0.986},"o":{"x":0.167,"y":0.167},"t":0,"s":[375.832,-1006.545,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.773,"y":0.01},"t":95,"s":[375.832,-1811,0],"to":[0,0,0],"ti":[0,0,0]},{"t":180,"s":[375.832,-1006.545,0]}],"ix":2,"l":2},"a":{"a":0,"k":[-3514.717,-358.642,0],"ix":1,"l":2},"s":{"a":0,"k":[110,110,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[75.615,-96.908],[89.338,-70.276],[111.99,-50.668],[111.764,-20.709],[122.709,7.18],[108.586,33.602],[105.316,63.383],[80.533,80.216],[63.797,105.066],[34.03,108.453],[7.663,122.679],[-20.269,111.845],[-50.226,112.189],[-69.924,89.614],[-96.61,75.997],[-103.56,46.854],[-120.861,22.395],[-113.472,-6.639],[-117.425,-36.337],[-97.389,-58.612],[-87.087,-86.745],[-58.996,-97.158],[-36.8,-117.281],[-7.086,-113.445],[21.918,-120.948],[46.446,-103.744]],"o":[[-75.615,96.909],[-89.338,70.276],[-111.99,50.668],[-111.764,20.709],[-122.709,-7.18],[-108.586,-33.602],[-105.316,-63.383],[-80.533,-80.216],[-63.797,-105.066],[-34.03,-108.453],[-7.663,-122.679],[20.269,-111.845],[50.226,-112.188],[69.924,-89.614],[96.61,-75.997],[103.56,-46.854],[120.861,-22.395],[113.472,6.64],[117.425,36.337],[97.389,58.612],[87.088,86.745],[58.995,97.158],[36.8,117.281],[7.087,113.445],[-21.918,120.948],[-46.446,103.744]],"v":[[733.209,572.105],[531.711,675.932],[383.354,847.313],[156.685,845.606],[-54.323,928.412],[-254.235,821.562],[-479.555,796.823],[-606.913,609.309],[-794.927,482.691],[-820.554,257.47],[-928.191,57.981],[-846.217,-153.353],[-848.817,-380.013],[-678.021,-529.044],[-574.99,-730.949],[-354.499,-783.537],[-169.439,-914.435],[50.234,-858.532],[274.928,-888.434],[443.46,-736.847],[656.313,-658.903],[735.094,-446.359],[887.344,-278.426],[858.327,-53.616],[915.095,165.835],[784.928,351.409]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.956862745098,0.729411764706,0.619607843137,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":10,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[-3509.952,-363.731],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Polystar 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":720,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"C0C9C0","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.07],"y":[1.248]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[57]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.719],"y":[0.172]},"t":95,"s":[75]},{"t":180,"s":[57]}],"ix":10},"p":{"s":true,"x":{"a":1,"k":[{"i":{"x":[0.07],"y":[1.032]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[2618]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.719],"y":[0.022]},"t":95,"s":[2442]},{"t":180,"s":[2618]}],"ix":3},"y":{"a":1,"k":[{"i":{"x":[0.07],"y":[1.034]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[891]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.719],"y":[0.024]},"t":95,"s":[694]},{"t":180,"s":[891]}],"ix":4}},"a":{"a":0,"k":[164.438,1433.781,0],"ix":1,"l":2},"s":{"a":0,"k":[120,120,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[3079.125,4685.989],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.752941176471,0.788235294118,0.752941176471,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":10,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[164.438,1481.781],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":600,"st":0,"bm":0}],"markers":[]}
|
||||
@@ -1 +1 @@
|
||||
{"v":"5.9.0","fr":60,"ip":0,"op":180,"w":800,"h":1280,"nm":"3Second_MainWelcomeScreen_Tablet_Portrait_V02","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":1,"nm":"Null 5","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[288,528,0],"ix":2,"l":2},"a":{"a":0,"k":[50,50,0],"ix":1,"l":2},"s":{"a":0,"k":[25,25,100],"ix":6,"l":2}},"ao":0,"sw":100,"sh":100,"sc":"#ffffff","ip":600,"op":600,"st":0,"bm":0,"hidden":0},{"ddd":0,"ind":2,"ty":4,"nm":".colorAccentPrimaryVariant","cl":"colorAccentPrimaryVariant","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"t":180,"s":[56]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.07,"y":0.986},"o":{"x":0.167,"y":0.167},"t":0,"s":[375.832,-1366.545,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.773,"y":0.01},"t":95,"s":[375.832,-2171,0],"to":[0,0,0],"ti":[0,0,0]},{"t":180,"s":[375.832,-1366.545,0]}],"ix":2,"l":2},"a":{"a":0,"k":[-3514.717,-358.642,0],"ix":1,"l":2},"s":{"a":0,"k":[135,135,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[75.615,-96.908],[89.338,-70.276],[111.99,-50.668],[111.764,-20.709],[122.709,7.18],[108.586,33.602],[105.316,63.383],[80.533,80.216],[63.797,105.066],[34.03,108.453],[7.663,122.679],[-20.269,111.845],[-50.226,112.189],[-69.924,89.614],[-96.61,75.997],[-103.56,46.854],[-120.861,22.395],[-113.472,-6.639],[-117.425,-36.337],[-97.389,-58.612],[-87.087,-86.745],[-58.996,-97.158],[-36.8,-117.281],[-7.086,-113.445],[21.918,-120.948],[46.446,-103.744]],"o":[[-75.615,96.909],[-89.338,70.276],[-111.99,50.668],[-111.764,20.709],[-122.709,-7.18],[-108.586,-33.602],[-105.316,-63.383],[-80.533,-80.216],[-63.797,-105.066],[-34.03,-108.453],[-7.663,-122.679],[20.269,-111.845],[50.226,-112.188],[69.924,-89.614],[96.61,-75.997],[103.56,-46.854],[120.861,-22.395],[113.472,6.64],[117.425,36.337],[97.389,58.612],[87.088,86.745],[58.995,97.158],[36.8,117.281],[7.087,113.445],[-21.918,120.948],[-46.446,103.744]],"v":[[733.209,572.105],[531.711,675.932],[383.354,847.313],[156.685,845.606],[-54.323,928.412],[-254.235,821.562],[-479.555,796.823],[-606.913,609.309],[-794.927,482.691],[-820.554,257.47],[-928.191,57.981],[-846.217,-153.353],[-848.817,-380.013],[-678.021,-529.044],[-574.99,-730.949],[-354.499,-783.537],[-169.439,-914.435],[50.234,-858.532],[274.928,-888.434],[443.46,-736.847],[656.313,-658.903],[735.094,-446.359],[887.344,-278.426],[858.327,-53.616],[915.095,165.835],[784.928,351.409]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.839215686275,0.439215686275,0.388235294118,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":10,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[-3509.952,-363.731],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Polystar 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":720,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":".colorAccentPrimary","cl":"colorAccentPrimary","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.07],"y":[1.248]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[-56]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.719],"y":[0.172]},"t":95,"s":[-38]},{"t":180,"s":[-56]}],"ix":10},"p":{"s":true,"x":{"a":1,"k":[{"i":{"x":[0.07],"y":[1.032]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[138]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.719],"y":[0.022]},"t":95,"s":[-38]},{"t":180,"s":[138]}],"ix":3},"y":{"a":1,"k":[{"i":{"x":[0.07],"y":[1.034]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[1535]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.719],"y":[0.024]},"t":95,"s":[1338]},{"t":180,"s":[1535]}],"ix":4}},"a":{"a":0,"k":[164.438,1433.781,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[3079.125,4685.989],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.305882352941,0.309803921569,0.321568627451,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":10,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[164.438,1481.781],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":600,"st":0,"bm":0}],"markers":[]}
|
||||
{"v":"5.8.1","fr":60,"ip":0,"op":180,"w":800,"h":1280,"nm":"3Second_MainWelcomeScreen_Tablet_Portrait_V02","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":3,"nm":"Null 5","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[288,528,0],"ix":2,"l":2},"a":{"a":0,"k":[50,50,0],"ix":1,"l":2},"s":{"a":0,"k":[25,25,100],"ix":6,"l":2}},"ao":0,"ip":0,"op":600,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"F4BA9E","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"t":180,"s":[56]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.07,"y":0.986},"o":{"x":0.167,"y":0.167},"t":0,"s":[999.832,-2238.545,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.773,"y":0.01},"t":95,"s":[999.832,-3043,0],"to":[0,0,0],"ti":[0,0,0]},{"t":180,"s":[999.832,-2238.545,0]}],"ix":2,"l":2},"a":{"a":0,"k":[-3514.717,-358.642,0],"ix":1,"l":2},"s":{"a":0,"k":[200,200,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[75.615,-96.908],[89.338,-70.276],[111.99,-50.668],[111.764,-20.709],[122.709,7.18],[108.586,33.602],[105.316,63.383],[80.533,80.216],[63.797,105.066],[34.03,108.453],[7.663,122.679],[-20.269,111.845],[-50.226,112.189],[-69.924,89.614],[-96.61,75.997],[-103.56,46.854],[-120.861,22.395],[-113.472,-6.639],[-117.425,-36.337],[-97.389,-58.612],[-87.087,-86.745],[-58.996,-97.158],[-36.8,-117.281],[-7.086,-113.445],[21.918,-120.948],[46.446,-103.744]],"o":[[-75.615,96.909],[-89.338,70.276],[-111.99,50.668],[-111.764,20.709],[-122.709,-7.18],[-108.586,-33.602],[-105.316,-63.383],[-80.533,-80.216],[-63.797,-105.066],[-34.03,-108.453],[-7.663,-122.679],[20.269,-111.845],[50.226,-112.188],[69.924,-89.614],[96.61,-75.997],[103.56,-46.854],[120.861,-22.395],[113.472,6.64],[117.425,36.337],[97.389,58.612],[87.088,86.745],[58.995,97.158],[36.8,117.281],[7.087,113.445],[-21.918,120.948],[-46.446,103.744]],"v":[[733.209,572.105],[531.711,675.932],[383.354,847.313],[156.685,845.606],[-54.323,928.412],[-254.235,821.562],[-479.555,796.823],[-606.913,609.309],[-794.927,482.691],[-820.554,257.47],[-928.191,57.981],[-846.217,-153.353],[-848.817,-380.013],[-678.021,-529.044],[-574.99,-730.949],[-354.499,-783.537],[-169.439,-914.435],[50.234,-858.532],[274.928,-888.434],[443.46,-736.847],[656.313,-658.903],[735.094,-446.359],[887.344,-278.426],[858.327,-53.616],[915.095,165.835],[784.928,351.409]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.956862745098,0.729411764706,0.619607843137,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":10,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[-3509.952,-363.731],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Polystar 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":720,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"C0C9C0","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.07],"y":[1.248]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[-39]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.719],"y":[0.172]},"t":95,"s":[-21]},{"t":180,"s":[-39]}],"ix":10},"p":{"s":true,"x":{"a":1,"k":[{"i":{"x":[0.07],"y":[1.032]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[1490]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.719],"y":[0.022]},"t":95,"s":[1314]},{"t":180,"s":[1490]}],"ix":3},"y":{"a":1,"k":[{"i":{"x":[0.07],"y":[1.034]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[2967]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.719],"y":[0.024]},"t":95,"s":[2770]},{"t":180,"s":[2967]}],"ix":4}},"a":{"a":0,"k":[164.438,1433.781,0],"ix":1,"l":2},"s":{"a":0,"k":[168,168,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[3079.125,4685.989],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.752941176471,0.788235294118,0.752941176471,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":10,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[164.438,1481.781],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":600,"st":0,"bm":0}],"markers":[]}
|
||||
@@ -32,7 +32,7 @@ import static com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_IM
|
||||
import static com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_RECENTS;
|
||||
import static com.android.launcher3.taskbar.TaskbarViewController.ALPHA_INDEX_KEYGUARD;
|
||||
import static com.android.launcher3.taskbar.TaskbarViewController.ALPHA_INDEX_SMALL_SCREEN;
|
||||
import static com.android.launcher3.taskbar.Utilities.appendFlag;
|
||||
import static com.android.launcher3.util.FlagDebugUtils.appendFlag;
|
||||
import static com.android.launcher3.util.MultiPropertyFactory.MULTI_PROPERTY_VALUE;
|
||||
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_A11Y_BUTTON_CLICKABLE;
|
||||
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_A11Y_BUTTON_LONG_CLICKABLE;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
package com.android.launcher3.taskbar;
|
||||
|
||||
import static com.android.launcher3.taskbar.Utilities.appendFlag;
|
||||
import static com.android.launcher3.util.FlagDebugUtils.appendFlag;
|
||||
|
||||
import androidx.annotation.IntDef;
|
||||
|
||||
|
||||
@@ -25,12 +25,12 @@ import android.util.AttributeSet;
|
||||
import com.android.launcher3.AbstractFloatingView;
|
||||
import com.android.launcher3.PagedView;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.pageindicators.PageIndicatorDots;
|
||||
import com.android.launcher3.pageindicators.LauncherDotsPageIndicator;
|
||||
import com.android.launcher3.taskbar.TaskbarEduController.TaskbarEduCallbacks;
|
||||
import com.android.launcher3.views.ActivityContext;
|
||||
|
||||
/** Horizontal carousel of tutorial screens for Taskbar Edu. */
|
||||
public class TaskbarEduPagedView extends PagedView<PageIndicatorDots> {
|
||||
public class TaskbarEduPagedView extends PagedView<LauncherDotsPageIndicator> {
|
||||
|
||||
private TaskbarEduView mTaskbarEduView;
|
||||
private TaskbarEduCallbacks mControllerCallbacks;
|
||||
|
||||
@@ -21,6 +21,7 @@ import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL;
|
||||
|
||||
import static com.android.launcher3.util.DisplayController.CHANGE_DENSITY;
|
||||
import static com.android.launcher3.util.DisplayController.CHANGE_NAVIGATION_MODE;
|
||||
import static com.android.launcher3.util.FlagDebugUtils.formatFlagChange;
|
||||
|
||||
import android.content.ComponentCallbacks;
|
||||
import android.content.Context;
|
||||
@@ -32,6 +33,7 @@ import android.net.Uri;
|
||||
import android.os.Handler;
|
||||
import android.os.SystemProperties;
|
||||
import android.provider.Settings;
|
||||
import android.util.Log;
|
||||
import android.view.Display;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -51,6 +53,7 @@ import com.android.launcher3.util.SimpleBroadcastReceiver;
|
||||
import com.android.quickstep.RecentsActivity;
|
||||
import com.android.quickstep.SystemUiProxy;
|
||||
import com.android.quickstep.TouchInteractionService;
|
||||
import com.android.systemui.shared.system.QuickStepContract;
|
||||
import com.android.systemui.unfold.UnfoldTransitionProgressProvider;
|
||||
import com.android.systemui.unfold.util.ScopedUnfoldTransitionProgressProvider;
|
||||
|
||||
@@ -60,6 +63,8 @@ import java.io.PrintWriter;
|
||||
* Class to manage taskbar lifecycle
|
||||
*/
|
||||
public class TaskbarManager {
|
||||
private static final String TAG = "TaskbarManager";
|
||||
private static final boolean DEBUG = false;
|
||||
|
||||
public static final boolean FLAG_HIDE_NAVBAR_WINDOW =
|
||||
SystemProperties.getBoolean("persist.wm.debug.hide_navbar_window", false);
|
||||
@@ -320,6 +325,10 @@ public class TaskbarManager {
|
||||
}
|
||||
|
||||
public void onSystemUiFlagsChanged(int systemUiStateFlags) {
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "SysUI flags changed: " + formatFlagChange(systemUiStateFlags,
|
||||
mSharedState.sysuiStateFlags, QuickStepContract::getSystemUiStateString));
|
||||
}
|
||||
mSharedState.sysuiStateFlags = systemUiStateFlags;
|
||||
if (mTaskbarActivityContext != null) {
|
||||
mTaskbarActivityContext.updateSysuiStateFlags(systemUiStateFlags, false /* fromInit */);
|
||||
|
||||
@@ -27,7 +27,8 @@ import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCH
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASKBAR_LONGPRESS_SHOW;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TRANSIENT_TASKBAR_HIDE;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TRANSIENT_TASKBAR_SHOW;
|
||||
import static com.android.launcher3.taskbar.Utilities.appendFlag;
|
||||
import static com.android.launcher3.util.FlagDebugUtils.appendFlag;
|
||||
import static com.android.launcher3.util.FlagDebugUtils.formatFlagChange;
|
||||
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_BOUNCER_SHOWING;
|
||||
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_SHOWING;
|
||||
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_SWITCHER_SHOWING;
|
||||
@@ -75,6 +76,8 @@ import java.util.function.IntPredicate;
|
||||
* create a cohesive animation between stashed/unstashed states.
|
||||
*/
|
||||
public class TaskbarStashController implements TaskbarControllers.LoggableTaskbarController {
|
||||
private static final String TAG = TaskbarStashController.class.getSimpleName();
|
||||
private static final boolean DEBUG = false;
|
||||
|
||||
public static final int FLAG_IN_APP = 1 << 0;
|
||||
public static final int FLAG_STASHED_IN_APP_MANUAL = 1 << 1; // long press, persisted
|
||||
@@ -1095,12 +1098,22 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
|
||||
*/
|
||||
@Nullable
|
||||
public Animator createSetStateAnimator(int flags, long duration) {
|
||||
boolean isStashed = mStashCondition.test(flags);
|
||||
|
||||
if (DEBUG) {
|
||||
String stateString = formatFlagChange(flags, mPrevFlags,
|
||||
TaskbarStashController::getStateString);
|
||||
Log.d(TAG, "createSetStateAnimator: flags: " + stateString
|
||||
+ ", duration: " + duration
|
||||
+ ", isStashed: " + isStashed
|
||||
+ ", mIsStashed: " + mIsStashed);
|
||||
}
|
||||
|
||||
int changedFlags = mPrevFlags ^ flags;
|
||||
if (mPrevFlags != flags) {
|
||||
onStateChangeApplied(changedFlags);
|
||||
mPrevFlags = flags;
|
||||
}
|
||||
boolean isStashed = mStashCondition.test(flags);
|
||||
boolean isHotseatIconOnTopWhenAligned =
|
||||
mControllers.uiController.isHotseatIconOnTopWhenAligned();
|
||||
// If an animation has started and mIsHotseatIconOnTopWhenAligned is changed, we need
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
|
||||
package com.android.launcher3.taskbar;
|
||||
|
||||
import java.util.StringJoiner;
|
||||
|
||||
/**
|
||||
* Various utilities shared amongst the Taskbar's classes.
|
||||
*/
|
||||
@@ -25,12 +23,6 @@ public final class Utilities {
|
||||
|
||||
private Utilities() {}
|
||||
|
||||
static void appendFlag(StringJoiner str, int flags, int flag, String flagName) {
|
||||
if ((flags & flag) != 0) {
|
||||
str.add(flagName);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets drag, long-click, and split selection behavior on 1P and 3P launchers with Taskbar
|
||||
*/
|
||||
|
||||
@@ -1221,11 +1221,18 @@ public class QuickstepLauncher extends Launcher {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDeviceProfileInitiated() {
|
||||
super.onDeviceProfileInitiated();
|
||||
SystemUiProxy.INSTANCE.get(this).setLauncherAppIconSize(mDeviceProfile.iconSizePx);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispatchDeviceProfileChanged() {
|
||||
super.dispatchDeviceProfileChanged();
|
||||
Trace.instantForTrack(TRACE_TAG_APP, "QuickstepLauncher#DeviceProfileChanged",
|
||||
getDeviceProfile().toSmallString());
|
||||
SystemUiProxy.INSTANCE.get(this).setLauncherAppIconSize(mDeviceProfile.iconSizePx);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1599,6 +1599,7 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
|
||||
.setContext(mContext)
|
||||
.setTaskId(runningTaskTarget.taskId)
|
||||
.setActivityInfo(taskInfo.topActivityInfo)
|
||||
.setAppIconSizePx(mDp.iconSizePx)
|
||||
.setLeash(runningTaskTarget.leash)
|
||||
.setSourceRectHint(
|
||||
runningTaskTarget.taskInfo.pictureInPictureParams.getSourceRectHint())
|
||||
|
||||
@@ -550,6 +550,19 @@ public class SystemUiProxy implements ISystemUiProxy {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the app icon size in pixel used by Launcher all apps.
|
||||
*/
|
||||
public void setLauncherAppIconSize(int iconSizePx) {
|
||||
if (mPip != null) {
|
||||
try {
|
||||
mPip.setLauncherAppIconSize(iconSizePx);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(TAG, "Failed call setLauncherAppIconSize", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Splitscreen
|
||||
//
|
||||
|
||||
@@ -94,6 +94,7 @@ public class SwipePipToHomeAnimator extends RectFSpringAnim {
|
||||
* @param taskId Task id associated with this animator, see also {@link #getTaskId()}
|
||||
* @param activityInfo {@link ActivityInfo} associated with this animator,
|
||||
* see also {@link #getComponentName()}
|
||||
* @param appIconSizePx The size in pixel for the app icon in content overlay
|
||||
* @param leash {@link SurfaceControl} this animator operates on
|
||||
* @param sourceRectHint See the definition in {@link android.app.PictureInPictureParams}
|
||||
* @param appBounds Bounds of the application, sourceRectHint is based on this bounds
|
||||
@@ -111,6 +112,7 @@ public class SwipePipToHomeAnimator extends RectFSpringAnim {
|
||||
private SwipePipToHomeAnimator(@NonNull Context context,
|
||||
int taskId,
|
||||
@NonNull ActivityInfo activityInfo,
|
||||
int appIconSizePx,
|
||||
@NonNull SurfaceControl leash,
|
||||
@Nullable Rect sourceRectHint,
|
||||
@NonNull Rect appBounds,
|
||||
@@ -153,7 +155,8 @@ public class SwipePipToHomeAnimator extends RectFSpringAnim {
|
||||
if (SystemProperties.getBoolean(
|
||||
"persist.wm.debug.enable_pip_app_icon_overlay", true)) {
|
||||
mPipContentOverlay = new PipContentOverlay.PipAppIconOverlay(view.getContext(),
|
||||
mAppBounds, () -> new IconProvider(context).getIcon(mActivityInfo));
|
||||
mAppBounds, new IconProvider(context).getIcon(mActivityInfo),
|
||||
appIconSizePx);
|
||||
} else {
|
||||
mPipContentOverlay = new PipContentOverlay.PipColorOverlay(view.getContext());
|
||||
}
|
||||
@@ -317,6 +320,7 @@ public class SwipePipToHomeAnimator extends RectFSpringAnim {
|
||||
private Context mContext;
|
||||
private int mTaskId;
|
||||
private ActivityInfo mActivityInfo;
|
||||
private int mAppIconSizePx;
|
||||
private SurfaceControl mLeash;
|
||||
private Rect mSourceRectHint;
|
||||
private Rect mDisplayCutoutInsets;
|
||||
@@ -345,6 +349,11 @@ public class SwipePipToHomeAnimator extends RectFSpringAnim {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setAppIconSizePx(int appIconSizePx) {
|
||||
mAppIconSizePx = appIconSizePx;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setLeash(SurfaceControl leash) {
|
||||
mLeash = leash;
|
||||
return this;
|
||||
@@ -425,8 +434,8 @@ public class SwipePipToHomeAnimator extends RectFSpringAnim {
|
||||
mAppBounds.inset(mDisplayCutoutInsets);
|
||||
}
|
||||
}
|
||||
return new SwipePipToHomeAnimator(mContext, mTaskId, mActivityInfo, mLeash,
|
||||
mSourceRectHint, mAppBounds,
|
||||
return new SwipePipToHomeAnimator(mContext, mTaskId, mActivityInfo, mAppIconSizePx,
|
||||
mLeash, mSourceRectHint, mAppBounds,
|
||||
mHomeToWindowPositionMap, mStartBounds, mDestinationBounds,
|
||||
mFromRotation, mDestinationBoundsTransformed,
|
||||
mCornerRadius, mShadowRadius, mAttachedView);
|
||||
|
||||
@@ -2616,7 +2616,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
}
|
||||
|
||||
private boolean hasDesktopTask(Task[] runningTasks) {
|
||||
if (!DESKTOP_MODE_SUPPORTED) {
|
||||
if (!DesktopTaskView.DESKTOP_IS_PROTO2_ENABLED) {
|
||||
return false;
|
||||
}
|
||||
for (Task task : runningTasks) {
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="?attr/folderPaginationColor"/>
|
||||
<size android:width="@dimen/page_indicator_size" android:height="@dimen/page_indicator_size"/>
|
||||
</shape>
|
||||
@@ -14,9 +14,13 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<com.android.launcher3.pageindicators.PageIndicatorDots xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.android.launcher3.pageindicators.LauncherDotsPageIndicator
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:launcher="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/page_indicator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/workspace_page_indicator_height"
|
||||
android:layout_gravity="bottom | center_horizontal"
|
||||
android:theme="@style/HomeScreenElementTheme" />
|
||||
android:theme="@style/HomeScreenElementTheme"
|
||||
launcher:indicatorDotColor="?attr/workspaceTextColor"
|
||||
/>
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/system_shortcut_icons"
|
||||
android:id="@+id/system_shortcuts_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/system_shortcut_header_height"
|
||||
android:orientation="horizontal"
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/system_shortcut_icons"
|
||||
android:id="@+id/system_shortcuts_container"
|
||||
android:tag="@string/popup_container_iterate_children"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/system_shortcut_header_height"
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/system_shortcuts_container"
|
||||
android:background="@drawable/popup_background_material_u"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:tag="@string/popup_container_iterate_children"
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2023 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/system_shortcuts_container"
|
||||
android:background="@drawable/popup_background_material_u"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:tag="@string/popup_container_iterate_children"
|
||||
android:elevation="@dimen/deep_shortcuts_elevation"
|
||||
android:orientation="vertical"/>
|
||||
@@ -53,12 +53,13 @@
|
||||
android:textColorHighlight="?android:attr/colorControlHighlight"
|
||||
android:textColorHint="?attr/folderHintColor"/>
|
||||
|
||||
<com.android.launcher3.pageindicators.PageIndicatorDots
|
||||
<com.android.launcher3.pageindicators.LauncherDotsPageIndicator
|
||||
android:id="@+id/folder_page_indicator"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:elevation="1dp"
|
||||
launcher:indicatorDotColor="@color/folder_pagination_color"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -26,4 +26,6 @@
|
||||
<color name="home_settings_track_off_color">@android:color/system_neutral1_700</color>
|
||||
|
||||
<color name="all_apps_button_color">@android:color/system_neutral2_200</color>
|
||||
|
||||
<color name="folder_pagination_color">@android:color/system_accent2_100</color>
|
||||
</resources>
|
||||
@@ -18,4 +18,6 @@
|
||||
|
||||
<resources>
|
||||
<color name="all_apps_button_color">#BFC8CC</color>
|
||||
<color name="folder_pagination_color">#ffbfebe3</color>
|
||||
|
||||
</resources>
|
||||
@@ -41,8 +41,7 @@
|
||||
<color name="wallpaper_popup_scrim">@android:color/system_neutral1_900</color>
|
||||
|
||||
<color name="folder_dot_color">@android:color/system_accent3_100</color>
|
||||
<color name="folder_pagination_color_light">@android:color/system_accent1_600</color>
|
||||
<color name="folder_pagination_color_dark">@android:color/system_accent2_100</color>
|
||||
<color name="folder_pagination_color">@android:color/system_accent1_600</color>
|
||||
|
||||
<color name="home_settings_header_accent">@android:color/system_accent1_600</color>
|
||||
<color name="home_settings_header_collapsed">@android:color/system_neutral1_100</color>
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
<attr name="popupNotificationDotColor" format="color" />
|
||||
|
||||
<attr name="folderDotColor" format="color" />
|
||||
<attr name="folderPaginationColor" format="color" />
|
||||
<attr name="folderPreviewColor" format="color" />
|
||||
<attr name="folderBackgroundColor" format="color" />
|
||||
<attr name="folderIconRadius" format="float" />
|
||||
@@ -482,4 +481,10 @@
|
||||
<!-- The icon drawable of a widget category. -->
|
||||
<attr name="sectionDrawable" format="reference" />
|
||||
</declare-styleable>
|
||||
|
||||
<!-- Attributes for PagedIndicator -->
|
||||
<declare-styleable name="PagedIndicator">
|
||||
<!-- Color used to draw dots -->
|
||||
<attr name="indicatorDotColor" format="color" />
|
||||
</declare-styleable>
|
||||
</resources>
|
||||
|
||||
@@ -67,8 +67,7 @@
|
||||
<color name="folder_preview_dark">#464746</color>
|
||||
|
||||
<color name="folder_dot_color">?attr/colorPrimary</color>
|
||||
<color name="folder_pagination_color_light">#ff006c5f</color>
|
||||
<color name="folder_pagination_color_dark">#ffbfebe3</color>
|
||||
<color name="folder_pagination_color">#ff006c5f</color>
|
||||
|
||||
<color name="text_color_primary_dark">#FFFFFFFF</color>
|
||||
<color name="text_color_secondary_dark">#FFFFFFFF</color>
|
||||
|
||||
@@ -50,7 +50,6 @@
|
||||
<item name="workspaceStatusBarScrim">@drawable/workspace_bg</item>
|
||||
<item name="widgetsTheme">@style/WidgetContainerTheme</item>
|
||||
<item name="folderDotColor">@color/folder_dot_color</item>
|
||||
<item name="folderPaginationColor">@color/folder_pagination_color_light</item>
|
||||
<item name="folderPreviewColor">@color/folder_preview_light</item>
|
||||
<item name="folderBackgroundColor">@color/folder_background_light</item>
|
||||
<item name="folderIconBorderColor">?android:attr/colorPrimary</item>
|
||||
@@ -104,7 +103,6 @@
|
||||
<item name="popupShadeThird">@color/popup_shade_third_dark</item>
|
||||
<item name="widgetsTheme">@style/WidgetContainerTheme.Dark</item>
|
||||
<item name="folderDotColor">@color/folder_dot_color</item>
|
||||
<item name="folderPaginationColor">@color/folder_pagination_color_dark</item>
|
||||
<item name="folderPreviewColor">@color/folder_preview_dark</item>
|
||||
<item name="folderBackgroundColor">@color/folder_background_dark</item>
|
||||
<item name="folderIconBorderColor">?android:attr/colorPrimary</item>
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
package com.android.launcher3;
|
||||
|
||||
import static com.android.launcher3.util.FlagDebugUtils.appendFlag;
|
||||
import static com.android.launcher3.util.FlagDebugUtils.formatFlagChange;
|
||||
import static com.android.launcher3.util.SystemUiController.UI_STATE_FULLSCREEN_TASK;
|
||||
|
||||
import static java.lang.annotation.RetentionPolicy.SOURCE;
|
||||
@@ -26,6 +28,7 @@ import android.content.ContextWrapper;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.window.OnBackInvokedDispatcher;
|
||||
|
||||
import androidx.annotation.IntDef;
|
||||
@@ -43,6 +46,7 @@ import java.io.PrintWriter;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.StringJoiner;
|
||||
|
||||
/**
|
||||
* Launcher BaseActivity
|
||||
@@ -50,6 +54,7 @@ import java.util.List;
|
||||
public abstract class BaseActivity extends Activity implements ActivityContext {
|
||||
|
||||
private static final String TAG = "BaseActivity";
|
||||
static final boolean DEBUG = false;
|
||||
|
||||
public static final int INVISIBLE_BY_STATE_HANDLER = 1 << 0;
|
||||
public static final int INVISIBLE_BY_APP_TRANSITIONS = 1 << 1;
|
||||
@@ -72,7 +77,8 @@ public abstract class BaseActivity extends Activity implements ActivityContext {
|
||||
flag = true,
|
||||
value = {INVISIBLE_BY_STATE_HANDLER, INVISIBLE_BY_APP_TRANSITIONS,
|
||||
INVISIBLE_BY_PENDING_FLAGS, PENDING_INVISIBLE_BY_WALLPAPER_ANIMATION})
|
||||
public @interface InvisibilityFlags{}
|
||||
public @interface InvisibilityFlags {
|
||||
}
|
||||
|
||||
private final ArrayList<OnDeviceProfileChangeListener> mDPChangeListeners = new ArrayList<>();
|
||||
private final ArrayList<MultiWindowModeChangedListener> mMultiWindowModeChangedListeners =
|
||||
@@ -97,6 +103,7 @@ public abstract class BaseActivity extends Activity implements ActivityContext {
|
||||
/**
|
||||
* State flag indicating if the user is active or the activity when to background as a result
|
||||
* of user action.
|
||||
*
|
||||
* @see #isUserActive()
|
||||
*/
|
||||
public static final int ACTIVITY_STATE_USER_ACTIVE = 1 << 4;
|
||||
@@ -120,14 +127,28 @@ public abstract class BaseActivity extends Activity implements ActivityContext {
|
||||
ACTIVITY_STATE_WINDOW_FOCUSED,
|
||||
ACTIVITY_STATE_USER_ACTIVE,
|
||||
ACTIVITY_STATE_TRANSITION_ACTIVE})
|
||||
public @interface ActivityFlags{}
|
||||
public @interface ActivityFlags {
|
||||
}
|
||||
|
||||
/** Returns a human-readable string for the specified {@link ActivityFlags}. */
|
||||
public static String getActivityStateString(@ActivityFlags int flags) {
|
||||
StringJoiner result = new StringJoiner("|");
|
||||
appendFlag(result, flags, ACTIVITY_STATE_STARTED, "state_started");
|
||||
appendFlag(result, flags, ACTIVITY_STATE_RESUMED, "state_resumed");
|
||||
appendFlag(result, flags, ACTIVITY_STATE_DEFERRED_RESUMED, "state_deferred_resumed");
|
||||
appendFlag(result, flags, ACTIVITY_STATE_WINDOW_FOCUSED, "state_window_focused");
|
||||
appendFlag(result, flags, ACTIVITY_STATE_USER_ACTIVE, "state_user_active");
|
||||
appendFlag(result, flags, ACTIVITY_STATE_TRANSITION_ACTIVE, "state_transition_active");
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
@ActivityFlags
|
||||
private int mActivityFlags;
|
||||
|
||||
// When the recents animation is running, the visibility of the Launcher is managed by the
|
||||
// animation
|
||||
@InvisibilityFlags private int mForceInvisible;
|
||||
@InvisibilityFlags
|
||||
private int mForceInvisible;
|
||||
|
||||
private final ViewCache mViewCache = new ViewCache();
|
||||
|
||||
@@ -284,17 +305,29 @@ public abstract class BaseActivity extends Activity implements ActivityContext {
|
||||
return mActivityFlags;
|
||||
}
|
||||
|
||||
protected void addActivityFlags(int flags) {
|
||||
mActivityFlags |= flags;
|
||||
onActivityFlagsChanged(flags);
|
||||
protected void addActivityFlags(int toAdd) {
|
||||
final int oldFlags = mActivityFlags;
|
||||
mActivityFlags |= toAdd;
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "Launcher flags updated: " + formatFlagChange(mActivityFlags, oldFlags,
|
||||
BaseActivity::getActivityStateString));
|
||||
}
|
||||
onActivityFlagsChanged(toAdd);
|
||||
}
|
||||
|
||||
protected void removeActivityFlags(int flags) {
|
||||
mActivityFlags &= ~flags;
|
||||
onActivityFlagsChanged(flags);
|
||||
protected void removeActivityFlags(int toRemove) {
|
||||
final int oldFlags = mActivityFlags;
|
||||
mActivityFlags &= ~toRemove;
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "Launcher flags updated: " + formatFlagChange(mActivityFlags, oldFlags,
|
||||
BaseActivity::getActivityStateString));
|
||||
}
|
||||
|
||||
onActivityFlagsChanged(toRemove);
|
||||
}
|
||||
|
||||
protected void onActivityFlagsChanged(int changeBits) { }
|
||||
protected void onActivityFlagsChanged(int changeBits) {
|
||||
}
|
||||
|
||||
public void addMultiWindowModeChangedListener(MultiWindowModeChangedListener listener) {
|
||||
mMultiWindowModeChangedListeners.add(listener);
|
||||
@@ -307,6 +340,7 @@ public abstract class BaseActivity extends Activity implements ActivityContext {
|
||||
/**
|
||||
* Used to set the override visibility state, used only to handle the transition home with the
|
||||
* recents animation.
|
||||
*
|
||||
* @see QuickstepTransitionManager#createWallpaperOpenRunner
|
||||
*/
|
||||
public void addForceInvisibleFlag(@InvisibilityFlags int flag) {
|
||||
@@ -337,7 +371,7 @@ public abstract class BaseActivity extends Activity implements ActivityContext {
|
||||
+ getDeviceProfile().isVerticalBarLayout());
|
||||
writer.println(prefix + "orientation=" + getResources().getConfiguration().orientation);
|
||||
writer.println(prefix + "mSystemUiController: " + mSystemUiController);
|
||||
writer.println(prefix + "mActivityFlags: " + mActivityFlags);
|
||||
writer.println(prefix + "mActivityFlags: " + getActivityStateString(mActivityFlags));
|
||||
writer.println(prefix + "mForceInvisible: " + mForceInvisible);
|
||||
}
|
||||
|
||||
|
||||
@@ -219,6 +219,8 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
|
||||
setCompoundDrawablePadding(grid.folderChildDrawablePaddingPx);
|
||||
defaultIconSize = grid.folderChildIconSizePx;
|
||||
} else if (mDisplay == DISPLAY_SEARCH_RESULT) {
|
||||
setTextSize(TypedValue.COMPLEX_UNIT_PX, grid.allAppsIconTextSizePx);
|
||||
setCompoundDrawablePadding(grid.allAppsIconDrawablePaddingPx);
|
||||
defaultIconSize = getResources().getDimensionPixelSize(R.dimen.search_row_icon_size);
|
||||
} else if (mDisplay == DISPLAY_SEARCH_RESULT_SMALL) {
|
||||
defaultIconSize = getResources().getDimensionPixelSize(
|
||||
|
||||
@@ -85,7 +85,6 @@ import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Configuration;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.RectF;
|
||||
import android.os.Build;
|
||||
@@ -1353,10 +1352,6 @@ public class Launcher extends StatefulActivity<LauncherState>
|
||||
|
||||
if (SHOW_DOT_PAGINATION.get()) {
|
||||
mWorkspace.getPageIndicator().setShouldAutoHide(true);
|
||||
mWorkspace.getPageIndicator().setPaintColor(
|
||||
Themes.getAttrBoolean(this, R.attr.isWorkspaceDarkText)
|
||||
? Color.BLACK
|
||||
: Color.WHITE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -153,8 +153,8 @@ public class WorkspaceStateTransitionAnimation {
|
||||
Interpolator workspaceFadeInterpolator = config.getInterpolator(ANIM_WORKSPACE_FADE,
|
||||
pageAlphaProvider.interpolator);
|
||||
float workspacePageIndicatorAlpha = (elements & WORKSPACE_PAGE_INDICATOR) != 0 ? 1 : 0;
|
||||
propertySetter.setViewAlpha(mLauncher.getWorkspace().getPageIndicator(),
|
||||
workspacePageIndicatorAlpha, workspaceFadeInterpolator);
|
||||
mLauncher.getWorkspace().getPageIndicator().setAlpha(
|
||||
propertySetter, workspacePageIndicatorAlpha, workspaceFadeInterpolator);
|
||||
Interpolator hotseatFadeInterpolator = config.getInterpolator(ANIM_HOTSEAT_FADE,
|
||||
workspaceFadeInterpolator);
|
||||
float hotseatIconsAlpha = (elements & HOTSEAT_ICONS) != 0 ? 1 : 0;
|
||||
|
||||
@@ -306,7 +306,7 @@ public final class FeatureFlags {
|
||||
+ " is enabled or in prefix state");
|
||||
|
||||
public static final BooleanFlag ENABLE_MATERIAL_U_POPUP = getDebugFlag(270395516,
|
||||
"ENABLE_MATERIAL_U_POPUP", false, "Switch popup UX to use material U");
|
||||
"ENABLE_MATERIAL_U_POPUP", true, "Switch popup UX to use material U");
|
||||
|
||||
public static final BooleanFlag ENABLE_SEARCH_UNINSTALLED_APPS = getReleaseFlag(270395269,
|
||||
"ENABLE_SEARCH_UNINSTALLED_APPS", false, "Search uninstalled app results.");
|
||||
|
||||
@@ -45,7 +45,7 @@ import com.android.launcher3.celllayout.CellLayoutLayoutParams;
|
||||
import com.android.launcher3.keyboard.ViewGroupFocusHelper;
|
||||
import com.android.launcher3.model.data.ItemInfo;
|
||||
import com.android.launcher3.model.data.WorkspaceItemInfo;
|
||||
import com.android.launcher3.pageindicators.PageIndicatorDots;
|
||||
import com.android.launcher3.pageindicators.LauncherDotsPageIndicator;
|
||||
import com.android.launcher3.touch.ItemClickHandler;
|
||||
import com.android.launcher3.util.LauncherBindableItemsContainer.ItemOperator;
|
||||
import com.android.launcher3.util.Thunk;
|
||||
@@ -60,7 +60,7 @@ import java.util.Map;
|
||||
import java.util.function.ToIntFunction;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class FolderPagedView extends PagedView<PageIndicatorDots> implements ClipPathView {
|
||||
public class FolderPagedView extends PagedView<LauncherDotsPageIndicator> implements ClipPathView {
|
||||
|
||||
private static final String TAG = "FolderPagedView";
|
||||
|
||||
|
||||
@@ -0,0 +1,197 @@
|
||||
/*
|
||||
* Copyright (C) 2023 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.android.launcher3.pageindicators;
|
||||
|
||||
import static com.android.launcher3.anim.AnimatorListeners.forEndCallback;
|
||||
import static com.android.launcher3.util.MultiPropertyFactory.MULTI_PROPERTY_VALUE;
|
||||
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.animation.TimeInterpolator;
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Rect;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.ViewConfiguration;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.launcher3.Alarm;
|
||||
import com.android.launcher3.Insettable;
|
||||
import com.android.launcher3.anim.PropertySetter;
|
||||
import com.android.launcher3.util.MultiValueAlpha;
|
||||
|
||||
/**
|
||||
* Extension of {@link PageIndicatorDots} with Launcher specific page-indicator functionality
|
||||
*/
|
||||
public class LauncherDotsPageIndicator extends PageIndicatorDots
|
||||
implements Insettable, PageIndicator {
|
||||
|
||||
private static final int PAGINATION_FADE_DELAY = ViewConfiguration.getScrollDefaultDelay();
|
||||
private static final int PAGINATION_FADE_IN_DURATION = 83;
|
||||
private static final int PAGINATION_FADE_OUT_DURATION = 167;
|
||||
|
||||
private static final int INDEX_VIEW_ALPHA = 0;
|
||||
private static final int INDEX_AUTO_HIDE = 1;
|
||||
private static final int ALPHA_CHANNEL_COUNT = 2;
|
||||
|
||||
private final Alarm mAutoHideAlarm;
|
||||
private final MultiValueAlpha mMultiValueAlpha;
|
||||
|
||||
private @Nullable ObjectAnimator mAlphaAnimator;
|
||||
private boolean mShouldAutoHide;
|
||||
private float mTargetAutoHideAlpha;
|
||||
|
||||
private boolean mIsSettled = true;
|
||||
private int mTotalScroll;
|
||||
|
||||
public LauncherDotsPageIndicator(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public LauncherDotsPageIndicator(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public LauncherDotsPageIndicator(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
mMultiValueAlpha = new MultiValueAlpha(this, ALPHA_CHANNEL_COUNT);
|
||||
mMultiValueAlpha.setUpdateVisibility(true);
|
||||
|
||||
mTargetAutoHideAlpha = mMultiValueAlpha.get(INDEX_AUTO_HIDE).getValue();
|
||||
|
||||
mAutoHideAlarm = new Alarm();
|
||||
mAutoHideAlarm.setOnAlarmListener(a -> animatePaginationToAlpha(0));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setScroll(int currentScroll, int totalScroll) {
|
||||
mTotalScroll = totalScroll;
|
||||
super.setScroll(currentScroll, totalScroll);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setShouldAutoHide(boolean shouldAutoHide) {
|
||||
mShouldAutoHide = shouldAutoHide;
|
||||
mAutoHideAlarm.cancelAlarm();
|
||||
if (!mIsSettled || !mShouldAutoHide) {
|
||||
animatePaginationToAlpha(1);
|
||||
} else {
|
||||
mAutoHideAlarm.setAlarm(PAGINATION_FADE_DELAY);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
if (mShouldAutoHide && mTotalScroll == 0) {
|
||||
return;
|
||||
}
|
||||
super.onDraw(canvas);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActiveMarker(int activePage) {
|
||||
super.setActiveMarker(activePage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMarkersCount(int numMarkers) {
|
||||
super.setMarkersCount(numMarkers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void pauseAnimations() {
|
||||
if (mAlphaAnimator != null) {
|
||||
mAlphaAnimator.pause();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void skipAnimationsToEnd() {
|
||||
if (mAlphaAnimator != null) {
|
||||
mAlphaAnimator.end();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onAnimationStateChanged(boolean isSettled) {
|
||||
mIsSettled = isSettled;
|
||||
if (!mShouldAutoHide) {
|
||||
return;
|
||||
}
|
||||
mAutoHideAlarm.cancelAlarm();
|
||||
if (isSettled) {
|
||||
mAutoHideAlarm.setAlarm(PAGINATION_FADE_DELAY);
|
||||
} else {
|
||||
animatePaginationToAlpha(1f);
|
||||
}
|
||||
}
|
||||
|
||||
private void animatePaginationToAlpha(float targetAlpha) {
|
||||
if (mTargetAutoHideAlpha == targetAlpha) {
|
||||
// Ignore the new animation if it is going to the same alpha as the current animation.
|
||||
return;
|
||||
}
|
||||
|
||||
if (mAlphaAnimator != null) {
|
||||
mAlphaAnimator.cancel();
|
||||
}
|
||||
mAlphaAnimator = ObjectAnimator.ofFloat(mMultiValueAlpha.get(INDEX_AUTO_HIDE),
|
||||
MULTI_PROPERTY_VALUE, targetAlpha);
|
||||
// If we are animating to decrease the alpha, then it's a fade out animation
|
||||
// whereas if we are animating to increase the alpha, it's a fade in animation.
|
||||
mAlphaAnimator.setDuration(targetAlpha == 0
|
||||
? PAGINATION_FADE_OUT_DURATION
|
||||
: PAGINATION_FADE_IN_DURATION);
|
||||
mAlphaAnimator.addListener(forEndCallback(() -> mAlphaAnimator = null));
|
||||
mAlphaAnimator.start();
|
||||
mTargetAutoHideAlpha = targetAlpha;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void stopAllAnimations() {
|
||||
super.stopAllAnimations();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void prepareEntryAnimation() {
|
||||
super.prepareEntryAnimation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void playEntryAnimation() {
|
||||
super.playEntryAnimation();
|
||||
}
|
||||
|
||||
/**
|
||||
* We need to override setInsets to prevent InsettableFrameLayout from applying different
|
||||
* margins on the pagination.
|
||||
*/
|
||||
@Override
|
||||
public void setInsets(Rect insets) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasOverlappingRendering() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAlpha(PropertySetter setter, float alpha, TimeInterpolator interpolator) {
|
||||
setter.setFloat(mMultiValueAlpha.get(INDEX_VIEW_ALPHA),
|
||||
MULTI_PROPERTY_VALUE, alpha, interpolator);
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,11 @@
|
||||
*/
|
||||
package com.android.launcher3.pageindicators;
|
||||
|
||||
import android.animation.TimeInterpolator;
|
||||
import android.view.View;
|
||||
|
||||
import com.android.launcher3.anim.PropertySetter;
|
||||
|
||||
/**
|
||||
* Base class for a page indicator.
|
||||
*/
|
||||
@@ -48,9 +53,9 @@ public interface PageIndicator {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the paint color.
|
||||
* Sets the provided alpha on the pageIndicator
|
||||
*/
|
||||
default void setPaintColor(int color) {
|
||||
// No-op by default
|
||||
default void setAlpha(PropertySetter setter, float alpha, TimeInterpolator interpolator) {
|
||||
setter.setViewAlpha((View) this, alpha, interpolator);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,42 +25,30 @@ import android.animation.ObjectAnimator;
|
||||
import android.animation.ValueAnimator;
|
||||
import android.animation.ValueAnimator.AnimatorUpdateListener;
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Outline;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Paint.Style;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.RectF;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.FloatProperty;
|
||||
import android.util.IntProperty;
|
||||
import android.view.View;
|
||||
import android.view.ViewConfiguration;
|
||||
import android.view.ViewOutlineProvider;
|
||||
import android.view.animation.Interpolator;
|
||||
import android.view.animation.OvershootInterpolator;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.launcher3.Insettable;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.util.Themes;
|
||||
|
||||
/**
|
||||
* {@link PageIndicator} which shows dots per page. The active page is shown with the current
|
||||
* accent color.
|
||||
*/
|
||||
public class PageIndicatorDots extends View implements Insettable, PageIndicator {
|
||||
public class PageIndicatorDots extends View {
|
||||
|
||||
private static final float SHIFT_PER_ANIMATION = 0.5f;
|
||||
private static final float SHIFT_THRESHOLD = 0.1f;
|
||||
private static final long ANIMATION_DURATION = 150;
|
||||
private static final int PAGINATION_FADE_DELAY = ViewConfiguration.getScrollDefaultDelay();
|
||||
private static final int PAGINATION_FADE_IN_DURATION = 83;
|
||||
private static final int PAGINATION_FADE_OUT_DURATION = 167;
|
||||
|
||||
private static final int ENTER_ANIMATION_START_DELAY = 300;
|
||||
private static final int ENTER_ANIMATION_STAGGERED_DELAY = 150;
|
||||
@@ -70,9 +58,6 @@ public class PageIndicatorDots extends View implements Insettable, PageIndicator
|
||||
private static final int DOT_ALPHA = 128;
|
||||
private static final float DOT_ALPHA_FRACTION = 0.5f;
|
||||
private static final int DOT_GAP_FACTOR = SHOW_DOT_PAGINATION.get() ? 4 : 3;
|
||||
private static final int VISIBLE_ALPHA = 255;
|
||||
private static final int INVISIBLE_ALPHA = 0;
|
||||
private Paint mPaginationPaint;
|
||||
|
||||
// This value approximately overshoots to 1.5 times the original size.
|
||||
private static final float ENTER_ANIMATION_OVERSHOOT_TENSION = 4.9f;
|
||||
@@ -94,30 +79,14 @@ public class PageIndicatorDots extends View implements Insettable, PageIndicator
|
||||
}
|
||||
};
|
||||
|
||||
private static final IntProperty<PageIndicatorDots> PAGINATION_ALPHA =
|
||||
new IntProperty<PageIndicatorDots>("pagination_alpha") {
|
||||
@Override
|
||||
public Integer get(PageIndicatorDots obj) {
|
||||
return obj.mPaginationPaint.getAlpha();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValue(PageIndicatorDots obj, int alpha) {
|
||||
obj.mPaginationPaint.setAlpha(alpha);
|
||||
obj.invalidate();
|
||||
}
|
||||
};
|
||||
|
||||
private final Handler mDelayedPaginationFadeHandler = new Handler(Looper.getMainLooper());
|
||||
private final float mDotRadius;
|
||||
private final float mCircleGap;
|
||||
private final boolean mIsRtl;
|
||||
|
||||
private final Paint mPaginationPaint;
|
||||
|
||||
private int mNumPages;
|
||||
private int mActivePage;
|
||||
private int mTotalScroll;
|
||||
private boolean mShouldAutoHide;
|
||||
private int mToAlpha;
|
||||
|
||||
/**
|
||||
* The current position of the active dot including the animation progress.
|
||||
@@ -131,13 +100,9 @@ public class PageIndicatorDots extends View implements Insettable, PageIndicator
|
||||
private float mCurrentPosition;
|
||||
private float mFinalPosition;
|
||||
private ObjectAnimator mAnimator;
|
||||
private @Nullable ObjectAnimator mAlphaAnimator;
|
||||
|
||||
private float[] mEntryAnimationRadiusFactors;
|
||||
|
||||
private final Runnable mHidePaginationRunnable =
|
||||
() -> animatePaginationToAlpha(INVISIBLE_ALPHA);
|
||||
|
||||
public PageIndicatorDots(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
@@ -151,37 +116,34 @@ public class PageIndicatorDots extends View implements Insettable, PageIndicator
|
||||
|
||||
mPaginationPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
mPaginationPaint.setStyle(Style.FILL);
|
||||
mPaginationPaint.setColor(Themes.getAttrColor(context, R.attr.folderPaginationColor));
|
||||
|
||||
TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.PagedIndicator);
|
||||
mPaginationPaint.setColor(ta.getColor(R.styleable.PagedIndicator_indicatorDotColor, 0));
|
||||
ta.recycle();
|
||||
|
||||
mDotRadius = (SHOW_DOT_PAGINATION.get()
|
||||
? getResources().getDimension(R.dimen.page_indicator_dot_size_v2)
|
||||
: getResources().getDimension(R.dimen.page_indicator_dot_size))
|
||||
/ 2;
|
||||
mCircleGap = DOT_GAP_FACTOR * mDotRadius;
|
||||
setOutlineProvider(new MyOutlineProver());
|
||||
mIsRtl = Utilities.isRtl(getResources());
|
||||
mIsRtl = getLayoutDirection() == View.LAYOUT_DIRECTION_RTL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setScroll(int currentScroll, int totalScroll) {
|
||||
if (SHOW_DOT_PAGINATION.get() && mActivePage != 0 && currentScroll == 0) {
|
||||
CURRENT_POSITION.set(this, (float) mActivePage);
|
||||
return;
|
||||
}
|
||||
|
||||
if (mNumPages <= 1) {
|
||||
if (mNumPages <= 1 || totalScroll == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mShouldAutoHide) {
|
||||
animatePaginationToAlpha(VISIBLE_ALPHA);
|
||||
}
|
||||
|
||||
if (mIsRtl) {
|
||||
currentScroll = totalScroll - currentScroll;
|
||||
}
|
||||
|
||||
mTotalScroll = totalScroll;
|
||||
|
||||
int scrollPerPage = totalScroll / (mNumPages - 1);
|
||||
int pageToLeft = scrollPerPage == 0 ? 0 : currentScroll / scrollPerPage;
|
||||
int pageToLeftScroll = pageToLeft * scrollPerPage;
|
||||
@@ -191,87 +153,12 @@ public class PageIndicatorDots extends View implements Insettable, PageIndicator
|
||||
if (currentScroll < pageToLeftScroll + scrollThreshold) {
|
||||
// scroll is within the left page's threshold
|
||||
animateToPosition(pageToLeft);
|
||||
if (mShouldAutoHide) {
|
||||
hideAfterDelay();
|
||||
}
|
||||
} else if (currentScroll > pageToRightScroll - scrollThreshold) {
|
||||
// scroll is far enough from left page to go to the right page
|
||||
animateToPosition(pageToLeft + 1);
|
||||
if (mShouldAutoHide) {
|
||||
hideAfterDelay();
|
||||
}
|
||||
} else {
|
||||
// scroll is between left and right page
|
||||
animateToPosition(pageToLeft + SHIFT_PER_ANIMATION);
|
||||
if (mShouldAutoHide) {
|
||||
mDelayedPaginationFadeHandler.removeCallbacksAndMessages(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setShouldAutoHide(boolean shouldAutoHide) {
|
||||
mShouldAutoHide = shouldAutoHide && SHOW_DOT_PAGINATION.get();
|
||||
if (shouldAutoHide && mPaginationPaint.getAlpha() > INVISIBLE_ALPHA) {
|
||||
hideAfterDelay();
|
||||
} else if (!shouldAutoHide) {
|
||||
mDelayedPaginationFadeHandler.removeCallbacksAndMessages(null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPaintColor(int color) {
|
||||
mPaginationPaint.setColor(color);
|
||||
}
|
||||
|
||||
private void hideAfterDelay() {
|
||||
mDelayedPaginationFadeHandler.removeCallbacksAndMessages(null);
|
||||
mDelayedPaginationFadeHandler.postDelayed(mHidePaginationRunnable, PAGINATION_FADE_DELAY);
|
||||
}
|
||||
|
||||
private void animatePaginationToAlpha(int alpha) {
|
||||
if (alpha == mToAlpha) {
|
||||
// Ignore the new animation if it is going to the same alpha as the current animation.
|
||||
return;
|
||||
}
|
||||
|
||||
if (mAlphaAnimator != null) {
|
||||
mAlphaAnimator.cancel();
|
||||
}
|
||||
mAlphaAnimator = ObjectAnimator.ofInt(this, PAGINATION_ALPHA,
|
||||
alpha);
|
||||
// If we are animating to decrease the alpha, then it's a fade out animation
|
||||
// whereas if we are animating to increase the alpha, it's a fade in animation.
|
||||
mAlphaAnimator.setDuration(alpha < mToAlpha
|
||||
? PAGINATION_FADE_OUT_DURATION
|
||||
: PAGINATION_FADE_IN_DURATION);
|
||||
mAlphaAnimator.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
mAlphaAnimator = null;
|
||||
}
|
||||
});
|
||||
mAlphaAnimator.start();
|
||||
mToAlpha = alpha;
|
||||
}
|
||||
|
||||
/**
|
||||
* Pauses all currently running animations.
|
||||
*/
|
||||
@Override
|
||||
public void pauseAnimations() {
|
||||
if (mAlphaAnimator != null) {
|
||||
mAlphaAnimator.pause();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Force-ends all currently running or paused animations.
|
||||
*/
|
||||
@Override
|
||||
public void skipAnimationsToEnd() {
|
||||
if (mAlphaAnimator != null) {
|
||||
mAlphaAnimator.end();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -281,15 +168,25 @@ public class PageIndicatorDots extends View implements Insettable, PageIndicator
|
||||
mCurrentPosition = mFinalPosition;
|
||||
}
|
||||
if (mAnimator == null && Float.compare(mCurrentPosition, mFinalPosition) != 0) {
|
||||
onAnimationStateChanged(false);
|
||||
float positionForThisAnim = mCurrentPosition > mFinalPosition ?
|
||||
mCurrentPosition - SHIFT_PER_ANIMATION : mCurrentPosition + SHIFT_PER_ANIMATION;
|
||||
mAnimator = ObjectAnimator.ofFloat(this, CURRENT_POSITION, positionForThisAnim);
|
||||
mAnimator.addListener(new AnimationCycleListener());
|
||||
mAnimator.setDuration(ANIMATION_DURATION);
|
||||
mAnimator.start();
|
||||
} else if (mAnimator == null) {
|
||||
// The state is only settled if the indicator lands on a int value
|
||||
onAnimationStateChanged(Float.compare(Math.round(mFinalPosition), mFinalPosition) == 0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the animation state of the page indicator changes.
|
||||
* @param isSettled true if the page indicator has settled at its final position
|
||||
*/
|
||||
protected void onAnimationStateChanged(boolean isSettled) { }
|
||||
|
||||
public void stopAllAnimations() {
|
||||
if (mAnimator != null) {
|
||||
mAnimator.cancel();
|
||||
@@ -345,14 +242,10 @@ public class PageIndicatorDots extends View implements Insettable, PageIndicator
|
||||
animSet.start();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActiveMarker(int activePage) {
|
||||
if (mActivePage != activePage) {
|
||||
mActivePage = activePage;
|
||||
}
|
||||
mActivePage = activePage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMarkersCount(int numMarkers) {
|
||||
mNumPages = numMarkers;
|
||||
requestLayout();
|
||||
@@ -374,11 +267,6 @@ public class PageIndicatorDots extends View implements Insettable, PageIndicator
|
||||
return;
|
||||
}
|
||||
|
||||
if (mShouldAutoHide && mTotalScroll == 0) {
|
||||
mPaginationPaint.setAlpha(INVISIBLE_ALPHA);
|
||||
return;
|
||||
}
|
||||
|
||||
// Draw all page indicators;
|
||||
float circleGap = mCircleGap;
|
||||
float startX = (getWidth() - (mNumPages * circleGap) + mDotRadius) / 2;
|
||||
@@ -480,20 +368,9 @@ public class PageIndicatorDots extends View implements Insettable, PageIndicator
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
if (!mCancelled) {
|
||||
if (mShouldAutoHide && SHOW_DOT_PAGINATION.get()) {
|
||||
hideAfterDelay();
|
||||
}
|
||||
mAnimator = null;
|
||||
animateToPosition(mFinalPosition);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* We need to override setInsets to prevent InsettableFrameLayout from applying different
|
||||
* margins on the pagination.
|
||||
*/
|
||||
@Override
|
||||
public void setInsets(Rect insets) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -320,11 +320,14 @@ public class PopupContainerWithArrow<T extends Context & ActivityContext>
|
||||
initializeSystemShortcuts(systemShortcuts);
|
||||
} else {
|
||||
mDeepShortcutContainer.setVisibility(View.GONE);
|
||||
mSystemShortcutContainer = inflateAndAdd(R.layout.system_shortcut_rows_container,
|
||||
this, 0);
|
||||
mWidgetContainer = mSystemShortcutContainer;
|
||||
if (!shortcuts.isEmpty()) {
|
||||
for (int i = 0; i < shortcuts.size(); i++) {
|
||||
initializeSystemShortcut(
|
||||
R.layout.system_shortcut,
|
||||
this,
|
||||
mSystemShortcutContainer,
|
||||
shortcuts.get(i),
|
||||
i < shortcuts.size() - 1);
|
||||
}
|
||||
@@ -351,7 +354,7 @@ public class PopupContainerWithArrow<T extends Context & ActivityContext>
|
||||
addAllShortcutsMaterialU(deepShortcutCount, systemShortcuts);
|
||||
} else if (!systemShortcuts.isEmpty()) {
|
||||
addSystemShortcutsMaterialU(systemShortcuts,
|
||||
R.layout.system_shortcut_rows_container,
|
||||
R.layout.system_shortcut_rows_container_material_u,
|
||||
R.layout.system_shortcut);
|
||||
}
|
||||
show();
|
||||
@@ -388,7 +391,7 @@ public class PopupContainerWithArrow<T extends Context & ActivityContext>
|
||||
if (deepShortcutCount + systemShortcuts.size() <= SHORTCUT_COLLAPSE_THRESHOLD) {
|
||||
// add all system shortcuts including widgets shortcut to same container
|
||||
addSystemShortcutsMaterialU(systemShortcuts,
|
||||
R.layout.system_shortcut_rows_container,
|
||||
R.layout.system_shortcut_rows_container_material_u,
|
||||
R.layout.system_shortcut);
|
||||
addDeepShortcutsMaterialU(deepShortcutCount);
|
||||
return;
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.android.launcher3.util
|
||||
|
||||
import java.util.StringJoiner
|
||||
import java.util.function.IntFunction
|
||||
|
||||
object FlagDebugUtils {
|
||||
|
||||
/** Appends the [flagName] to [str] when the [flag] is set in [flags]. */
|
||||
@JvmStatic
|
||||
fun appendFlag(str: StringJoiner, flags: Int, flag: Int, flagName: String) {
|
||||
if (flags and flag != 0) {
|
||||
str.add(flagName)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Produces a human-readable representation of the [current] flags, followed by a diff from from
|
||||
* [previous].
|
||||
*
|
||||
* The resulting string is intented for logging and debugging.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun formatFlagChange(current: Int, previous: Int, flagSerializer: IntFunction<String>): String {
|
||||
val result = StringJoiner(" ")
|
||||
result.add("[" + flagSerializer.apply(current) + "]")
|
||||
val changed = current xor previous
|
||||
val added = current and changed
|
||||
if (added != 0) {
|
||||
result.add("+[" + flagSerializer.apply(added) + "]")
|
||||
}
|
||||
val removed = previous and changed
|
||||
if (removed != 0) {
|
||||
result.add("-[" + flagSerializer.apply(removed) + "]")
|
||||
}
|
||||
return result.toString()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user