diff --git a/briar-android/artwork/trust-indicator.svg b/briar-android/artwork/trust-indicator.svg new file mode 100644 index 0000000000000000000000000000000000000000..c8f94b6f65347cd2c7f195ebf7148db85ce80be4 --- /dev/null +++ b/briar-android/artwork/trust-indicator.svg @@ -0,0 +1,92 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<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:svg="http://www.w3.org/2000/svg" + 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="49" + height="20" + viewBox="0 0 49.000004 20" + id="svg2" + version="1.1" + inkscape:version="0.91 r13725" + sodipodi:docname="trust-indicator.svg"> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="15.839192" + inkscape:cx="19.828141" + inkscape:cy="4.1791031" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + units="px" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" + inkscape:window-width="1920" + inkscape:window-height="993" + inkscape:window-x="1440" + inkscape:window-y="0" + inkscape:window-maximized="1" /> + <metadata + id="metadata7"> + <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 /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-216.17711,-507.04154)"> + <g + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25px;line-height:125%;font-family:FreeSans;-inkscape-font-specification:FreeSans;letter-spacing:0px;word-spacing:0px;fill:#b7b7b7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + id="text4136" + transform="matrix(1,0,0,0.90497738,-18.96574,55.694085)"> + <path + d="m 250.64285,514.07648 0,-2.275 -2.55,0 0,-3.8 2.55,0 0,-2.275 -2.55,0 0,-4.225 -2.375,0 0,4.225 -3.15,0 0,-4.225 -2.375,0 0,4.225 -2.55,0 0,2.275 2.55,0 0,3.8 -2.55,0 0,2.275 2.55,0 0,4 2.375,0 0,-4 3.15,0 0,4 2.375,0 0,-4 2.55,0 z m -4.925,-2.275 -3.15,0 0,-3.8 3.15,0 0,3.8 z" + style="font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;font-family:Titillium;-inkscape-font-specification:'Titillium Semi-Bold';fill:#b7b7b7;fill-opacity:1" + id="path4745" + inkscape:connector-curvature="0" /> + </g> + <g + transform="matrix(1,0,0,0.90497738,-3.4657389,55.694085)" + id="g4755" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25px;line-height:125%;font-family:FreeSans;-inkscape-font-specification:FreeSans;letter-spacing:0px;word-spacing:0px;fill:#b7b7b7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"> + <path + inkscape:connector-curvature="0" + id="path4757" + style="font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;font-family:Titillium;-inkscape-font-specification:'Titillium Semi-Bold';fill:#b7b7b7;fill-opacity:1" + d="m 250.64285,514.07648 0,-2.275 -2.55,0 0,-3.8 2.55,0 0,-2.275 -2.55,0 0,-4.225 -2.375,0 0,4.225 -3.15,0 0,-4.225 -2.375,0 0,4.225 -2.55,0 0,2.275 2.55,0 0,3.8 -2.55,0 0,2.275 2.55,0 0,4 2.375,0 0,-4 3.15,0 0,4 2.375,0 0,-4 2.55,0 z m -4.925,-2.275 -3.15,0 0,-3.8 3.15,0 0,3.8 z" /> + </g> + <g + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25px;line-height:125%;font-family:FreeSans;-inkscape-font-specification:FreeSans;letter-spacing:0px;word-spacing:0px;fill:#b7b7b7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + id="g4139" + transform="matrix(1,0,0,0.90497738,12.034262,55.694085)"> + <path + d="m 250.64285,514.07648 0,-2.275 -2.55,0 0,-3.8 2.55,0 0,-2.275 -2.55,0 0,-4.225 -2.375,0 0,4.225 -3.15,0 0,-4.225 -2.375,0 0,4.225 -2.55,0 0,2.275 2.55,0 0,3.8 -2.55,0 0,2.275 2.55,0 0,4 2.375,0 0,-4 3.15,0 0,4 2.375,0 0,-4 2.55,0 z m -4.925,-2.275 -3.15,0 0,-3.8 3.15,0 0,3.8 z" + style="font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;font-family:Titillium;-inkscape-font-specification:'Titillium Semi-Bold';fill:#b7b7b7;fill-opacity:1" + id="path4141" + inkscape:connector-curvature="0" /> + </g> + </g> +</svg> diff --git a/briar-android/res/drawable-hdpi/identity_anonymous.png b/briar-android/res/drawable-hdpi/identity_anonymous.png deleted file mode 100644 index aa539d31b7aad168d93e4d2a45a28a6c3af18c7f..0000000000000000000000000000000000000000 Binary files a/briar-android/res/drawable-hdpi/identity_anonymous.png and /dev/null differ diff --git a/briar-android/res/drawable-hdpi/identity_unknown.png b/briar-android/res/drawable-hdpi/identity_unknown.png deleted file mode 100644 index b098e93aaea14e2c907662ff93b1f09f314f8bb3..0000000000000000000000000000000000000000 Binary files a/briar-android/res/drawable-hdpi/identity_unknown.png and /dev/null differ diff --git a/briar-android/res/drawable-hdpi/identity_unverified.png b/briar-android/res/drawable-hdpi/identity_unverified.png deleted file mode 100644 index f9e2486261cf419e1a629e08bf671dc5034334c5..0000000000000000000000000000000000000000 Binary files a/briar-android/res/drawable-hdpi/identity_unverified.png and /dev/null differ diff --git a/briar-android/res/drawable-hdpi/identity_verified.png b/briar-android/res/drawable-hdpi/identity_verified.png deleted file mode 100644 index 02e819fa1023e98c5124d9cdb17b9ee85629c766..0000000000000000000000000000000000000000 Binary files a/briar-android/res/drawable-hdpi/identity_verified.png and /dev/null differ diff --git a/briar-android/res/drawable-mdpi/identity_anonymous.png b/briar-android/res/drawable-mdpi/identity_anonymous.png deleted file mode 100644 index c91a016de8d6f692e8850f77156e4b0d5af82852..0000000000000000000000000000000000000000 Binary files a/briar-android/res/drawable-mdpi/identity_anonymous.png and /dev/null differ diff --git a/briar-android/res/drawable-mdpi/identity_unknown.png b/briar-android/res/drawable-mdpi/identity_unknown.png deleted file mode 100644 index 6ad29f8a0fa134f02856cdaf1de831cce8158b28..0000000000000000000000000000000000000000 Binary files a/briar-android/res/drawable-mdpi/identity_unknown.png and /dev/null differ diff --git a/briar-android/res/drawable-mdpi/identity_unverified.png b/briar-android/res/drawable-mdpi/identity_unverified.png deleted file mode 100644 index 9b8a13d4bfe10e6a710842ae079324dba4234c2b..0000000000000000000000000000000000000000 Binary files a/briar-android/res/drawable-mdpi/identity_unverified.png and /dev/null differ diff --git a/briar-android/res/drawable-mdpi/identity_verified.png b/briar-android/res/drawable-mdpi/identity_verified.png deleted file mode 100644 index 79cbaedc29a153ed0df16987b656ce659a876b1b..0000000000000000000000000000000000000000 Binary files a/briar-android/res/drawable-mdpi/identity_verified.png and /dev/null differ diff --git a/briar-android/res/drawable-xhdpi/identity_anonymous.png b/briar-android/res/drawable-xhdpi/identity_anonymous.png deleted file mode 100644 index c8f254fdac6b62ee348a82b48d5e166eeb6cfb11..0000000000000000000000000000000000000000 Binary files a/briar-android/res/drawable-xhdpi/identity_anonymous.png and /dev/null differ diff --git a/briar-android/res/drawable-xhdpi/identity_unknown.png b/briar-android/res/drawable-xhdpi/identity_unknown.png deleted file mode 100644 index e3b91a85841af0985cc2635ea3ec9e516719520e..0000000000000000000000000000000000000000 Binary files a/briar-android/res/drawable-xhdpi/identity_unknown.png and /dev/null differ diff --git a/briar-android/res/drawable-xhdpi/identity_unverified.png b/briar-android/res/drawable-xhdpi/identity_unverified.png deleted file mode 100644 index 85785c09cceadbf4357e8ac8e0f25366ab5c5f19..0000000000000000000000000000000000000000 Binary files a/briar-android/res/drawable-xhdpi/identity_unverified.png and /dev/null differ diff --git a/briar-android/res/drawable-xhdpi/identity_verified.png b/briar-android/res/drawable-xhdpi/identity_verified.png deleted file mode 100644 index d93ae1df22bc1530da908a3ad53d12b92e68da8d..0000000000000000000000000000000000000000 Binary files a/briar-android/res/drawable-xhdpi/identity_verified.png and /dev/null differ diff --git a/briar-android/res/drawable/trust_indicator_anonymous.xml b/briar-android/res/drawable/trust_indicator_anonymous.xml new file mode 100644 index 0000000000000000000000000000000000000000..99ccadd1bea9fae5483b327fcfc48f89d574638f --- /dev/null +++ b/briar-android/res/drawable/trust_indicator_anonymous.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="40dp" + android:height="15dp" + android:viewportHeight="20" + android:viewportWidth="49"> + <path + android:fillColor="#b7b7b7" + android:pathData="M15.5002,13.8797 L15.5002,11.8208 L12.9502,11.8208 L12.9502,8.38194 +L15.5002,8.38194 L15.5002,6.32312 L12.9502,6.32312 L12.9502,2.49959 +L10.5752,2.49959 L10.5752,6.32312 L7.42514,6.32312 L7.42514,2.49959 +L5.05014,2.49959 L5.05014,6.32312 L2.50016,6.32312 L2.50016,8.38194 +L5.05014,8.38194 L5.05014,11.8208 L2.50016,11.8208 L2.50016,13.8797 +L5.05014,13.8797 L5.05014,17.4996 L7.42514,17.4996 L7.42514,13.8797 +L10.5752,13.8797 L10.5752,17.4996 L12.9502,17.4996 L12.9502,13.8797 +L15.5002,13.8797 Z M10.5752,11.8208 L7.42514,11.8208 L7.42514,8.38194 +L10.5752,8.38194 L10.5752,11.8208 Z"/> + <path + android:fillColor="#b7b7b7" + android:pathData="M31.0002,13.8797 L31.0002,11.8208 L28.4502,11.8208 L28.4502,8.38194 +L31.0002,8.38194 L31.0002,6.32312 L28.4502,6.32312 L28.4502,2.49959 +L26.0752,2.49959 L26.0752,6.32312 L22.9251,6.32312 L22.9251,2.49959 +L20.5501,2.49959 L20.5501,6.32312 L18.0002,6.32312 L18.0002,8.38194 +L20.5501,8.38194 L20.5501,11.8208 L18.0002,11.8208 L18.0002,13.8797 +L20.5501,13.8797 L20.5501,17.4996 L22.9251,17.4996 L22.9251,13.8797 +L26.0752,13.8797 L26.0752,17.4996 L28.4502,17.4996 L28.4502,13.8797 +L31.0002,13.8797 Z M26.0752,11.8208 L22.9251,11.8208 L22.9251,8.38194 +L26.0752,8.38194 L26.0752,11.8208 Z"/> + <path + android:fillColor="#b7b7b7" + android:pathData="M46.5002,13.8797 L46.5002,11.8208 L43.9502,11.8208 L43.9502,8.38194 +L46.5002,8.38194 L46.5002,6.32312 L43.9502,6.32312 L43.9502,2.49959 +L41.5752,2.49959 L41.5752,6.32312 L38.4251,6.32312 L38.4251,2.49959 +L36.0501,2.49959 L36.0501,6.32312 L33.5002,6.32312 L33.5002,8.38194 +L36.0501,8.38194 L36.0501,11.8208 L33.5002,11.8208 L33.5002,13.8797 +L36.0501,13.8797 L36.0501,17.4996 L38.4251,17.4996 L38.4251,13.8797 +L41.5752,13.8797 L41.5752,17.4996 L43.9502,17.4996 L43.9502,13.8797 +L46.5002,13.8797 Z M41.5752,11.8208 L38.4251,11.8208 L38.4251,8.38194 +L41.5752,8.38194 L41.5752,11.8208 Z"/> +</vector> \ No newline at end of file diff --git a/briar-android/res/drawable/trust_indicator_unknown.xml b/briar-android/res/drawable/trust_indicator_unknown.xml new file mode 100644 index 0000000000000000000000000000000000000000..ec65b5a5528a0f636c76c6f990c0e35b91afbfbb --- /dev/null +++ b/briar-android/res/drawable/trust_indicator_unknown.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="40dp" + android:height="15dp" + android:viewportHeight="20" + android:viewportWidth="49"> + <path + android:fillColor="#c34032" + android:pathData="M15.5002,13.8797 L15.5002,11.8208 L12.9502,11.8208 L12.9502,8.38194 +L15.5002,8.38194 L15.5002,6.32312 L12.9502,6.32312 L12.9502,2.49959 +L10.5752,2.49959 L10.5752,6.32312 L7.42514,6.32312 L7.42514,2.49959 +L5.05014,2.49959 L5.05014,6.32312 L2.50016,6.32312 L2.50016,8.38194 +L5.05014,8.38194 L5.05014,11.8208 L2.50016,11.8208 L2.50016,13.8797 +L5.05014,13.8797 L5.05014,17.4996 L7.42514,17.4996 L7.42514,13.8797 +L10.5752,13.8797 L10.5752,17.4996 L12.9502,17.4996 L12.9502,13.8797 +L15.5002,13.8797 Z M10.5752,11.8208 L7.42514,11.8208 L7.42514,8.38194 +L10.5752,8.38194 L10.5752,11.8208 Z"/> + <path + android:fillColor="#b7b7b7" + android:pathData="M31.0002,13.8797 L31.0002,11.8208 L28.4502,11.8208 L28.4502,8.38194 +L31.0002,8.38194 L31.0002,6.32312 L28.4502,6.32312 L28.4502,2.49959 +L26.0752,2.49959 L26.0752,6.32312 L22.9251,6.32312 L22.9251,2.49959 +L20.5501,2.49959 L20.5501,6.32312 L18.0002,6.32312 L18.0002,8.38194 +L20.5501,8.38194 L20.5501,11.8208 L18.0002,11.8208 L18.0002,13.8797 +L20.5501,13.8797 L20.5501,17.4996 L22.9251,17.4996 L22.9251,13.8797 +L26.0752,13.8797 L26.0752,17.4996 L28.4502,17.4996 L28.4502,13.8797 +L31.0002,13.8797 Z M26.0752,11.8208 L22.9251,11.8208 L22.9251,8.38194 +L26.0752,8.38194 L26.0752,11.8208 Z"/> + <path + android:fillColor="#b7b7b7" + android:pathData="M46.5002,13.8797 L46.5002,11.8208 L43.9502,11.8208 L43.9502,8.38194 +L46.5002,8.38194 L46.5002,6.32312 L43.9502,6.32312 L43.9502,2.49959 +L41.5752,2.49959 L41.5752,6.32312 L38.4251,6.32312 L38.4251,2.49959 +L36.0501,2.49959 L36.0501,6.32312 L33.5002,6.32312 L33.5002,8.38194 +L36.0501,8.38194 L36.0501,11.8208 L33.5002,11.8208 L33.5002,13.8797 +L36.0501,13.8797 L36.0501,17.4996 L38.4251,17.4996 L38.4251,13.8797 +L41.5752,13.8797 L41.5752,17.4996 L43.9502,17.4996 L43.9502,13.8797 +L46.5002,13.8797 Z M41.5752,11.8208 L38.4251,11.8208 L38.4251,8.38194 +L41.5752,8.38194 L41.5752,11.8208 Z"/> +</vector> \ No newline at end of file diff --git a/briar-android/res/drawable/trust_indicator_unverified.xml b/briar-android/res/drawable/trust_indicator_unverified.xml new file mode 100644 index 0000000000000000000000000000000000000000..3697685b0666be83b532c311431426749aa993e7 --- /dev/null +++ b/briar-android/res/drawable/trust_indicator_unverified.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="40dp" + android:height="15dp" + android:viewportHeight="20" + android:viewportWidth="49"> + <path + android:fillColor="#fcd53a" + android:pathData="M15.5002,13.8797 L15.5002,11.8208 L12.9502,11.8208 L12.9502,8.38194 +L15.5002,8.38194 L15.5002,6.32312 L12.9502,6.32312 L12.9502,2.49959 +L10.5752,2.49959 L10.5752,6.32312 L7.42514,6.32312 L7.42514,2.49959 +L5.05014,2.49959 L5.05014,6.32312 L2.50016,6.32312 L2.50016,8.38194 +L5.05014,8.38194 L5.05014,11.8208 L2.50016,11.8208 L2.50016,13.8797 +L5.05014,13.8797 L5.05014,17.4996 L7.42514,17.4996 L7.42514,13.8797 +L10.5752,13.8797 L10.5752,17.4996 L12.9502,17.4996 L12.9502,13.8797 +L15.5002,13.8797 Z M10.5752,11.8208 L7.42514,11.8208 L7.42514,8.38194 +L10.5752,8.38194 L10.5752,11.8208 Z"/> + <path + android:fillColor="#fcd53a" + android:pathData="M31.0002,13.8797 L31.0002,11.8208 L28.4502,11.8208 L28.4502,8.38194 +L31.0002,8.38194 L31.0002,6.32312 L28.4502,6.32312 L28.4502,2.49959 +L26.0752,2.49959 L26.0752,6.32312 L22.9251,6.32312 L22.9251,2.49959 +L20.5501,2.49959 L20.5501,6.32312 L18.0002,6.32312 L18.0002,8.38194 +L20.5501,8.38194 L20.5501,11.8208 L18.0002,11.8208 L18.0002,13.8797 +L20.5501,13.8797 L20.5501,17.4996 L22.9251,17.4996 L22.9251,13.8797 +L26.0752,13.8797 L26.0752,17.4996 L28.4502,17.4996 L28.4502,13.8797 +L31.0002,13.8797 Z M26.0752,11.8208 L22.9251,11.8208 L22.9251,8.38194 +L26.0752,8.38194 L26.0752,11.8208 Z"/> + <path + android:fillColor="#b7b7b7" + android:pathData="M46.5002,13.8797 L46.5002,11.8208 L43.9502,11.8208 L43.9502,8.38194 +L46.5002,8.38194 L46.5002,6.32312 L43.9502,6.32312 L43.9502,2.49959 +L41.5752,2.49959 L41.5752,6.32312 L38.4251,6.32312 L38.4251,2.49959 +L36.0501,2.49959 L36.0501,6.32312 L33.5002,6.32312 L33.5002,8.38194 +L36.0501,8.38194 L36.0501,11.8208 L33.5002,11.8208 L33.5002,13.8797 +L36.0501,13.8797 L36.0501,17.4996 L38.4251,17.4996 L38.4251,13.8797 +L41.5752,13.8797 L41.5752,17.4996 L43.9502,17.4996 L43.9502,13.8797 +L46.5002,13.8797 Z M41.5752,11.8208 L38.4251,11.8208 L38.4251,8.38194 +L41.5752,8.38194 L41.5752,11.8208 Z"/> +</vector> \ No newline at end of file diff --git a/briar-android/res/drawable/trust_indicator_verified.xml b/briar-android/res/drawable/trust_indicator_verified.xml new file mode 100644 index 0000000000000000000000000000000000000000..40a8ff035f262a9294255d6279bae1a0de241240 --- /dev/null +++ b/briar-android/res/drawable/trust_indicator_verified.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="40dp" + android:height="15dp" + android:viewportHeight="20" + android:viewportWidth="49"> + <path + android:fillColor="#7fac49" + android:pathData="M15.5002,13.8797 L15.5002,11.8208 L12.9502,11.8208 L12.9502,8.38194 +L15.5002,8.38194 L15.5002,6.32312 L12.9502,6.32312 L12.9502,2.49959 +L10.5752,2.49959 L10.5752,6.32312 L7.42514,6.32312 L7.42514,2.49959 +L5.05014,2.49959 L5.05014,6.32312 L2.50016,6.32312 L2.50016,8.38194 +L5.05014,8.38194 L5.05014,11.8208 L2.50016,11.8208 L2.50016,13.8797 +L5.05014,13.8797 L5.05014,17.4996 L7.42514,17.4996 L7.42514,13.8797 +L10.5752,13.8797 L10.5752,17.4996 L12.9502,17.4996 L12.9502,13.8797 +L15.5002,13.8797 Z M10.5752,11.8208 L7.42514,11.8208 L7.42514,8.38194 +L10.5752,8.38194 L10.5752,11.8208 Z"/> + <path + android:fillColor="#7fac49" + android:pathData="M31.0002,13.8797 L31.0002,11.8208 L28.4502,11.8208 L28.4502,8.38194 +L31.0002,8.38194 L31.0002,6.32312 L28.4502,6.32312 L28.4502,2.49959 +L26.0752,2.49959 L26.0752,6.32312 L22.9251,6.32312 L22.9251,2.49959 +L20.5501,2.49959 L20.5501,6.32312 L18.0002,6.32312 L18.0002,8.38194 +L20.5501,8.38194 L20.5501,11.8208 L18.0002,11.8208 L18.0002,13.8797 +L20.5501,13.8797 L20.5501,17.4996 L22.9251,17.4996 L22.9251,13.8797 +L26.0752,13.8797 L26.0752,17.4996 L28.4502,17.4996 L28.4502,13.8797 +L31.0002,13.8797 Z M26.0752,11.8208 L22.9251,11.8208 L22.9251,8.38194 +L26.0752,8.38194 L26.0752,11.8208 Z"/> + <path + android:fillColor="#7fac49" + android:pathData="M46.5002,13.8797 L46.5002,11.8208 L43.9502,11.8208 L43.9502,8.38194 +L46.5002,8.38194 L46.5002,6.32312 L43.9502,6.32312 L43.9502,2.49959 +L41.5752,2.49959 L41.5752,6.32312 L38.4251,6.32312 L38.4251,2.49959 +L36.0501,2.49959 L36.0501,6.32312 L33.5002,6.32312 L33.5002,8.38194 +L36.0501,8.38194 L36.0501,11.8208 L33.5002,11.8208 L33.5002,13.8797 +L36.0501,13.8797 L36.0501,17.4996 L38.4251,17.4996 L38.4251,13.8797 +L41.5752,13.8797 L41.5752,17.4996 L43.9502,17.4996 L43.9502,13.8797 +L46.5002,13.8797 Z M41.5752,11.8208 L38.4251,11.8208 L38.4251,8.38194 +L41.5752,8.38194 L41.5752,11.8208 Z"/> +</vector> \ No newline at end of file diff --git a/briar-android/res/layout/author_view.xml b/briar-android/res/layout/author_view.xml deleted file mode 100644 index 4fb0b9d6b458428cf493759548ea4df8d582a540..0000000000000000000000000000000000000000 --- a/briar-android/res/layout/author_view.xml +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<RelativeLayout - xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:tools="http://schemas.android.com/tools" - android:layout_width="match_parent" - android:layout_height="match_parent"> - - <de.hdodenhof.circleimageview.CircleImageView - android:id="@+id/avatarView" - style="@style/BriarAvatar" - android:layout_width="@dimen/listitem_picture_size" - android:layout_height="@dimen/listitem_picture_size" - android:layout_centerVertical="true" - android:layout_marginLeft="@dimen/listitem_horizontal_margin" - android:layout_marginStart="@dimen/listitem_horizontal_margin" - tools:src="@drawable/ic_launcher"/> - - <ImageView - android:id="@+id/statusView" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentEnd="true" - android:layout_alignParentRight="true" - android:layout_centerVertical="true" - android:src="@drawable/identity_anonymous"/> - - <TextView - android:id="@+id/nameView" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentLeft="true" - android:layout_alignParentStart="true" - android:layout_centerVertical="true" - android:layout_marginEnd="@dimen/margin_small" - android:layout_marginLeft="@dimen/listitem_text_left_margin" - android:layout_marginRight="@dimen/margin_small" - android:layout_marginStart="@dimen/listitem_text_left_margin" - android:layout_toLeftOf="@id/statusView" - android:layout_toStartOf="@id/statusView" - android:ellipsize="end" - android:singleLine="true" - android:text="@string/anonymous" - android:textSize="@dimen/text_size_medium"/> - -</RelativeLayout> \ No newline at end of file diff --git a/briar-android/res/layout/forum_discussion_cell.xml b/briar-android/res/layout/forum_discussion_cell.xml index 57383a720623ffc952528c8ab2eadabe2d6b5ae1..e8fbf8aa3707236c27602375676b7c50802897bc 100644 --- a/briar-android/res/layout/forum_discussion_cell.xml +++ b/briar-android/res/layout/forum_discussion_cell.xml @@ -131,6 +131,9 @@ android:layout_height="wrap_content" android:layout_alignBaseline="@id/btn_reply" android:layout_toLeftOf="@id/btn_reply" + android:layout_toRightOf="@+id/trustIndicator" + android:gravity="right|end" + android:maxLines="1" android:padding="@dimen/margin_medium" android:textSize="@dimen/text_size_tiny" tools:text="2 replies"/> @@ -140,13 +143,23 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@id/replies" - android:layout_toLeftOf="@id/replies" android:layout_toRightOf="@id/avatar" android:ellipsize="end" android:maxLines="1" android:textSize="@dimen/text_size_tiny" tools:text="09:09 John Smith"/> + <org.briarproject.android.util.TrustIndicatorView + android:id="@+id/trustIndicator" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignBottom="@+id/date" + android:layout_alignTop="@+id/date" + android:layout_marginLeft="@dimen/margin_small" + android:layout_marginStart="@dimen/margin_small" + android:layout_toRightOf="@+id/date" + tools:src="@drawable/trust_indicator_verified"/> + <View android:id="@+id/bottom_divider" style="@style/Divider.ForumList" diff --git a/briar-android/src/org/briarproject/android/forum/ForumActivity.java b/briar-android/src/org/briarproject/android/forum/ForumActivity.java index 712a7f3fe24714519c2541c9d44fe0a83ed6d6c8..921f26ec375390695a43779cbdae68a62e5bfdab 100644 --- a/briar-android/src/org/briarproject/android/forum/ForumActivity.java +++ b/briar-android/src/org/briarproject/android/forum/ForumActivity.java @@ -29,6 +29,7 @@ import org.briarproject.android.BriarActivity; import org.briarproject.android.api.AndroidNotificationManager; import org.briarproject.android.controller.handler.UiResultHandler; import org.briarproject.android.util.BriarRecyclerView; +import org.briarproject.android.util.TrustIndicatorView; import org.briarproject.api.sync.GroupId; import org.briarproject.util.StringUtils; @@ -275,6 +276,7 @@ public class ForumActivity extends BriarActivity implements public final TextView textView, lvlText, dateText, repliesText; public final View[] lvls; public final ImageView avatar; + final TrustIndicatorView trust; public final View chevron, replyButton; public final ViewGroup cell; public final View bottomDivider; @@ -295,6 +297,7 @@ public class ForumActivity extends BriarActivity implements lvls[i] = v.findViewById(nestedLineIds[i]); } avatar = (ImageView) v.findViewById(R.id.avatar); + trust = (TrustIndicatorView) v.findViewById(R.id.trustIndicator); chevron = v.findViewById(R.id.chevron); replyButton = v.findViewById(R.id.btn_reply); cell = (ViewGroup) v.findViewById(R.id.forum_cell); @@ -513,6 +516,7 @@ public class ForumActivity extends BriarActivity implements ui.dateText.setText(DateUtils .getRelativeTimeSpanString(ForumActivity.this, data.getTimestamp()) + " " + data.getAuthor()); + ui.trust.setTrustLevel(data.getStatus()); int replies = getReplyCount(data); if (replies == 0) { diff --git a/briar-android/src/org/briarproject/android/forum/ForumAdapter.java b/briar-android/src/org/briarproject/android/forum/ForumAdapter.java deleted file mode 100644 index df2e4e425fe795756948ed1dc03f4cfd2a64d2b9..0000000000000000000000000000000000000000 --- a/briar-android/src/org/briarproject/android/forum/ForumAdapter.java +++ /dev/null @@ -1,93 +0,0 @@ -package org.briarproject.android.forum; - -import android.content.Context; -import android.content.res.Resources; -import android.text.format.DateUtils; -import android.view.View; -import android.view.ViewGroup; -import android.widget.ArrayAdapter; -import android.widget.ImageButton; -import android.widget.LinearLayout; -import android.widget.TextView; - -import org.briarproject.R; -import org.briarproject.android.util.AuthorView; -import org.briarproject.android.util.LayoutUtils; -import org.briarproject.api.forum.ForumPostHeader; -import org.briarproject.api.identity.Author; -import org.briarproject.util.StringUtils; - -import java.util.ArrayList; - -import static android.view.Gravity.CENTER_HORIZONTAL; -import static android.view.Gravity.CENTER_VERTICAL; -import static android.widget.LinearLayout.HORIZONTAL; -import static android.widget.LinearLayout.VERTICAL; -import static org.briarproject.android.util.CommonLayoutParams.WRAP_WRAP_1; - -class ForumAdapter extends ArrayAdapter<ForumItem> { - - private final int pad; - - ForumAdapter(Context ctx) { - super(ctx, android.R.layout.simple_expandable_list_item_1, - new ArrayList<ForumItem>()); - pad = LayoutUtils.getPadding(ctx); - } - - @Override - public View getView(int position, View convertView, ViewGroup parent) { - ForumItem item = getItem(position); - ForumPostHeader header = item.getHeader(); - Context ctx = getContext(); - Resources res = ctx.getResources(); - - LinearLayout layout = new LinearLayout(ctx); - layout.setOrientation(VERTICAL); - layout.setGravity(CENTER_HORIZONTAL); - if (!header.isRead()) - layout.setBackgroundColor(res.getColor(R.color.unread_background)); - - LinearLayout headerLayout = new LinearLayout(ctx); - headerLayout.setOrientation(HORIZONTAL); - headerLayout.setGravity(CENTER_VERTICAL); - - AuthorView authorView = new AuthorView(ctx); - authorView.setLayoutParams(WRAP_WRAP_1); - authorView.setPadding(0, pad, pad, pad); - Author author = header.getAuthor(); - if (author == null) { - authorView.init(null, null, header.getAuthorStatus()); - } else { - authorView.init(author.getName(), author.getId(), - header.getAuthorStatus()); - } - headerLayout.addView(authorView); - - TextView date = new TextView(ctx); - date.setPadding(pad, pad, pad, pad); - long timestamp = header.getTimestamp(); - date.setText(DateUtils.getRelativeTimeSpanString(ctx, timestamp)); - headerLayout.addView(date); - layout.addView(headerLayout); - - if (item.getBody() == null) { - TextView ellipsis = new TextView(ctx); - ellipsis.setPadding(pad, 0, pad, pad); - ellipsis.setText("\u2026"); - layout.addView(ellipsis); - } else if (header.getContentType().equals("text/plain")) { - TextView text = new TextView(ctx); - text.setPadding(pad, 0, pad, pad); - text.setText(StringUtils.fromUtf8(item.getBody())); - layout.addView(text); - } else { - ImageButton attachment = new ImageButton(ctx); - attachment.setPadding(pad, 0, pad, pad); - attachment.setImageResource(R.drawable.content_attachment); - layout.addView(attachment); - } - - return layout; - } -} \ No newline at end of file diff --git a/briar-android/src/org/briarproject/android/forum/ForumEntry.java b/briar-android/src/org/briarproject/android/forum/ForumEntry.java index c3c668f7a052d46c0cadefd3e05e1d524c960fd2..a24d94bbcf457d57eb5dc140878895f24c734a28 100644 --- a/briar-android/src/org/briarproject/android/forum/ForumEntry.java +++ b/briar-android/src/org/briarproject/android/forum/ForumEntry.java @@ -1,6 +1,7 @@ package org.briarproject.android.forum; import org.briarproject.api.forum.ForumPostHeader; +import org.briarproject.api.identity.Author.Status; import org.briarproject.api.identity.AuthorId; import org.briarproject.api.sync.MessageId; @@ -12,23 +13,25 @@ public class ForumEntry { private final long timestamp; private final String author; private final AuthorId authorId; + private Status status; private boolean isShowingDescendants = true; private boolean isRead = true; public ForumEntry(ForumPostHeader h, String text, int level) { this(h.getId(), text, level, h.getTimestamp(), h.getAuthor().getName(), - h.getAuthor().getId()); + h.getAuthor().getId(), h.getAuthorStatus()); this.isRead = h.isRead(); } public ForumEntry(MessageId messageId, String text, int level, - long timestamp, String author, AuthorId authorId) { + long timestamp, String author, AuthorId authorId, Status status) { this.messageId = messageId; this.text = text; this.level = level; this.timestamp = timestamp; this.author = author; this.authorId = authorId; + this.status = status; } public String getText() { @@ -51,6 +54,10 @@ public class ForumEntry { return authorId; } + public Status getStatus() { + return status; + } + public boolean isShowingDescendants() { return isShowingDescendants; } diff --git a/briar-android/src/org/briarproject/android/forum/ForumTestControllerImpl.java b/briar-android/src/org/briarproject/android/forum/ForumTestControllerImpl.java index ec1470ed85ceeaa6a34436bd6b5b0cc1a1c3de5d..2aef2ae5e121fe61e60789800aea97ac75e51a0b 100644 --- a/briar-android/src/org/briarproject/android/forum/ForumTestControllerImpl.java +++ b/briar-android/src/org/briarproject/android/forum/ForumTestControllerImpl.java @@ -15,6 +15,8 @@ import java.util.logging.Logger; import javax.inject.Inject; +import static org.briarproject.api.identity.Author.Status.UNVERIFIED; + public class ForumTestControllerImpl implements ForumController { private static final Logger LOG = @@ -115,7 +117,7 @@ public class ForumTestControllerImpl implements ForumController { forumEntries[e] = new ForumEntry(new MessageId(b), SAGA.substring(0, i[e]), l[e], timestamp, AUTHORS[authorIndex], - AUTHOR_ID[authorIndex]); + AUTHOR_ID[authorIndex], UNVERIFIED); } LOG.info("forum entries: " + forumEntries.length); resultHandler.onResult(true); diff --git a/briar-android/src/org/briarproject/android/util/AuthorView.java b/briar-android/src/org/briarproject/android/util/AuthorView.java deleted file mode 100644 index 4b11d51e8de38760b7ecff84a9790ec06b0793d4..0000000000000000000000000000000000000000 --- a/briar-android/src/org/briarproject/android/util/AuthorView.java +++ /dev/null @@ -1,81 +0,0 @@ -package org.briarproject.android.util; - -import android.content.Context; -import android.util.AttributeSet; -import android.view.LayoutInflater; -import android.view.View; -import android.widget.FrameLayout; -import android.widget.ImageView; -import android.widget.TextView; - -import org.briarproject.R; -import org.briarproject.api.crypto.CryptoComponent; -import org.briarproject.api.identity.Author; -import org.briarproject.api.identity.AuthorId; - -import javax.inject.Inject; - -import im.delight.android.identicons.IdenticonDrawable; - -public class AuthorView extends FrameLayout { - - private ImageView avatarView; - private TextView nameView; - private ImageView statusView; - - public AuthorView(Context ctx) { - super(ctx); - - initViews(); - } - - public AuthorView(Context context, AttributeSet attrs) { - super(context, attrs); - - initViews(); - } - - public AuthorView(Context context, AttributeSet attrs, - int defStyle) { - super(context, attrs, defStyle); - - initViews(); - } - - private void initViews() { - if (isInEditMode()) - return; - - View v = LayoutInflater.from(getContext()).inflate( - R.layout.author_view, this, true); - - avatarView = (ImageView) v.findViewById(R.id.avatarView); - nameView = (TextView) v.findViewById(R.id.nameView); - statusView = (ImageView) v.findViewById(R.id.statusView); - } - - public void init(String name, AuthorId id, Author.Status status) { - if (name == null) { - nameView.setText(R.string.anonymous); - } else { - nameView.setText(name); - avatarView.setImageDrawable( - new IdenticonDrawable(id.getBytes())); - } - - switch(status) { - case ANONYMOUS: - statusView.setImageResource(R.drawable.identity_anonymous); - break; - case UNKNOWN: - statusView.setImageResource(R.drawable.identity_unknown); - break; - case UNVERIFIED: - statusView.setImageResource(R.drawable.identity_unverified); - break; - case VERIFIED: - statusView.setImageResource(R.drawable.identity_verified); - break; - } - } -} diff --git a/briar-android/src/org/briarproject/android/util/TrustIndicatorView.java b/briar-android/src/org/briarproject/android/util/TrustIndicatorView.java new file mode 100644 index 0000000000000000000000000000000000000000..ce01bf301e34e1176d307e81e23ef80dd226fb62 --- /dev/null +++ b/briar-android/src/org/briarproject/android/util/TrustIndicatorView.java @@ -0,0 +1,44 @@ +package org.briarproject.android.util; + +import android.content.Context; +import android.support.v4.content.ContextCompat; +import android.util.AttributeSet; +import android.widget.ImageView; + +import org.briarproject.R; +import org.briarproject.api.identity.Author.Status; + +public class TrustIndicatorView extends ImageView { + + public TrustIndicatorView(Context context) { + super(context); + } + + public TrustIndicatorView(Context context, AttributeSet attrs) { + super(context, attrs); + } + + public TrustIndicatorView(Context context, AttributeSet attrs, + int defStyleAttr) { + super(context, attrs, defStyleAttr); + } + + public void setTrustLevel(Status status) { + int res; + switch (status) { + case ANONYMOUS: + res = R.drawable.trust_indicator_anonymous; + break; + case UNVERIFIED: + res = R.drawable.trust_indicator_unverified; + break; + case VERIFIED: + res = R.drawable.trust_indicator_verified; + break; + default: + res = R.drawable.trust_indicator_unknown; + } + setImageDrawable(ContextCompat.getDrawable(getContext(), res)); + } + +}