diff --git a/briar-android/artwork/il_transfer_data_receive.svg b/briar-android/artwork/il_transfer_data_receive.svg new file mode 100644 index 0000000000000000000000000000000000000000..38a7251528a1b93e6ab3faad7a9b5ca77c1531d6 --- /dev/null +++ b/briar-android/artwork/il_transfer_data_receive.svg @@ -0,0 +1,47 @@ +<svg width="289" height="144" viewBox="0 0 289 144" fill="none" xmlns="http://www.w3.org/2000/svg"> + <rect x="-0.75" y="0.75" width="40.5" height="76.5" rx="7.25" + transform="matrix(-1 0 0 1 271.967 33)" fill="#DDEDFE" stroke="#196FDE" + stroke-width="1.5" /> + <path d="M272.717 47.9976H232.217V100.498H272.717V47.9976Z" fill="#F9FAFB" stroke="#196FDE" + stroke-width="1.5" /> + <rect x="236.072" y="65.1011" width="32.7896" height="18.293" rx="4" fill="#ECFCCB" /> + <path d="M242.584 71.5542H262.457" stroke="#65A30D" stroke-width="1.5" stroke-linecap="round" /> + <path d="M242.584 77.6519H253.264" stroke="#65A30D" stroke-width="1.5" stroke-linecap="round" /> + <ellipse rx="1" ry="1.00118" transform="matrix(-1 0 0 1 252.467 41.0012)" fill="#196FDE" /> + <path + d="M244.467 40.2744C244.053 40.2744 243.717 40.6102 243.717 41.0244C243.717 41.4386 244.053 41.7744 244.467 41.7744V40.2744ZM248.467 41.7744C248.881 41.7744 249.217 41.4386 249.217 41.0244C249.217 40.6102 248.881 40.2744 248.467 40.2744V41.7744ZM244.467 41.7744H248.467V40.2744H244.467V41.7744Z" + fill="#196FDE" /> + <path + d="M256.467 40.2744C256.053 40.2744 255.717 40.6102 255.717 41.0244C255.717 41.4386 256.053 41.7744 256.467 41.7744V40.2744ZM260.467 41.7744C260.881 41.7744 261.217 41.4386 261.217 41.0244C261.217 40.6102 260.881 40.2744 260.467 40.2744V41.7744ZM256.467 41.7744H260.467V40.2744H256.467V41.7744Z" + fill="#196FDE" /> + <circle cx="89.467" cy="72" r="4" fill="#BEF264" /> + <circle cx="105.467" cy="72" r="4" fill="#A3E635" /> + <circle cx="73.467" cy="72" r="4" fill="#D9F99D" /> + <circle cx="198.467" cy="72" r="4" fill="#BEF264" /> + <circle cx="214.467" cy="72" r="4" fill="#A3E635" /> + <circle cx="182.467" cy="72" r="4" fill="#D9F99D" /> + <path + d="M29.0383 43C29.0383 41.8954 29.9338 41 31.0383 41H49.8963C51.0008 41 51.8963 41.8954 51.8963 43V61.3864H29.0383L29.0383 43Z" + fill="#F9FAFB" stroke="#196FDE" stroke-width="1.5" /> + <path + d="M24.4673 65.3789C24.4673 63.1698 26.2581 61.3789 28.4673 61.3789H52.4673C54.6764 61.3789 56.4673 63.1698 56.4673 65.3789L56.4673 100C56.4673 102.209 54.6764 104 52.4673 104H28.4673C26.2581 104 24.4673 102.209 24.4673 100L24.4673 65.3789Z" + fill="#DDEDFE" stroke="#196FDE" stroke-width="1.5" /> + <rect x="33.0901" y="49.4141" width="4.55576" height="3.12838" fill="#196FDE" /> + <rect x="43.2888" y="49.4141" width="4.55576" height="3.12838" fill="#196FDE" /> + <path fill-rule="evenodd" clip-rule="evenodd" + d="M151.865 42L143.967 42H126.467C124.258 42 122.467 43.7909 122.467 46L122.467 98C122.467 100.209 124.258 102 126.467 102L161.467 102C163.676 102 165.467 100.209 165.467 98L165.467 55.9695L151.865 42Z" + fill="#ECFCCB" /> + <path + d="M143.967 42L143.967 41.25H143.967V42ZM151.865 42L152.402 41.4768L152.181 41.25L151.865 41.25L151.865 42ZM122.467 46H123.217H122.467ZM122.467 98H121.717H122.467ZM126.467 102V101.25V102ZM161.467 102V102.75V102ZM165.467 98H164.717H165.467ZM165.467 55.9695H166.217V55.6646L166.004 55.4462L165.467 55.9695ZM143.967 42.75L151.865 42.75L151.865 41.25L143.967 41.25L143.967 42.75ZM126.467 42.75H143.967V41.25H126.467V42.75ZM123.217 46C123.217 44.2051 124.672 42.75 126.467 42.75V41.25C123.844 41.25 121.717 43.3766 121.717 46H123.217ZM123.217 98L123.217 46H121.717L121.717 98H123.217ZM126.467 101.25C124.672 101.25 123.217 99.7949 123.217 98H121.717C121.717 100.623 123.844 102.75 126.467 102.75V101.25ZM161.467 101.25L126.467 101.25V102.75L161.467 102.75V101.25ZM164.717 98C164.717 99.7949 163.262 101.25 161.467 101.25V102.75C164.09 102.75 166.217 100.623 166.217 98H164.717ZM164.717 55.9695L164.717 98H166.217L166.217 55.9695H164.717ZM166.004 55.4462L152.402 41.4768L151.327 42.5232L164.93 56.4927L166.004 55.4462Z" + fill="#65A30D" /> + <path + d="M165.197 55.6787L156.162 55.6787C153.952 55.6787 152.162 53.8878 152.162 51.6787L152.162 42.2911L165.197 55.6787Z" + fill="#F7FEE7" stroke="#65A30D" stroke-width="1.5" stroke-linejoin="round" /> + <path d="M134.07 63.4902H153.911" stroke="#65A30D" stroke-width="1.5" stroke-linecap="round" /> + <path d="M134.07 69.0361H144.733" stroke="#65A30D" stroke-width="1.5" stroke-linecap="round" /> + <path + d="M143.164 80.7328C143.164 78.654 141.479 76.9688 139.4 76.9688C137.321 76.9688 135.636 78.654 135.636 80.7328V87.4129C135.636 89.4917 137.321 91.1769 139.4 91.1769C141.479 91.1769 143.164 89.4917 143.164 87.4129V80.7328Z" + stroke="#65A30D" stroke-width="1.5" /> + <rect x="133.066" y="84.52" width="12.671" height="9.44635" rx="1.25" fill="#A3E635" + stroke="#65A30D" stroke-width="1.5" /> +</svg> diff --git a/briar-android/artwork/il_transfer_data_receive_night.svg b/briar-android/artwork/il_transfer_data_receive_night.svg new file mode 100644 index 0000000000000000000000000000000000000000..4686c69eaa3ef5c667dc73559052df84bc668a21 --- /dev/null +++ b/briar-android/artwork/il_transfer_data_receive_night.svg @@ -0,0 +1,47 @@ +<svg width="289" height="144" viewBox="0 0 289 144" fill="none" xmlns="http://www.w3.org/2000/svg"> + <rect x="-0.75" y="0.75" width="40.5" height="76.5" rx="7.25" + transform="matrix(-1 0 0 1 271.967 33)" fill="#1E293B" stroke="#52ADF9" + stroke-width="1.5" /> + <path d="M272.717 47.9976H232.217V100.498H272.717V47.9976Z" fill="#0B1120" stroke="#52ADF9" + stroke-width="1.5" /> + <rect x="236.072" y="65.1011" width="32.7896" height="18.293" rx="4" fill="#365314" /> + <path d="M242.584 71.5542H262.457" stroke="#A3E635" stroke-width="1.5" stroke-linecap="round" /> + <path d="M242.584 77.6519H253.264" stroke="#A3E635" stroke-width="1.5" stroke-linecap="round" /> + <ellipse rx="1" ry="1.00118" transform="matrix(-1 0 0 1 252.467 41.0012)" fill="#52ADF9" /> + <path + d="M244.467 40.2744C244.053 40.2744 243.717 40.6102 243.717 41.0244C243.717 41.4386 244.053 41.7744 244.467 41.7744V40.2744ZM248.467 41.7744C248.881 41.7744 249.217 41.4386 249.217 41.0244C249.217 40.6102 248.881 40.2744 248.467 40.2744V41.7744ZM244.467 41.7744H248.467V40.2744H244.467V41.7744Z" + fill="#52ADF9" /> + <path + d="M256.467 40.2744C256.053 40.2744 255.717 40.6102 255.717 41.0244C255.717 41.4386 256.053 41.7744 256.467 41.7744V40.2744ZM260.467 41.7744C260.881 41.7744 261.217 41.4386 261.217 41.0244C261.217 40.6102 260.881 40.2744 260.467 40.2744V41.7744ZM256.467 41.7744H260.467V40.2744H256.467V41.7744Z" + fill="#52ADF9" /> + <circle cx="89.467" cy="72" r="4" fill="#4D7C0F" /> + <circle cx="105.467" cy="72" r="4" fill="#82C91E" /> + <circle cx="73.467" cy="72" r="4" fill="#365314" /> + <circle cx="198.467" cy="72" r="4" fill="#4D7C0F" /> + <circle cx="214.467" cy="72" r="4" fill="#82C91E" /> + <circle cx="182.467" cy="72" r="4" fill="#365314" /> + <path + d="M29.0383 43C29.0383 41.8954 29.9338 41 31.0383 41H49.8963C51.0008 41 51.8963 41.8954 51.8963 43V61.3864H29.0383L29.0383 43Z" + fill="#123060" stroke="#52ADF9" stroke-width="1.5" /> + <path + d="M24.4673 65.3789C24.4673 63.1698 26.2581 61.3789 28.4673 61.3789H52.4673C54.6764 61.3789 56.4673 63.1698 56.4673 65.3789L56.4673 100C56.4673 102.209 54.6764 104 52.4673 104H28.4673C26.2581 104 24.4673 102.209 24.4673 100L24.4673 65.3789Z" + fill="#1E293B" stroke="#52ADF9" stroke-width="1.5" /> + <rect x="33.0901" y="49.4141" width="4.55576" height="3.12838" fill="#52ADF9" /> + <rect x="43.2888" y="49.4141" width="4.55576" height="3.12838" fill="#52ADF9" /> + <path fill-rule="evenodd" clip-rule="evenodd" + d="M151.865 42L143.967 42H126.467C124.258 42 122.467 43.7909 122.467 46L122.467 98C122.467 100.209 124.258 102 126.467 102L161.467 102C163.676 102 165.467 100.209 165.467 98L165.467 55.9695L151.865 42Z" + fill="#365314" /> + <path + d="M143.967 42L143.967 41.25H143.967V42ZM151.865 42L152.402 41.4768L152.181 41.25L151.865 41.25L151.865 42ZM122.467 46H123.217H122.467ZM122.467 98H121.717H122.467ZM126.467 102V101.25V102ZM161.467 102V102.75V102ZM165.467 98H164.717H165.467ZM165.467 55.9695H166.217V55.6646L166.004 55.4462L165.467 55.9695ZM143.967 42.75L151.865 42.75L151.865 41.25L143.967 41.25L143.967 42.75ZM126.467 42.75H143.967V41.25H126.467V42.75ZM123.217 46C123.217 44.2051 124.672 42.75 126.467 42.75V41.25C123.844 41.25 121.717 43.3766 121.717 46H123.217ZM123.217 98L123.217 46H121.717L121.717 98H123.217ZM126.467 101.25C124.672 101.25 123.217 99.7949 123.217 98H121.717C121.717 100.623 123.844 102.75 126.467 102.75V101.25ZM161.467 101.25L126.467 101.25V102.75L161.467 102.75V101.25ZM164.717 98C164.717 99.7949 163.262 101.25 161.467 101.25V102.75C164.09 102.75 166.217 100.623 166.217 98H164.717ZM164.717 55.9695L164.717 98H166.217L166.217 55.9695H164.717ZM166.004 55.4462L152.402 41.4768L151.327 42.5232L164.93 56.4927L166.004 55.4462Z" + fill="#A3E635" /> + <path + d="M165.197 55.6787L156.162 55.6787C153.952 55.6787 152.162 53.8878 152.162 51.6787L152.162 42.2911L165.197 55.6787Z" + fill="#65A30D" stroke="#A3E635" stroke-width="1.5" stroke-linejoin="round" /> + <path d="M134.07 63.4902H153.911" stroke="#A3E635" stroke-width="1.5" stroke-linecap="round" /> + <path d="M134.07 69.0361H144.733" stroke="#A3E635" stroke-width="1.5" stroke-linecap="round" /> + <path + d="M135.636 80.7328V87.4129C135.636 89.4917 137.321 91.1769 139.4 91.1769C141.479 91.1769 143.164 89.4917 143.164 87.4129V80.7328C143.164 78.654 141.479 76.9688 139.4 76.9688C137.321 76.9688 135.636 78.654 135.636 80.7328Z" + stroke="#A3E635" stroke-width="1.5" /> + <rect x="133.066" y="84.52" width="12.671" height="9.44635" rx="1.25" fill="#65A30D" + stroke="#A3E635" stroke-width="1.5" /> +</svg> diff --git a/briar-android/artwork/transfer_data_receive.svg b/briar-android/artwork/transfer_data_receive.svg deleted file mode 100644 index 2280b745345ce4cd595e6202f759d17ad1171c9b..0000000000000000000000000000000000000000 --- a/briar-android/artwork/transfer_data_receive.svg +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="120" height="52" - viewBox="0 0 120 52" fill="none" version="1.1" id="svg24" - sodipodi:docname="transfer_data_receive.svg" inkscape:version="1.0.2 (e86c870879, 2021-01-15)"> - <defs id="defs11" /> - <sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" - objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" - inkscape:pageshadow="2" inkscape:window-width="1920" inkscape:window-height="982" - id="namedview9" showgrid="false" inkscape:zoom="4.1077454" inkscape:cx="81.48675" - inkscape:cy="18.42645" inkscape:window-x="1920" inkscape:window-y="72" - inkscape:window-maximized="0" inkscape:current-layer="svg24" inkscape:document-rotation="0" - fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" /> - <metadata id="metadata30"> - <rdf:RDF> - <cc:Work rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title></dc:title> - </cc:Work> - </rdf:RDF> - </metadata> - <path id="path8" - style="fill:#8a9cb3;stroke:none;stroke-width:0.749281;stroke-miterlimit:4;stroke-dasharray:none" - d="m 15.97512,14.267003 c -0.596207,0 -1.167798,0.237677 -1.588736,0.659365 -0.421693,0.42094 -0.659371,0.992537 -0.659371,1.588743 v 10.111264 c -0.596207,0 -1.16631,0.236178 -1.58725,0.657875 -0.421682,0.420938 -0.659361,0.992529 -0.659361,1.588736 v 12.35937 h 2.246611 v -12.35937 h 17.977398 v 12.359369 h 2.24662 V 28.872986 c 0,-0.596207 -0.23619,-1.167798 -0.65788,-1.588737 -0.42094,-0.421697 -0.99253,-0.657875 -1.58874,-0.657875 V 16.515111 c 0,-0.596206 -0.23768,-1.167804 -0.65937,-1.588743 -0.42094,-0.421688 -0.99252,-0.659365 -1.58873,-0.659365 z m 0,2.248108 H 29.456311 V 26.626375 H 15.97512 Z m 2.24662,2.224241 v 2.246609 h 3.369915 v -2.246609 z m 5.618031,0 v 2.246609 h 3.36993 v -2.246609 z" - sodipodi:nodetypes="scsccsccccccsccscssccccccccccccccc" /> - <path - d="m 47.827564,24.463076 v 3.073847 h 18.443085 l -8.45308,8.453081 2.182432,2.182432 12.172435,-12.172438 -12.172435,-12.172434 -2.182432,2.182431 8.45308,8.45308 z" - id="path895" style="fill:#82c91e;fill-opacity:1;stroke:none;stroke-width:1.53692" /> - <path id="path8-3" - style="fill:#8a9cb3;stroke:none;stroke-width:0.985186;stroke-miterlimit:4;stroke-dasharray:none" - d="M 93.999021,5.9999999e-8 C 92.275189,5.9999999e-8 90.624219,0.68560941 89.405306,1.9045678 88.186391,3.1235212 87.500737,4.7763832 87.500737,6.5002454 V 45.497793 c 0,1.723833 0.685654,3.378723 1.904569,4.597639 C 90.624219,51.314343 92.275189,52 93.999021,52 h 19.500739 c 1.72383,0 3.37676,-0.685657 4.59567,-1.904568 C 119.31435,48.876515 120,47.221626 120,45.497793 V 6.5002454 C 120,4.7763832 119.31435,3.1235212 118.09543,1.9045678 116.87652,0.68560941 115.22359,5.9999999e-8 113.49976,5.9999999e-8 Z m 0,3.252084740000001 h 19.500739 c 0.86192,0 1.68931,0.339865 2.29881,0.9493417 0.60941,0.6094767 0.95131,1.4368929 0.95131,2.2988189 V 45.497793 c 0,0.861917 -0.3419,1.689315 -0.95131,2.29882 -0.6095,0.609408 -1.43689,0.953264 -2.29881,0.953264 H 93.999021 c -0.861916,0 -1.687352,-0.343856 -2.296858,-0.953264 -0.609407,-0.609505 -0.951304,-1.436903 -0.951304,-2.29882 V 6.5002454 c 0,-0.861926 0.341897,-1.6893422 0.951304,-2.2988189 0.609506,-0.6094767 1.434942,-0.9493417 2.296858,-0.9493417 z m 9.750369,32.7640582 c -0.86191,0 -1.68745,0.341895 -2.29686,0.951303 -0.6095,0.609506 -0.95326,1.436904 -0.95326,2.298819 0,0.861916 0.34376,1.687452 0.95326,2.29686 0.60941,0.609507 1.43495,0.951302 2.29686,0.951302 0.86192,0 1.68931,-0.341797 2.29882,-0.951302 0.6094,-0.609408 0.9513,-1.434942 0.9513,-2.29686 0,-0.861915 -0.3419,-1.689311 -0.9513,-2.298819 -0.60951,-0.609408 -1.4369,-0.951303 -2.29882,-0.951303 z" - sodipodi:nodetypes="sssssssscsssssscsscsscsscsssscssscs" /> -</svg> diff --git a/briar-android/src/main/java/org/briarproject/briar/android/removabledrive/ReceiveFragment.java b/briar-android/src/main/java/org/briarproject/briar/android/removabledrive/ReceiveFragment.java index c927d26abcb76cf4132daa622ad6d3173c3a1889..b5b022a41949770a42de443a7479d5a80764f058 100644 --- a/briar-android/src/main/java/org/briarproject/briar/android/removabledrive/ReceiveFragment.java +++ b/briar-android/src/main/java/org/briarproject/briar/android/removabledrive/ReceiveFragment.java @@ -8,7 +8,6 @@ import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.ProgressBar; -import android.widget.ScrollView; import android.widget.Toast; import org.briarproject.briar.R; @@ -26,10 +25,10 @@ import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentActivity; import androidx.lifecycle.ViewModelProvider; -import static android.view.View.FOCUS_DOWN; import static android.view.View.VISIBLE; import static android.widget.Toast.LENGTH_LONG; import static org.briarproject.briar.android.AppModule.getAndroidComponent; +import static org.briarproject.briar.android.util.UiUtils.hideViewOnSmallScreen; import static org.briarproject.briar.android.util.UiUtils.launchActivityToOpenFile; @RequiresApi(19) @@ -50,7 +49,6 @@ public class ReceiveFragment extends Fragment { ViewModelProvider.Factory viewModelFactory; private RemovableDriveViewModel viewModel; - private ScrollView scrollView; private Button button; private ProgressBar progressBar; @@ -72,7 +70,6 @@ public class ReceiveFragment extends Fragment { View v = inflater.inflate(R.layout.fragment_transfer_data_receive, container, false); - scrollView = (ScrollView) v; progressBar = v.findViewById(R.id.progressBar); button = v.findViewById(R.id.fileButton); button.setOnClickListener(view -> @@ -93,8 +90,7 @@ public class ReceiveFragment extends Fragment { public void onStart() { super.onStart(); requireActivity().setTitle(R.string.removable_drive_title_receive); - // Scroll down in case the screen is small, so the button is visible - scrollView.post(() -> scrollView.fullScroll(FOCUS_DOWN)); + hideViewOnSmallScreen(requireView().findViewById(R.id.imageView)); } @Override diff --git a/briar-android/src/main/res/drawable-night/il_transfer_data_receive.xml b/briar-android/src/main/res/drawable-night/il_transfer_data_receive.xml new file mode 100644 index 0000000000000000000000000000000000000000..ecaab1575c434f4256b30c1a64deac84820bbbfc --- /dev/null +++ b/briar-android/src/main/res/drawable-night/il_transfer_data_receive.xml @@ -0,0 +1,109 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="200dp" + android:height="100dp" + android:viewportWidth="289" + android:viewportHeight="144"> + <path + android:fillColor="#1E293B" + android:pathData="M265.47,33.75L239.47,33.75A7.25,7.25 0,0 0,232.22 41L232.22,103A7.25,7.25 0,0 0,239.47 110.25L265.47,110.25A7.25,7.25 0,0 0,272.72 103L272.72,41A7.25,7.25 0,0 0,265.47 33.75z" + android:strokeWidth="1.5" + android:strokeColor="#52ADF9" /> + <path + android:fillColor="#0B1120" + android:pathData="M272.72,48H232.22V100.5H272.72V48Z" + android:strokeWidth="1.5" + android:strokeColor="#52ADF9" /> + <path + android:fillColor="#365314" + android:pathData="M240.07,65.1L264.86,65.1A4,4 0,0 1,268.86 69.1L268.86,79.39A4,4 0,0 1,264.86 83.39L240.07,83.39A4,4 0,0 1,236.07 79.39L236.07,69.1A4,4 0,0 1,240.07 65.1z" /> + <path + android:fillColor="#00000000" + android:pathData="M242.58,71.55H262.46" + android:strokeWidth="1.5" + android:strokeColor="#A3E635" + android:strokeLineCap="round" /> + <path + android:fillColor="#00000000" + android:pathData="M242.58,77.65H253.26" + android:strokeWidth="1.5" + android:strokeColor="#A3E635" + android:strokeLineCap="round" /> + <path + android:fillColor="#52ADF9" + android:pathData="M253.47,41a1,1 90,1 1,-2 0a1,1 90,1 1,2 0z" /> + <path + android:fillColor="#52ADF9" + android:pathData="M244.47,40.27C244.05,40.27 243.72,40.61 243.72,41.02C243.72,41.44 244.05,41.77 244.47,41.77V40.27ZM248.47,41.77C248.88,41.77 249.22,41.44 249.22,41.02C249.22,40.61 248.88,40.27 248.47,40.27V41.77ZM244.47,41.77H248.47V40.27H244.47V41.77Z" /> + <path + android:fillColor="#52ADF9" + android:pathData="M256.47,40.27C256.05,40.27 255.72,40.61 255.72,41.02C255.72,41.44 256.05,41.77 256.47,41.77V40.27ZM260.47,41.77C260.88,41.77 261.22,41.44 261.22,41.02C261.22,40.61 260.88,40.27 260.47,40.27V41.77ZM256.47,41.77H260.47V40.27H256.47V41.77Z" /> + <path + android:fillColor="#4D7C0F" + android:pathData="M89.47,72m-4,0a4,4 0,1 1,8 0a4,4 0,1 1,-8 0" /> + <path + android:fillColor="#82C91E" + android:pathData="M105.47,72m-4,0a4,4 0,1 1,8 0a4,4 0,1 1,-8 0" /> + <path + android:fillColor="#365314" + android:pathData="M73.47,72m-4,0a4,4 0,1 1,8 0a4,4 0,1 1,-8 0" /> + <path + android:fillColor="#4D7C0F" + android:pathData="M198.47,72m-4,0a4,4 0,1 1,8 0a4,4 0,1 1,-8 0" /> + <path + android:fillColor="#82C91E" + android:pathData="M214.47,72m-4,0a4,4 0,1 1,8 0a4,4 0,1 1,-8 0" /> + <path + android:fillColor="#365314" + android:pathData="M182.47,72m-4,0a4,4 0,1 1,8 0a4,4 0,1 1,-8 0" /> + <path + android:fillColor="#123060" + android:pathData="M29.04,43C29.04,41.9 29.93,41 31.04,41H49.9C51,41 51.9,41.9 51.9,43V61.39H29.04L29.04,43Z" + android:strokeWidth="1.5" + android:strokeColor="#52ADF9" /> + <path + android:fillColor="#1E293B" + android:pathData="M24.47,65.38C24.47,63.17 26.26,61.38 28.47,61.38H52.47C54.68,61.38 56.47,63.17 56.47,65.38L56.47,100C56.47,102.21 54.68,104 52.47,104H28.47C26.26,104 24.47,102.21 24.47,100L24.47,65.38Z" + android:strokeWidth="1.5" + android:strokeColor="#52ADF9" /> + <path + android:fillColor="#52ADF9" + android:pathData="M33.09,49.41h4.56v3.13h-4.56z" /> + <path + android:fillColor="#52ADF9" + android:pathData="M43.29,49.41h4.56v3.13h-4.56z" /> + <path + android:fillColor="#365314" + android:fillType="evenOdd" + android:pathData="M151.87,42L143.97,42H126.47C124.26,42 122.47,43.79 122.47,46L122.47,98C122.47,100.21 124.26,102 126.47,102L161.47,102C163.68,102 165.47,100.21 165.47,98L165.47,55.97L151.87,42Z" /> + <path + android:fillColor="#A3E635" + android:pathData="M143.97,42L143.97,41.25H143.97V42ZM151.87,42L152.4,41.48L152.18,41.25L151.87,41.25L151.87,42ZM122.47,46H123.22H122.47ZM122.47,98H121.72H122.47ZM126.47,102V101.25V102ZM161.47,102V102.75V102ZM165.47,98H164.72H165.47ZM165.47,55.97H166.22V55.66L166,55.45L165.47,55.97ZM143.97,42.75L151.87,42.75L151.87,41.25L143.97,41.25L143.97,42.75ZM126.47,42.75H143.97V41.25H126.47V42.75ZM123.22,46C123.22,44.21 124.67,42.75 126.47,42.75V41.25C123.84,41.25 121.72,43.38 121.72,46H123.22ZM123.22,98L123.22,46H121.72L121.72,98H123.22ZM126.47,101.25C124.67,101.25 123.22,99.79 123.22,98H121.72C121.72,100.62 123.84,102.75 126.47,102.75V101.25ZM161.47,101.25L126.47,101.25V102.75L161.47,102.75V101.25ZM164.72,98C164.72,99.79 163.26,101.25 161.47,101.25V102.75C164.09,102.75 166.22,100.62 166.22,98H164.72ZM164.72,55.97L164.72,98H166.22L166.22,55.97H164.72ZM166,55.45L152.4,41.48L151.33,42.52L164.93,56.49L166,55.45Z" /> + <path + android:fillColor="#65A30D" + android:pathData="M165.2,55.68L156.16,55.68C153.95,55.68 152.16,53.89 152.16,51.68L152.16,42.29L165.2,55.68Z" + android:strokeWidth="1.5" + android:strokeColor="#A3E635" + android:strokeLineJoin="round" /> + <path + android:fillColor="#00000000" + android:pathData="M134.07,63.49H153.91" + android:strokeWidth="1.5" + android:strokeColor="#A3E635" + android:strokeLineCap="round" /> + <path + android:fillColor="#00000000" + android:pathData="M134.07,69.04H144.73" + android:strokeWidth="1.5" + android:strokeColor="#A3E635" + android:strokeLineCap="round" /> + <path + android:fillColor="#00000000" + android:pathData="M135.64,80.73V87.41C135.64,89.49 137.32,91.18 139.4,91.18C141.48,91.18 143.16,89.49 143.16,87.41V80.73C143.16,78.65 141.48,76.97 139.4,76.97C137.32,76.97 135.64,78.65 135.64,80.73Z" + android:strokeWidth="1.5" + android:strokeColor="#A3E635" /> + <path + android:fillColor="#65A30D" + android:pathData="M134.32,84.52L144.49,84.52A1.25,1.25 0,0 1,145.74 85.77L145.74,92.72A1.25,1.25 0,0 1,144.49 93.97L134.32,93.97A1.25,1.25 0,0 1,133.07 92.72L133.07,85.77A1.25,1.25 0,0 1,134.32 84.52z" + android:strokeWidth="1.5" + android:strokeColor="#A3E635" /> +</vector> diff --git a/briar-android/src/main/res/drawable/ic_transfer_data_receive.xml b/briar-android/src/main/res/drawable/ic_transfer_data_receive.xml deleted file mode 100644 index 87d43457fb80f45b6b23678e8b0ab6d3d4a41d65..0000000000000000000000000000000000000000 --- a/briar-android/src/main/res/drawable/ic_transfer_data_receive.xml +++ /dev/null @@ -1,15 +0,0 @@ -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="120dp" - android:height="52dp" - android:viewportWidth="120" - android:viewportHeight="52"> - <path - android:fillColor="?attr/colorControlNormal" - android:pathData="m15.975,14.267c-0.596,0 -1.168,0.238 -1.589,0.659 -0.422,0.421 -0.659,0.993 -0.659,1.589v10.111c-0.596,0 -1.166,0.236 -1.587,0.658 -0.422,0.421 -0.659,0.993 -0.659,1.589v12.359h2.247v-12.359h17.977v12.359h2.247L33.951,28.873c0,-0.596 -0.236,-1.168 -0.658,-1.589 -0.421,-0.422 -0.993,-0.658 -1.589,-0.658L31.704,16.515c0,-0.596 -0.238,-1.168 -0.659,-1.589 -0.421,-0.422 -0.993,-0.659 -1.589,-0.659zM15.975,16.515L29.456,16.515L29.456,26.626L15.975,26.626ZM18.222,18.739v2.247h3.37v-2.247zM23.84,18.739v2.247h3.37v-2.247z" /> - <path - android:fillColor="@color/briar_brand_green" - android:pathData="m47.828,24.463v3.074h18.443l-8.453,8.453 2.182,2.182 12.172,-12.172 -12.172,-12.172 -2.182,2.182 8.453,8.453z" /> - <path - android:fillColor="?attr/colorControlNormal" - android:pathData="M93.999,0C92.275,0 90.624,0.686 89.405,1.905 88.186,3.124 87.501,4.776 87.501,6.5L87.501,45.498c0,1.724 0.686,3.379 1.905,4.598C90.624,51.314 92.275,52 93.999,52h19.501c1.724,0 3.377,-0.686 4.596,-1.905C119.314,48.877 120,47.222 120,45.498L120,6.5C120,4.776 119.314,3.124 118.095,1.905 116.877,0.686 115.224,0 113.5,0ZM93.999,3.252h19.501c0.862,0 1.689,0.34 2.299,0.949 0.609,0.609 0.951,1.437 0.951,2.299L116.75,45.498c0,0.862 -0.342,1.689 -0.951,2.299 -0.609,0.609 -1.437,0.953 -2.299,0.953L93.999,48.75c-0.862,0 -1.687,-0.344 -2.297,-0.953 -0.609,-0.61 -0.951,-1.437 -0.951,-2.299L90.751,6.5c0,-0.862 0.342,-1.689 0.951,-2.299 0.61,-0.609 1.435,-0.949 2.297,-0.949zM103.749,36.016c-0.862,0 -1.687,0.342 -2.297,0.951 -0.609,0.61 -0.953,1.437 -0.953,2.299 0,0.862 0.344,1.687 0.953,2.297 0.609,0.61 1.435,0.951 2.297,0.951 0.862,0 1.689,-0.342 2.299,-0.951 0.609,-0.609 0.951,-1.435 0.951,-2.297 0,-0.862 -0.342,-1.689 -0.951,-2.299 -0.61,-0.609 -1.437,-0.951 -2.299,-0.951z" /> -</vector> diff --git a/briar-android/src/main/res/drawable/il_transfer_data_receive.xml b/briar-android/src/main/res/drawable/il_transfer_data_receive.xml new file mode 100644 index 0000000000000000000000000000000000000000..a303a089071e877091155f4b0ee3f55c343e4fcc --- /dev/null +++ b/briar-android/src/main/res/drawable/il_transfer_data_receive.xml @@ -0,0 +1,109 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="200dp" + android:height="100dp" + android:viewportWidth="289" + android:viewportHeight="144"> + <path + android:fillColor="#DDEDFE" + android:pathData="M265.47,33.75L239.47,33.75A7.25,7.25 0,0 0,232.22 41L232.22,103A7.25,7.25 0,0 0,239.47 110.25L265.47,110.25A7.25,7.25 0,0 0,272.72 103L272.72,41A7.25,7.25 0,0 0,265.47 33.75z" + android:strokeWidth="1.5" + android:strokeColor="#196FDE" /> + <path + android:fillColor="#F9FAFB" + android:pathData="M272.72,48H232.22V100.5H272.72V48Z" + android:strokeWidth="1.5" + android:strokeColor="#196FDE" /> + <path + android:fillColor="#ECFCCB" + android:pathData="M240.07,65.1L264.86,65.1A4,4 0,0 1,268.86 69.1L268.86,79.39A4,4 0,0 1,264.86 83.39L240.07,83.39A4,4 0,0 1,236.07 79.39L236.07,69.1A4,4 0,0 1,240.07 65.1z" /> + <path + android:fillColor="#00000000" + android:pathData="M242.58,71.55H262.46" + android:strokeWidth="1.5" + android:strokeColor="#65A30D" + android:strokeLineCap="round" /> + <path + android:fillColor="#00000000" + android:pathData="M242.58,77.65H253.26" + android:strokeWidth="1.5" + android:strokeColor="#65A30D" + android:strokeLineCap="round" /> + <path + android:fillColor="#196FDE" + android:pathData="M253.47,41a1,1 90,1 1,-2 0a1,1 90,1 1,2 0z" /> + <path + android:fillColor="#196FDE" + android:pathData="M244.47,40.27C244.05,40.27 243.72,40.61 243.72,41.02C243.72,41.44 244.05,41.77 244.47,41.77V40.27ZM248.47,41.77C248.88,41.77 249.22,41.44 249.22,41.02C249.22,40.61 248.88,40.27 248.47,40.27V41.77ZM244.47,41.77H248.47V40.27H244.47V41.77Z" /> + <path + android:fillColor="#196FDE" + android:pathData="M256.47,40.27C256.05,40.27 255.72,40.61 255.72,41.02C255.72,41.44 256.05,41.77 256.47,41.77V40.27ZM260.47,41.77C260.88,41.77 261.22,41.44 261.22,41.02C261.22,40.61 260.88,40.27 260.47,40.27V41.77ZM256.47,41.77H260.47V40.27H256.47V41.77Z" /> + <path + android:fillColor="#BEF264" + android:pathData="M89.47,72m-4,0a4,4 0,1 1,8 0a4,4 0,1 1,-8 0" /> + <path + android:fillColor="#A3E635" + android:pathData="M105.47,72m-4,0a4,4 0,1 1,8 0a4,4 0,1 1,-8 0" /> + <path + android:fillColor="#D9F99D" + android:pathData="M73.47,72m-4,0a4,4 0,1 1,8 0a4,4 0,1 1,-8 0" /> + <path + android:fillColor="#BEF264" + android:pathData="M198.47,72m-4,0a4,4 0,1 1,8 0a4,4 0,1 1,-8 0" /> + <path + android:fillColor="#A3E635" + android:pathData="M214.47,72m-4,0a4,4 0,1 1,8 0a4,4 0,1 1,-8 0" /> + <path + android:fillColor="#D9F99D" + android:pathData="M182.47,72m-4,0a4,4 0,1 1,8 0a4,4 0,1 1,-8 0" /> + <path + android:fillColor="#F9FAFB" + android:pathData="M29.04,43C29.04,41.9 29.93,41 31.04,41H49.9C51,41 51.9,41.9 51.9,43V61.39H29.04L29.04,43Z" + android:strokeWidth="1.5" + android:strokeColor="#196FDE" /> + <path + android:fillColor="#DDEDFE" + android:pathData="M24.47,65.38C24.47,63.17 26.26,61.38 28.47,61.38H52.47C54.68,61.38 56.47,63.17 56.47,65.38L56.47,100C56.47,102.21 54.68,104 52.47,104H28.47C26.26,104 24.47,102.21 24.47,100L24.47,65.38Z" + android:strokeWidth="1.5" + android:strokeColor="#196FDE" /> + <path + android:fillColor="#196FDE" + android:pathData="M33.09,49.41h4.56v3.13h-4.56z" /> + <path + android:fillColor="#196FDE" + android:pathData="M43.29,49.41h4.56v3.13h-4.56z" /> + <path + android:fillColor="#ECFCCB" + android:fillType="evenOdd" + android:pathData="M151.87,42L143.97,42H126.47C124.26,42 122.47,43.79 122.47,46L122.47,98C122.47,100.21 124.26,102 126.47,102L161.47,102C163.68,102 165.47,100.21 165.47,98L165.47,55.97L151.87,42Z" /> + <path + android:fillColor="#65A30D" + android:pathData="M143.97,42L143.97,41.25H143.97V42ZM151.87,42L152.4,41.48L152.18,41.25L151.87,41.25L151.87,42ZM122.47,46H123.22H122.47ZM122.47,98H121.72H122.47ZM126.47,102V101.25V102ZM161.47,102V102.75V102ZM165.47,98H164.72H165.47ZM165.47,55.97H166.22V55.66L166,55.45L165.47,55.97ZM143.97,42.75L151.87,42.75L151.87,41.25L143.97,41.25L143.97,42.75ZM126.47,42.75H143.97V41.25H126.47V42.75ZM123.22,46C123.22,44.21 124.67,42.75 126.47,42.75V41.25C123.84,41.25 121.72,43.38 121.72,46H123.22ZM123.22,98L123.22,46H121.72L121.72,98H123.22ZM126.47,101.25C124.67,101.25 123.22,99.79 123.22,98H121.72C121.72,100.62 123.84,102.75 126.47,102.75V101.25ZM161.47,101.25L126.47,101.25V102.75L161.47,102.75V101.25ZM164.72,98C164.72,99.79 163.26,101.25 161.47,101.25V102.75C164.09,102.75 166.22,100.62 166.22,98H164.72ZM164.72,55.97L164.72,98H166.22L166.22,55.97H164.72ZM166,55.45L152.4,41.48L151.33,42.52L164.93,56.49L166,55.45Z" /> + <path + android:fillColor="#F7FEE7" + android:pathData="M165.2,55.68L156.16,55.68C153.95,55.68 152.16,53.89 152.16,51.68L152.16,42.29L165.2,55.68Z" + android:strokeWidth="1.5" + android:strokeColor="#65A30D" + android:strokeLineJoin="round" /> + <path + android:fillColor="#00000000" + android:pathData="M134.07,63.49H153.91" + android:strokeWidth="1.5" + android:strokeColor="#65A30D" + android:strokeLineCap="round" /> + <path + android:fillColor="#00000000" + android:pathData="M134.07,69.04H144.73" + android:strokeWidth="1.5" + android:strokeColor="#65A30D" + android:strokeLineCap="round" /> + <path + android:fillColor="#00000000" + android:pathData="M143.16,80.73C143.16,78.65 141.48,76.97 139.4,76.97C137.32,76.97 135.64,78.65 135.64,80.73V87.41C135.64,89.49 137.32,91.18 139.4,91.18C141.48,91.18 143.16,89.49 143.16,87.41V80.73Z" + android:strokeWidth="1.5" + android:strokeColor="#65A30D" /> + <path + android:fillColor="#A3E635" + android:pathData="M134.32,84.52L144.49,84.52A1.25,1.25 0,0 1,145.74 85.77L145.74,92.72A1.25,1.25 0,0 1,144.49 93.97L134.32,93.97A1.25,1.25 0,0 1,133.07 92.72L133.07,85.77A1.25,1.25 0,0 1,134.32 84.52z" + android:strokeWidth="1.5" + android:strokeColor="#65A30D" /> +</vector> diff --git a/briar-android/src/main/res/layout/fragment_transfer_data_receive.xml b/briar-android/src/main/res/layout/fragment_transfer_data_receive.xml index 71f87ee87784c4e20fc1f9f3bf1fd09b81f7922d..3911756c6d9356a31586594e1887412da9424888 100644 --- a/briar-android/src/main/res/layout/fragment_transfer_data_receive.xml +++ b/briar-android/src/main/res/layout/fragment_transfer_data_receive.xml @@ -1,71 +1,78 @@ <?xml version="1.0" encoding="utf-8"?> -<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - android:fillViewport="true"> + android:orientation="vertical"> - <androidx.constraintlayout.widget.ConstraintLayout + <ScrollView android:layout_width="match_parent" - android:layout_height="wrap_content"> + android:layout_height="0dp" + android:layout_weight="1"> - <ImageView - android:id="@+id/imageView" - android:layout_width="@dimen/hero_rect_width" - android:layout_height="@dimen/hero_rect_height" - android:layout_marginHorizontal="@dimen/margin_xlarge" - android:layout_marginTop="@dimen/margin_xlarge" - app:layout_constraintBottom_toTopOf="@+id/progressBar" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintVertical_chainStyle="packed" - app:layout_constraintVertical_bias="0.25" - app:srcCompat="@drawable/ic_transfer_data_receive" - tools:ignore="ContentDescription" /> + <androidx.constraintlayout.widget.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> - <ProgressBar - android:id="@+id/progressBar" - style="?android:attr/progressBarStyleHorizontal" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginHorizontal="@dimen/margin_xlarge" - android:layout_marginTop="@dimen/margin_xlarge" - android:indeterminate="true" - android:visibility="invisible" - app:layout_constraintBottom_toTopOf="@+id/introTextView" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/imageView" - tools:visibility="visible" /> + <ImageView + android:id="@+id/imageView" + android:layout_width="@dimen/hero_rect_width" + android:layout_height="@dimen/hero_rect_height" + android:layout_marginHorizontal="@dimen/margin_xlarge" + android:layout_marginTop="@dimen/margin_xlarge" + app:layout_constraintBottom_toTopOf="@+id/progressBar" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.25" + app:layout_constraintVertical_chainStyle="packed" + app:srcCompat="@drawable/il_transfer_data_receive" + tools:ignore="ContentDescription" /> - <TextView - android:id="@+id/introTextView" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginHorizontal="@dimen/margin_xlarge" - android:layout_marginTop="@dimen/margin_xlarge" - android:layout_marginBottom="@dimen/margin_large" - android:text="@string/removable_drive_receive_intro" - android:textAppearance="@style/TextAppearance.MaterialComponents.Body1" - app:layout_constraintBottom_toTopOf="@+id/fileButton" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/progressBar" /> + <ProgressBar + android:id="@+id/progressBar" + style="?android:attr/progressBarStyleHorizontal" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginHorizontal="@dimen/margin_xlarge" + android:layout_marginTop="@dimen/margin_xlarge" + android:indeterminate="true" + android:visibility="gone" + app:layout_constraintBottom_toTopOf="@+id/introTextView" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/imageView" + tools:visibility="visible" /> - <Button - android:id="@+id/fileButton" - style="@style/BriarButton" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_margin="@dimen/margin_large" - android:enabled="false" - android:text="@string/removable_drive_receive_button" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" /> + <TextView + android:id="@+id/introTextView" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginHorizontal="@dimen/margin_xlarge" + android:layout_marginTop="@dimen/margin_xlarge" + android:layout_marginBottom="@dimen/margin_large" + android:text="@string/removable_drive_receive_intro" + android:textAppearance="@style/TextAppearance.MaterialComponents.Body1" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/progressBar" /> - </androidx.constraintlayout.widget.ConstraintLayout> + </androidx.constraintlayout.widget.ConstraintLayout> -</ScrollView> + </ScrollView> + + <Button + android:id="@+id/fileButton" + style="@style/BriarButton" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_margin="@dimen/margin_large" + android:enabled="false" + android:text="@string/removable_drive_receive_button" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" /> + +</LinearLayout>