mirror of
https://github.com/gsantner/dandelion
synced 2024-11-22 12:22:08 +01:00
Merge pull request #79 from Diaspora-for-Android/poddy_as_podsource
Use Poddy as podsource
This commit is contained in:
commit
72189af353
80 changed files with 2976 additions and 570 deletions
|
@ -6,7 +6,7 @@ android:
|
||||||
- tools
|
- tools
|
||||||
- tools # TODO https://github.com/travis-ci/travis-ci/issues/6193
|
- tools # TODO https://github.com/travis-ci/travis-ci/issues/6193
|
||||||
- platform-tools
|
- platform-tools
|
||||||
- build-tools-24.0.2
|
- build-tools-24.0.3
|
||||||
- android-24
|
- android-24
|
||||||
- extra-android-m2repository
|
- extra-android-m2repository
|
||||||
before_cache:
|
before_cache:
|
||||||
|
|
|
@ -3,7 +3,7 @@ apply plugin: 'android-apt'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 24
|
compileSdkVersion 24
|
||||||
buildToolsVersion "24.0.2"
|
buildToolsVersion "24.0.3"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.github.dfa.diaspora_android"
|
applicationId "com.github.dfa.diaspora_android"
|
||||||
|
|
|
@ -66,7 +66,15 @@
|
||||||
<category android:name="android.intent.category.BROWSABLE" />
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
|
||||||
<!--@@@ PODLIST START-->
|
<!--@@@ PODLIST START-->
|
||||||
|
<data android:host="joindiaspora.com" android:scheme="https" />
|
||||||
|
<data android:host="diasporaaqmjixh5.onion" android:scheme="http" />
|
||||||
|
<data android:host="pod.geraspora.de" android:scheme="https" />
|
||||||
|
<data android:host="diasp.org" android:scheme="https" />
|
||||||
|
<data android:host="framasphere.org" android:scheme="https" />
|
||||||
|
<data android:host="nerdpol.ch" android:scheme="https" />
|
||||||
|
<data android:host="despora.de" android:scheme="https" />
|
||||||
|
<data android:host="sechat.org" android:scheme="https" />
|
||||||
|
<data android:host="sechatqpscuj2npx.onion" android:scheme="http" />
|
||||||
<data android:host="austriapod.at" android:scheme="https" />
|
<data android:host="austriapod.at" android:scheme="https" />
|
||||||
<data android:host="berdaguermontes.eu" android:scheme="https" />
|
<data android:host="berdaguermontes.eu" android:scheme="https" />
|
||||||
<data android:host="berlinspora.de" android:scheme="https" />
|
<data android:host="berlinspora.de" android:scheme="https" />
|
||||||
|
@ -74,7 +82,6 @@
|
||||||
<data android:host="community.kanalinseln.de" android:scheme="https" />
|
<data android:host="community.kanalinseln.de" android:scheme="https" />
|
||||||
<data android:host="cryptospora.net" android:scheme="https" />
|
<data android:host="cryptospora.net" android:scheme="https" />
|
||||||
<data android:host="d.consumium.org" android:scheme="https" />
|
<data android:host="d.consumium.org" android:scheme="https" />
|
||||||
<data android:host="despora.de" android:scheme="https" />
|
|
||||||
<data android:host="dia.manuelbichler.at" android:scheme="https" />
|
<data android:host="dia.manuelbichler.at" android:scheme="https" />
|
||||||
<data android:host="dia.myocastor.de" android:scheme="https" />
|
<data android:host="dia.myocastor.de" android:scheme="https" />
|
||||||
<data android:host="diapod.net" android:scheme="https" />
|
<data android:host="diapod.net" android:scheme="https" />
|
||||||
|
@ -86,17 +93,16 @@
|
||||||
<data android:host="diasp.eu.com" android:scheme="https" />
|
<data android:host="diasp.eu.com" android:scheme="https" />
|
||||||
<data android:host="diasp.nl" android:scheme="https" />
|
<data android:host="diasp.nl" android:scheme="https" />
|
||||||
<data android:host="diaspod.de" android:scheme="https" />
|
<data android:host="diaspod.de" android:scheme="https" />
|
||||||
|
<data android:host="diaspora-fr.org" android:scheme="https" />
|
||||||
<data android:host="diaspora.alfter.us" android:scheme="https" />
|
<data android:host="diaspora.alfter.us" android:scheme="https" />
|
||||||
<data android:host="diaspora.bohramt.de" android:scheme="https" />
|
<data android:host="diaspora.bohramt.de" android:scheme="https" />
|
||||||
<data android:host="diasporabrazil.org" android:scheme="https" />
|
|
||||||
<data android:host="diasporabr.com.br" android:scheme="https" />
|
|
||||||
<data android:host="diaspora.com.ar" android:scheme="https" />
|
<data android:host="diaspora.com.ar" android:scheme="https" />
|
||||||
<data android:host="diaspora.deadhexagon.com" android:scheme="https" />
|
<data android:host="diaspora.deadhexagon.com" android:scheme="https" />
|
||||||
|
<data android:host="diaspora.digi-merc.org" android:scheme="https" />
|
||||||
<data android:host="diaspora.digitalismus.org" android:scheme="https" />
|
<data android:host="diaspora.digitalismus.org" android:scheme="https" />
|
||||||
<data android:host="diaspora.dorf-post.de" android:scheme="https" />
|
<data android:host="diaspora.dorf-post.de" android:scheme="https" />
|
||||||
<data android:host="diaspora.espiritolivre.org" android:scheme="https" />
|
<data android:host="diaspora.espiritolivre.org" android:scheme="https" />
|
||||||
<data android:host="diaspora.fr33.co" android:scheme="https" />
|
<data android:host="diaspora.fr33.co" android:scheme="https" />
|
||||||
<data android:host="diaspora-fr.org" android:scheme="https" />
|
|
||||||
<data android:host="diaspora.horwood.biz" android:scheme="https" />
|
<data android:host="diaspora.horwood.biz" android:scheme="https" />
|
||||||
<data android:host="diaspora.hzsogood.net" android:scheme="https" />
|
<data android:host="diaspora.hzsogood.net" android:scheme="https" />
|
||||||
<data android:host="diaspora.kapper.net" android:scheme="https" />
|
<data android:host="diaspora.kapper.net" android:scheme="https" />
|
||||||
|
@ -104,15 +110,14 @@
|
||||||
<data android:host="diaspora.kosebamse.com" android:scheme="https" />
|
<data android:host="diaspora.kosebamse.com" android:scheme="https" />
|
||||||
<data android:host="diaspora.lebarjack.com" android:scheme="https" />
|
<data android:host="diaspora.lebarjack.com" android:scheme="https" />
|
||||||
<data android:host="diaspora.mazi.tk" android:scheme="https" />
|
<data android:host="diaspora.mazi.tk" android:scheme="https" />
|
||||||
|
<data android:host="diaspora.microdata.co.uk" android:scheme="https" />
|
||||||
<data android:host="diaspora.moosje.nl" android:scheme="https" />
|
<data android:host="diaspora.moosje.nl" android:scheme="https" />
|
||||||
<data android:host="diaspora.net.gr" android:scheme="https" />
|
<data android:host="diaspora.net.gr" android:scheme="https" />
|
||||||
<data android:host="diasporanet.tk" android:scheme="https" />
|
|
||||||
<data android:host="diaspora.permutationsofchaos.com" android:scheme="https" />
|
<data android:host="diaspora.permutationsofchaos.com" android:scheme="https" />
|
||||||
<data android:host="diaspora.pimpmypony.eu" android:scheme="https" />
|
<data android:host="diaspora.pimpmypony.eu" android:scheme="https" />
|
||||||
<data android:host="diaspora.pingupod.de" android:scheme="https" />
|
<data android:host="diaspora.pingupod.de" android:scheme="https" />
|
||||||
<data android:host="diaspora.podzimek.org" android:scheme="https" />
|
<data android:host="diaspora.podzimek.org" android:scheme="https" />
|
||||||
<data android:host="diaspora.poleni.com" android:scheme="https" />
|
<data android:host="diaspora.poleni.com" android:scheme="https" />
|
||||||
<data android:host="diasporapr.tk" android:scheme="https" />
|
|
||||||
<data android:host="diaspora.psyco.fr" android:scheme="https" />
|
<data android:host="diaspora.psyco.fr" android:scheme="https" />
|
||||||
<data android:host="diaspora.punkbeer.me" android:scheme="https" />
|
<data android:host="diaspora.punkbeer.me" android:scheme="https" />
|
||||||
<data android:host="diaspora.raven-ip.com" android:scheme="https" />
|
<data android:host="diaspora.raven-ip.com" android:scheme="https" />
|
||||||
|
@ -126,10 +131,14 @@
|
||||||
<data android:host="diaspora.u4u.org" android:scheme="https" />
|
<data android:host="diaspora.u4u.org" android:scheme="https" />
|
||||||
<data android:host="diaspora.undernet.uy" android:scheme="https" />
|
<data android:host="diaspora.undernet.uy" android:scheme="https" />
|
||||||
<data android:host="diaspora.unixcorn.org" android:scheme="https" />
|
<data android:host="diaspora.unixcorn.org" android:scheme="https" />
|
||||||
<data android:host="diasporausa.com" android:scheme="https" />
|
|
||||||
<data android:host="diaspora.weenmebrown.com" android:scheme="https" />
|
<data android:host="diaspora.weenmebrown.com" android:scheme="https" />
|
||||||
<data android:host="diaspora.xcelor8.com" android:scheme="https" />
|
<data android:host="diaspora.xcelor8.com" android:scheme="https" />
|
||||||
<data android:host="diasp.org" android:scheme="https" />
|
<data android:host="diasporabr.com.br" android:scheme="https" />
|
||||||
|
<data android:host="diasporabrazil.org" android:scheme="https" />
|
||||||
|
<data android:host="diasporanet.tk" android:scheme="https" />
|
||||||
|
<data android:host="diasporapr.tk" android:scheme="https" />
|
||||||
|
<data android:host="diasporausa.com" android:scheme="https" />
|
||||||
|
<data android:host="diasporing.ch" android:scheme="https" />
|
||||||
<data android:host="dissociateduse.rs" android:scheme="https" />
|
<data android:host="dissociateduse.rs" android:scheme="https" />
|
||||||
<data android:host="distributed.chat" android:scheme="https" />
|
<data android:host="distributed.chat" android:scheme="https" />
|
||||||
<data android:host="eat.egregious.ly" android:scheme="https" />
|
<data android:host="eat.egregious.ly" android:scheme="https" />
|
||||||
|
@ -138,50 +147,43 @@
|
||||||
<data android:host="espora.social" android:scheme="https" />
|
<data android:host="espora.social" android:scheme="https" />
|
||||||
<data android:host="failure.net" android:scheme="https" />
|
<data android:host="failure.net" android:scheme="https" />
|
||||||
<data android:host="flokk.no" android:scheme="https" />
|
<data android:host="flokk.no" android:scheme="https" />
|
||||||
<data android:host="framasphere.org" android:scheme="https" />
|
|
||||||
<data android:host="freehuman.fr" android:scheme="https" />
|
<data android:host="freehuman.fr" android:scheme="https" />
|
||||||
<data android:host="friendica.tk" android:scheme="https" />
|
<data android:host="friendica.tk" android:scheme="https" />
|
||||||
<data android:host="home.enslaver.net" android:scheme="https" />
|
<data android:host="home.enslaver.net" android:scheme="https" />
|
||||||
<data android:host="idoru.pl" android:scheme="https" />
|
<data android:host="idoru.pl" android:scheme="https" />
|
||||||
<data android:host="iliketoast.net" android:scheme="https" />
|
<data android:host="iliketoast.net" android:scheme="https" />
|
||||||
<data android:host="joindiaspora.com" android:scheme="https" />
|
|
||||||
<data android:host="jons.gr" android:scheme="https" />
|
<data android:host="jons.gr" android:scheme="https" />
|
||||||
<data android:host="kapok.se" android:scheme="https" />
|
<data android:host="kapok.se" android:scheme="https" />
|
||||||
<data android:host="karmasphe.re" android:scheme="https" />
|
<data android:host="karmasphe.re" android:scheme="https" />
|
||||||
<data android:host="kosmospora.net" android:scheme="https" />
|
<data android:host="kosmospora.net" android:scheme="https" />
|
||||||
<data android:host="laba.mba" android:scheme="https" />
|
<data android:host="laba.mba" android:scheme="https" />
|
||||||
<data android:host="legends.im" android:scheme="https" />
|
|
||||||
<data android:host="liberdade.digital" android:scheme="https" />
|
<data android:host="liberdade.digital" android:scheme="https" />
|
||||||
<data android:host="libertypod.org" android:scheme="https" />
|
<data android:host="libertypod.org" android:scheme="https" />
|
||||||
<data android:host="LibertyPod.org" android:scheme="https" />
|
|
||||||
<data android:host="librenet.co.za" android:scheme="https" />
|
<data android:host="librenet.co.za" android:scheme="https" />
|
||||||
<data android:host="librenet.gr" android:scheme="https" />
|
<data android:host="librenet.gr" android:scheme="https" />
|
||||||
<data android:host="londor.be" android:scheme="https" />
|
<data android:host="londor.be" android:scheme="https" />
|
||||||
<data android:host="lubiora.de" android:scheme="https" />
|
|
||||||
<data android:host="misamigos.online" android:scheme="https" />
|
<data android:host="misamigos.online" android:scheme="https" />
|
||||||
<data android:host="mondiaspora.net" android:scheme="https" />
|
<data android:host="mondiaspora.net" android:scheme="https" />
|
||||||
<data android:host="nerdpol.ch" android:scheme="https" />
|
|
||||||
<data android:host="networkwizard.de" android:scheme="https" />
|
<data android:host="networkwizard.de" android:scheme="https" />
|
||||||
<data android:host="nx-pod.de" android:scheme="https" />
|
<data android:host="nx-pod.de" android:scheme="https" />
|
||||||
<data android:host="parteidervernunft.com" android:scheme="https" />
|
<data android:host="parteidervernunft.com" android:scheme="https" />
|
||||||
|
<data android:host="pe.spbstu.ru" android:scheme="https" />
|
||||||
<data android:host="pod.4ray.co" android:scheme="https" />
|
<data android:host="pod.4ray.co" android:scheme="https" />
|
||||||
<data android:host="pod.8n1.org" android:scheme="https" />
|
<data android:host="pod.8n1.org" android:scheme="https" />
|
||||||
<data android:host="pod.alterworld.info" android:scheme="https" />
|
<data android:host="pod.alterworld.info" android:scheme="https" />
|
||||||
<data android:host="pod.asap-soft.com" android:scheme="https" />
|
<data android:host="pod.asap-soft.com" android:scheme="https" />
|
||||||
<data android:host="podbay.net" android:scheme="https" />
|
|
||||||
<data android:host="pod.cannyfoxx.me" android:scheme="https" />
|
<data android:host="pod.cannyfoxx.me" android:scheme="https" />
|
||||||
<data android:host="pod.comin.dk" android:scheme="https" />
|
<data android:host="pod.comin.dk" android:scheme="https" />
|
||||||
<data android:host="pod.cyberdungeon.de" android:scheme="https" />
|
<data android:host="pod.cyberdungeon.de" android:scheme="https" />
|
||||||
<data android:host="pod.dapor.net" android:scheme="https" />
|
<data android:host="pod.dapor.net" android:scheme="https" />
|
||||||
<data android:host="pod.datenknoten.me" android:scheme="https" />
|
<data android:host="pod.datenknoten.me" android:scheme="https" />
|
||||||
<data android:host="poddery.com" android:scheme="https" />
|
|
||||||
<data android:host="pod.diaspora.software" android:scheme="https" />
|
<data android:host="pod.diaspora.software" android:scheme="https" />
|
||||||
<data android:host="pod.dirkomatik.de" android:scheme="https" />
|
<data android:host="pod.dirkomatik.de" android:scheme="https" />
|
||||||
<data android:host="pod.disroot.org" android:scheme="https" />
|
<data android:host="pod.disroot.org" android:scheme="https" />
|
||||||
<data android:host="pod.dobs.at" android:scheme="https" />
|
<data android:host="pod.dobs.at" android:scheme="https" />
|
||||||
<data android:host="pod.dragondreaming.de" android:scheme="https" />
|
<data android:host="pod.dragondreaming.de" android:scheme="https" />
|
||||||
|
<data android:host="pod.gaialabs.ch" android:scheme="https" />
|
||||||
<data android:host="pod.gedankenausbruch.com" android:scheme="https" />
|
<data android:host="pod.gedankenausbruch.com" android:scheme="https" />
|
||||||
<data android:host="pod.geraspora.de" android:scheme="https" />
|
|
||||||
<data android:host="pod.gleisnetze.de" android:scheme="https" />
|
<data android:host="pod.gleisnetze.de" android:scheme="https" />
|
||||||
<data android:host="pod.goodsharing.at" android:scheme="https" />
|
<data android:host="pod.goodsharing.at" android:scheme="https" />
|
||||||
<data android:host="pod.hashtagueule.fr" android:scheme="https" />
|
<data android:host="pod.hashtagueule.fr" android:scheme="https" />
|
||||||
|
@ -200,32 +202,33 @@
|
||||||
<data android:host="pod.psynet.su" android:scheme="https" />
|
<data android:host="pod.psynet.su" android:scheme="https" />
|
||||||
<data android:host="pod.readme.is" android:scheme="https" />
|
<data android:host="pod.readme.is" android:scheme="https" />
|
||||||
<data android:host="pod.richtig.koeln" android:scheme="https" />
|
<data android:host="pod.richtig.koeln" android:scheme="https" />
|
||||||
<data android:host="podricing.pw" android:scheme="https" />
|
<data android:host="pod.roocita.com" android:scheme="https" />
|
||||||
<data android:host="pod.ros-it.ch" android:scheme="https" />
|
<data android:host="pod.ros-it.ch" android:scheme="https" />
|
||||||
<data android:host="pod.sccn.club" android:scheme="https" />
|
<data android:host="pod.sccn.club" android:scheme="https" />
|
||||||
<data android:host="pod.sertelon.fr" android:scheme="https" />
|
<data android:host="pod.sertelon.fr" android:scheme="https" />
|
||||||
<data android:host="pod.shouldit.work" android:scheme="https" />
|
<data android:host="pod.shouldit.work" android:scheme="https" />
|
||||||
<data android:host="pod.skisso.com" android:scheme="https" />
|
|
||||||
<data android:host="pod.storel.li" android:scheme="https" />
|
<data android:host="pod.storel.li" android:scheme="https" />
|
||||||
<data android:host="pod.tchncs.de" android:scheme="https" />
|
<data android:host="pod.tchncs.de" android:scheme="https" />
|
||||||
<data android:host="pod.thomasdalichow.de" android:scheme="https" />
|
<data android:host="pod.thomasdalichow.de" android:scheme="https" />
|
||||||
<data android:host="pod.undreaming.org" android:scheme="https" />
|
<data android:host="pod.undreaming.org" android:scheme="https" />
|
||||||
|
<data android:host="pod.volt.io" android:scheme="https" />
|
||||||
|
<data android:host="podbay.net" android:scheme="https" />
|
||||||
|
<data android:host="poddery.com" android:scheme="https" />
|
||||||
|
<data android:host="podricing.pw" android:scheme="https" />
|
||||||
<data android:host="pubpod.alqualonde.org" android:scheme="https" />
|
<data android:host="pubpod.alqualonde.org" android:scheme="https" />
|
||||||
<data android:host="realms.the-wizard.co.za" android:scheme="https" />
|
<data android:host="realms.the-wizard.co.za" android:scheme="https" />
|
||||||
<data android:host="revreso.de" android:scheme="https" />
|
<data android:host="revreso.de" android:scheme="https" />
|
||||||
<data android:host="ruhrspora.de" android:scheme="https" />
|
<data android:host="ruhrspora.de" android:scheme="https" />
|
||||||
<data android:host="russiandiaspora.org" android:scheme="https" />
|
<data android:host="russiandiaspora.org" android:scheme="https" />
|
||||||
<data android:host="sechat.org" android:scheme="https" />
|
|
||||||
<data android:host="shrekislove.us" android:scheme="https" />
|
<data android:host="shrekislove.us" android:scheme="https" />
|
||||||
<data android:host="social.acclaro.digital" android:scheme="https" />
|
<data android:host="social.acclaro.digital" android:scheme="https" />
|
||||||
<data android:host="social.baldr.io" android:scheme="https" />
|
<data android:host="social.baldr.io" android:scheme="https" />
|
||||||
<data android:host="social.daxbau.net" android:scheme="https" />
|
<data android:host="social.daxbau.net" android:scheme="https" />
|
||||||
<data android:host="social.elaon.de" android:scheme="https" />
|
<data android:host="social.elaon.de" android:scheme="https" />
|
||||||
<data android:host="socializer.cc" android:scheme="https" />
|
|
||||||
<data android:host="social.lanham.id.au" android:scheme="https" />
|
<data android:host="social.lanham.id.au" android:scheme="https" />
|
||||||
<data android:host="social.mbuto.me" android:scheme="https" />
|
<data android:host="social.mbuto.me" android:scheme="https" />
|
||||||
<data android:host="social.sum7.de" android:scheme="https" />
|
<data android:host="social.sum7.de" android:scheme="https" />
|
||||||
<data android:host="spora.com.ua" android:scheme="https" />
|
<data android:host="socializer.cc" android:scheme="https" />
|
||||||
<data android:host="spora.zone" android:scheme="https" />
|
<data android:host="spora.zone" android:scheme="https" />
|
||||||
<data android:host="subvillage.de" android:scheme="https" />
|
<data android:host="subvillage.de" android:scheme="https" />
|
||||||
<data android:host="sysad.org" android:scheme="https" />
|
<data android:host="sysad.org" android:scheme="https" />
|
||||||
|
@ -238,7 +241,10 @@
|
||||||
<data android:host="wk3.org" android:scheme="https" />
|
<data android:host="wk3.org" android:scheme="https" />
|
||||||
<data android:host="www.datataffel.dk" android:scheme="https" />
|
<data android:host="www.datataffel.dk" android:scheme="https" />
|
||||||
<data android:host="www.diasporaix.de" android:scheme="https" />
|
<data android:host="www.diasporaix.de" android:scheme="https" />
|
||||||
|
<data android:host="diaspora.hofud.com" android:scheme="https" />
|
||||||
|
<data android:host="diaspora.softwarelivre.org" android:scheme="https" />
|
||||||
|
<data android:host="confetticake.club" android:scheme="https" />
|
||||||
|
<data android:host="diaspora.mike-jones.me.uk" android:scheme="https" />
|
||||||
<!--@@@ PODLIST END-->
|
<!--@@@ PODLIST END-->
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
|
|
|
@ -310,6 +310,7 @@ implements IntellihideToolbarActivityListener {
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
View rootView = inflater.inflate(R.layout.about__fragment_debug, container, false);
|
View rootView = inflater.inflate(R.layout.about__fragment_debug, container, false);
|
||||||
ButterKnife.bind(this, rootView);
|
ButterKnife.bind(this, rootView);
|
||||||
|
App app = (App) getActivity().getApplication();
|
||||||
logBox.setOnLongClickListener(new View.OnLongClickListener() {
|
logBox.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View view) {
|
public boolean onLongClick(View view) {
|
||||||
|
@ -338,6 +339,9 @@ implements IntellihideToolbarActivityListener {
|
||||||
osVersion.setText(getString(R.string.fragment_debug__android_version, Build.VERSION.RELEASE));
|
osVersion.setText(getString(R.string.fragment_debug__android_version, Build.VERSION.RELEASE));
|
||||||
deviceName.setText(getString(R.string.fragment_debug__device_name, Build.MANUFACTURER + " " + Build.MODEL));
|
deviceName.setText(getString(R.string.fragment_debug__device_name, Build.MANUFACTURER + " " + Build.MODEL));
|
||||||
podDomain.setText(getString(R.string.fragment_debug__pod_domain, urls.getPodUrl()));
|
podDomain.setText(getString(R.string.fragment_debug__pod_domain, urls.getPodUrl()));
|
||||||
|
if (app.getSettings().getPod() != null) {
|
||||||
|
podDomain.setText(getString(R.string.fragment_debug__pod_domain, app.getSettings().getPod().getName()));
|
||||||
|
}
|
||||||
|
|
||||||
} catch (PackageManager.NameNotFoundException e) {
|
} catch (PackageManager.NameNotFoundException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
|
@ -68,15 +68,15 @@ import com.github.dfa.diaspora_android.fragment.HashtagListFragment;
|
||||||
import com.github.dfa.diaspora_android.fragment.PodSelectionFragment;
|
import com.github.dfa.diaspora_android.fragment.PodSelectionFragment;
|
||||||
import com.github.dfa.diaspora_android.listener.WebUserProfileChangedListener;
|
import com.github.dfa.diaspora_android.listener.WebUserProfileChangedListener;
|
||||||
import com.github.dfa.diaspora_android.receiver.OpenExternalLinkReceiver;
|
import com.github.dfa.diaspora_android.receiver.OpenExternalLinkReceiver;
|
||||||
import com.github.dfa.diaspora_android.util.ProxyHandler;
|
|
||||||
import com.github.dfa.diaspora_android.receiver.UpdateTitleReceiver;
|
import com.github.dfa.diaspora_android.receiver.UpdateTitleReceiver;
|
||||||
import com.github.dfa.diaspora_android.ui.BadgeDrawable;
|
import com.github.dfa.diaspora_android.ui.BadgeDrawable;
|
||||||
import com.github.dfa.diaspora_android.ui.IntellihideToolbarActivityListener;
|
import com.github.dfa.diaspora_android.ui.IntellihideToolbarActivityListener;
|
||||||
import com.github.dfa.diaspora_android.util.AppLog;
|
import com.github.dfa.diaspora_android.util.AppLog;
|
||||||
import com.github.dfa.diaspora_android.util.CustomTabHelpers.CustomTabActivityHelper;
|
import com.github.dfa.diaspora_android.util.CustomTabHelpers.CustomTabActivityHelper;
|
||||||
import com.github.dfa.diaspora_android.util.DiasporaUrlHelper;
|
import com.github.dfa.diaspora_android.util.DiasporaUrlHelper;
|
||||||
import com.github.dfa.diaspora_android.util.theming.ThemeHelper;
|
import com.github.dfa.diaspora_android.util.ProxyHandler;
|
||||||
import com.github.dfa.diaspora_android.util.WebHelper;
|
import com.github.dfa.diaspora_android.util.WebHelper;
|
||||||
|
import com.github.dfa.diaspora_android.util.theming.ThemeHelper;
|
||||||
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
|
@ -195,8 +195,9 @@ public class MainActivity extends ThemedActivity
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!appSettings.hasPodDomain()) {
|
if (!appSettings.hasPod()) {
|
||||||
AppLog.d(this, "We have no pod. Show PodSelectionFragment");
|
AppLog.d(this, "We have no pod. Show PodSelectionFragment");
|
||||||
|
updateNavigationViewEntryVisibilities();
|
||||||
showFragment(getFragment(PodSelectionFragment.TAG));
|
showFragment(getFragment(PodSelectionFragment.TAG));
|
||||||
} else {
|
} else {
|
||||||
AppLog.d(this, "Pod found. Handle intents.");
|
AppLog.d(this, "Pod found. Handle intents.");
|
||||||
|
@ -246,6 +247,7 @@ public class MainActivity extends ThemedActivity
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show DiasporaStreamFragment if necessary and load URL url
|
* Show DiasporaStreamFragment if necessary and load URL url
|
||||||
|
*
|
||||||
* @param url URL to load in the DiasporaStreamFragment
|
* @param url URL to load in the DiasporaStreamFragment
|
||||||
*/
|
*/
|
||||||
public void openDiasporaUrl(String url) {
|
public void openDiasporaUrl(String url) {
|
||||||
|
@ -259,6 +261,7 @@ public class MainActivity extends ThemedActivity
|
||||||
* Get an instance of the CustomFragment with the tag fragmentTag.
|
* Get an instance of the CustomFragment with the tag fragmentTag.
|
||||||
* If there was no instance so far, create a new one and add it to the FragmentManagers pool.
|
* If there was no instance so far, create a new one and add it to the FragmentManagers pool.
|
||||||
* If there is no Fragment with the corresponding Tag, return the top fragment.
|
* If there is no Fragment with the corresponding Tag, return the top fragment.
|
||||||
|
*
|
||||||
* @param fragmentTag tag
|
* @param fragmentTag tag
|
||||||
* @return corresponding Fragment
|
* @return corresponding Fragment
|
||||||
*/
|
*/
|
||||||
|
@ -294,6 +297,7 @@ public class MainActivity extends ThemedActivity
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the Fragment fragment in R.id.fragment_container. If the fragment was already visible, do nothing.
|
* Show the Fragment fragment in R.id.fragment_container. If the fragment was already visible, do nothing.
|
||||||
|
*
|
||||||
* @param fragment Fragment to show
|
* @param fragment Fragment to show
|
||||||
*/
|
*/
|
||||||
protected void showFragment(CustomFragment fragment) {
|
protected void showFragment(CustomFragment fragment) {
|
||||||
|
@ -342,8 +346,8 @@ public class MainActivity extends ThemedActivity
|
||||||
if (!appSettings.getName().equals("")) {
|
if (!appSettings.getName().equals("")) {
|
||||||
navheaderTitle.setText(appSettings.getName());
|
navheaderTitle.setText(appSettings.getName());
|
||||||
}
|
}
|
||||||
if (!appSettings.getPodDomain().equals("")) {
|
if (appSettings.getPod() != null) {
|
||||||
navheaderDescription.setText(appSettings.getPodDomain());
|
navheaderDescription.setText(appSettings.getPod().getName());
|
||||||
}
|
}
|
||||||
String avatarUrl = appSettings.getAvatarUrl();
|
String avatarUrl = appSettings.getAvatarUrl();
|
||||||
if (!avatarUrl.equals("")) {
|
if (!avatarUrl.equals("")) {
|
||||||
|
@ -376,10 +380,16 @@ public class MainActivity extends ThemedActivity
|
||||||
navMenu.findItem(R.id.nav_mentions).setVisible(appSettings.isVisibleInNavMentions());
|
navMenu.findItem(R.id.nav_mentions).setVisible(appSettings.isVisibleInNavMentions());
|
||||||
navMenu.findItem(R.id.nav_profile).setVisible(appSettings.isVisibleInNavProfile());
|
navMenu.findItem(R.id.nav_profile).setVisible(appSettings.isVisibleInNavProfile());
|
||||||
navMenu.findItem(R.id.nav_public).setVisible(appSettings.isVisibleInNavPublic_activities());
|
navMenu.findItem(R.id.nav_public).setVisible(appSettings.isVisibleInNavPublic_activities());
|
||||||
|
|
||||||
|
// Top bar
|
||||||
|
if (!appSettings.hasPod()) {
|
||||||
|
navMenu.setGroupVisible(navMenu.findItem(R.id.nav_exit).getGroupId(), false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Forward incoming intents to handleIntent()
|
* Forward incoming intents to handleIntent()
|
||||||
|
*
|
||||||
* @param intent incoming
|
* @param intent incoming
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -390,6 +400,7 @@ public class MainActivity extends ThemedActivity
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle intents and execute intent specific actions
|
* Handle intents and execute intent specific actions
|
||||||
|
*
|
||||||
* @param intent intent to get handled
|
* @param intent intent to get handled
|
||||||
*/
|
*/
|
||||||
private void handleIntent(Intent intent) {
|
private void handleIntent(Intent intent) {
|
||||||
|
@ -418,6 +429,7 @@ public class MainActivity extends ThemedActivity
|
||||||
}
|
}
|
||||||
} else if (ACTION_CHANGE_ACCOUNT.equals(action)) {
|
} else if (ACTION_CHANGE_ACCOUNT.equals(action)) {
|
||||||
AppLog.v(this, "Reset pod data and show PodSelectionFragment");
|
AppLog.v(this, "Reset pod data and show PodSelectionFragment");
|
||||||
|
appSettings.setPod(null);
|
||||||
app.resetPodData(((DiasporaStreamFragment) getFragment(DiasporaStreamFragment.TAG)).getWebView());
|
app.resetPodData(((DiasporaStreamFragment) getFragment(DiasporaStreamFragment.TAG)).getWebView());
|
||||||
showFragment(getFragment(PodSelectionFragment.TAG));
|
showFragment(getFragment(PodSelectionFragment.TAG));
|
||||||
} else if (ACTION_CLEAR_CACHE.equals(action)) {
|
} else if (ACTION_CLEAR_CACHE.equals(action)) {
|
||||||
|
@ -462,6 +474,7 @@ public class MainActivity extends ThemedActivity
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the fragment which is currently displayed in R.id.fragment_container
|
* Return the fragment which is currently displayed in R.id.fragment_container
|
||||||
|
*
|
||||||
* @return top fragment or null if there is none displayed
|
* @return top fragment or null if there is none displayed
|
||||||
*/
|
*/
|
||||||
private CustomFragment getTopFragment() {
|
private CustomFragment getTopFragment() {
|
||||||
|
@ -545,6 +558,7 @@ public class MainActivity extends ThemedActivity
|
||||||
/**
|
/**
|
||||||
* Clear and repopulate top and bottom toolbar.
|
* Clear and repopulate top and bottom toolbar.
|
||||||
* Also add menu items of the displayed fragment
|
* Also add menu items of the displayed fragment
|
||||||
|
*
|
||||||
* @param menu top toolbar
|
* @param menu top toolbar
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
|
@ -575,12 +589,14 @@ public class MainActivity extends ThemedActivity
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the notification and messages counter in the top toolbar
|
* Set the notification and messages counter in the top toolbar
|
||||||
|
*
|
||||||
* @param menu menu
|
* @param menu menu
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean onPrepareOptionsMenu(Menu menu) {
|
public boolean onPrepareOptionsMenu(Menu menu) {
|
||||||
MenuItem item;
|
MenuItem item;
|
||||||
|
updateNavigationViewEntryVisibilities();
|
||||||
|
|
||||||
if ((item = menu.findItem(R.id.action_notifications)) != null) {
|
if ((item = menu.findItem(R.id.action_notifications)) != null) {
|
||||||
LayerDrawable icon = (LayerDrawable) item.getIcon();
|
LayerDrawable icon = (LayerDrawable) item.getIcon();
|
||||||
|
@ -596,6 +612,7 @@ public class MainActivity extends ThemedActivity
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle clicks on the optionsmenu
|
* Handle clicks on the optionsmenu
|
||||||
|
*
|
||||||
* @param item item
|
* @param item item
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
|
@ -694,6 +711,7 @@ public class MainActivity extends ThemedActivity
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update the profile name in the navigation slider
|
* Update the profile name in the navigation slider
|
||||||
|
*
|
||||||
* @param name name
|
* @param name name
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -704,6 +722,7 @@ public class MainActivity extends ThemedActivity
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update the profile picture in the navigation slider
|
* Update the profile picture in the navigation slider
|
||||||
|
*
|
||||||
* @param avatarUrl url of the new profile pic
|
* @param avatarUrl url of the new profile pic
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -714,6 +733,7 @@ public class MainActivity extends ThemedActivity
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle hashtag clicks. Open the new-post-url and inject the clicked hashtag into the post-editor
|
* Handle hashtag clicks. Open the new-post-url and inject the clicked hashtag into the post-editor
|
||||||
|
*
|
||||||
* @param intent intent
|
* @param intent intent
|
||||||
*/
|
*/
|
||||||
private void handleHashtag(Intent intent) {
|
private void handleHashtag(Intent intent) {
|
||||||
|
@ -728,6 +748,7 @@ public class MainActivity extends ThemedActivity
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open the new-post-url and inject text that was shared into the app into the post editors text field
|
* Open the new-post-url and inject text that was shared into the app into the post editors text field
|
||||||
|
*
|
||||||
* @param intent shareTextIntent
|
* @param intent shareTextIntent
|
||||||
*/
|
*/
|
||||||
private void handleSendText(Intent intent) {
|
private void handleSendText(Intent intent) {
|
||||||
|
@ -786,6 +807,7 @@ public class MainActivity extends ThemedActivity
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Share an image shared to the app via diaspora
|
* Share an image shared to the app via diaspora
|
||||||
|
*
|
||||||
* @param intent shareImageIntent
|
* @param intent shareImageIntent
|
||||||
*/
|
*/
|
||||||
//TODO: Implement some day
|
//TODO: Implement some day
|
||||||
|
@ -802,6 +824,7 @@ public class MainActivity extends ThemedActivity
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Invalidate the top toolbar to update the notification counter
|
* Invalidate the top toolbar to update the notification counter
|
||||||
|
*
|
||||||
* @param notificationCount new notification count
|
* @param notificationCount new notification count
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -813,6 +836,7 @@ public class MainActivity extends ThemedActivity
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Invalidate the top toolbar to update the unread messages counter
|
* Invalidate the top toolbar to update the unread messages counter
|
||||||
|
*
|
||||||
* @param unreadMessageCount new unread messages count
|
* @param unreadMessageCount new unread messages count
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -945,6 +969,7 @@ public class MainActivity extends ThemedActivity
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* React to results of requestPermission
|
* React to results of requestPermission
|
||||||
|
*
|
||||||
* @param requestCode resCode
|
* @param requestCode resCode
|
||||||
* @param permissions requested permissions
|
* @param permissions requested permissions
|
||||||
* @param grantResults granted results
|
* @param grantResults granted results
|
||||||
|
@ -970,6 +995,7 @@ public class MainActivity extends ThemedActivity
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the string that will be shared into the new-post-editor
|
* Return the string that will be shared into the new-post-editor
|
||||||
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getTextToBeShared() {
|
public String getTextToBeShared() {
|
||||||
|
@ -978,6 +1004,7 @@ public class MainActivity extends ThemedActivity
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the string that will be shared into the new-post-editor
|
* Set the string that will be shared into the new-post-editor
|
||||||
|
*
|
||||||
* @param textToBeShared
|
* @param textToBeShared
|
||||||
*/
|
*/
|
||||||
public void setTextToBeShared(String textToBeShared) {
|
public void setTextToBeShared(String textToBeShared) {
|
||||||
|
|
|
@ -41,9 +41,10 @@ import com.github.dfa.diaspora_android.App;
|
||||||
import com.github.dfa.diaspora_android.R;
|
import com.github.dfa.diaspora_android.R;
|
||||||
import com.github.dfa.diaspora_android.data.AppSettings;
|
import com.github.dfa.diaspora_android.data.AppSettings;
|
||||||
import com.github.dfa.diaspora_android.ui.IntellihideToolbarActivityListener;
|
import com.github.dfa.diaspora_android.ui.IntellihideToolbarActivityListener;
|
||||||
import com.github.dfa.diaspora_android.util.theming.ColorPalette;
|
|
||||||
import com.github.dfa.diaspora_android.util.ProxyHandler;
|
|
||||||
import com.github.dfa.diaspora_android.util.AppLog;
|
import com.github.dfa.diaspora_android.util.AppLog;
|
||||||
|
import com.github.dfa.diaspora_android.util.DiasporaUrlHelper;
|
||||||
|
import com.github.dfa.diaspora_android.util.ProxyHandler;
|
||||||
|
import com.github.dfa.diaspora_android.util.theming.ColorPalette;
|
||||||
import com.github.dfa.diaspora_android.util.theming.ThemeHelper;
|
import com.github.dfa.diaspora_android.util.theming.ThemeHelper;
|
||||||
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
|
@ -63,6 +64,7 @@ public class SettingsActivity extends ThemedActivity implements IntellihideToolb
|
||||||
|
|
||||||
private ProxyHandler.ProxySettings oldProxySettings;
|
private ProxyHandler.ProxySettings oldProxySettings;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
@ -178,7 +180,7 @@ public class SettingsActivity extends ThemedActivity implements IntellihideToolb
|
||||||
}
|
}
|
||||||
|
|
||||||
Intent intent = new Intent(getActivity(), MainActivity.class);
|
Intent intent = new Intent(getActivity(), MainActivity.class);
|
||||||
String podDomain = appSettings.getPodDomain();
|
DiasporaUrlHelper diasporaUrlHelper = new DiasporaUrlHelper(app.getSettings());
|
||||||
|
|
||||||
switch (preference.getTitleRes()) {
|
switch (preference.getTitleRes()) {
|
||||||
case R.string.pref_title__primary_color: {
|
case R.string.pref_title__primary_color: {
|
||||||
|
@ -193,17 +195,17 @@ public class SettingsActivity extends ThemedActivity implements IntellihideToolb
|
||||||
}
|
}
|
||||||
case R.string.pref_title__personal_settings: {
|
case R.string.pref_title__personal_settings: {
|
||||||
intent.setAction(MainActivity.ACTION_OPEN_URL);
|
intent.setAction(MainActivity.ACTION_OPEN_URL);
|
||||||
intent.putExtra(MainActivity.URL_MESSAGE, "https://" + podDomain + "/user/edit");
|
intent.putExtra(MainActivity.URL_MESSAGE, diasporaUrlHelper.getPersonalSettingsUrl());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case R.string.pref_title__manage_tags: {
|
case R.string.pref_title__manage_tags: {
|
||||||
intent.setAction(MainActivity.ACTION_OPEN_URL);
|
intent.setAction(MainActivity.ACTION_OPEN_URL);
|
||||||
intent.putExtra(MainActivity.URL_MESSAGE, "https://" + podDomain + "/tag_followings/manage");
|
intent.putExtra(MainActivity.URL_MESSAGE, diasporaUrlHelper.getManageTagsUrl());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case R.string.pref_title__manage_contacts: {
|
case R.string.pref_title__manage_contacts: {
|
||||||
intent.setAction(MainActivity.ACTION_OPEN_URL);
|
intent.setAction(MainActivity.ACTION_OPEN_URL);
|
||||||
intent.putExtra(MainActivity.URL_MESSAGE, "https://" + podDomain + "/contacts");
|
intent.putExtra(MainActivity.URL_MESSAGE, diasporaUrlHelper.getManageContactsUrl());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case R.string.pref_title__change_account: {
|
case R.string.pref_title__change_account: {
|
||||||
|
@ -229,8 +231,7 @@ public class SettingsActivity extends ThemedActivity implements IntellihideToolb
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
case R.string.pref_title__clear_cache:
|
case R.string.pref_title__clear_cache: {
|
||||||
{
|
|
||||||
intent.setAction(MainActivity.ACTION_CLEAR_CACHE);
|
intent.setAction(MainActivity.ACTION_CLEAR_CACHE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -250,6 +251,7 @@ public class SettingsActivity extends ThemedActivity implements IntellihideToolb
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show a colorPicker Dialog
|
* Show a colorPicker Dialog
|
||||||
|
*
|
||||||
* @param type 1 -> Primary Color, 2 -> Accent Color
|
* @param type 1 -> Primary Color, 2 -> Accent Color
|
||||||
*/
|
*/
|
||||||
public void showColorPickerDialog(final int type) {
|
public void showColorPickerDialog(final int type) {
|
||||||
|
|
|
@ -48,6 +48,7 @@ public abstract class ThemedActivity extends AppCompatActivity {
|
||||||
updateRecentAppColor();
|
updateRecentAppColor();
|
||||||
applyColorToViews();
|
applyColorToViews();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract void applyColorToViews();
|
protected abstract void applyColorToViews();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -19,8 +19,13 @@ import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
|
|
||||||
import com.github.dfa.diaspora_android.R;
|
import com.github.dfa.diaspora_android.R;
|
||||||
|
import com.github.dfa.diaspora_android.data.DiasporaPodList.DiasporaPod;
|
||||||
|
import com.github.dfa.diaspora_android.data.DiasporaPodList.DiasporaPod.DiasporaPodUrl;
|
||||||
import com.github.dfa.diaspora_android.util.ProxyHandler;
|
import com.github.dfa.diaspora_android.util.ProxyHandler;
|
||||||
|
|
||||||
|
import org.json.JSONException;
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Settings
|
* Settings
|
||||||
* Created by gsantner (https://gsantner.github.io/) on 20.03.16. Part of Diaspora for Android.
|
* Created by gsantner (https://gsantner.github.io/) on 20.03.16. Part of Diaspora for Android.
|
||||||
|
@ -29,6 +34,7 @@ public class AppSettings {
|
||||||
private final SharedPreferences prefApp;
|
private final SharedPreferences prefApp;
|
||||||
private final SharedPreferences prefPod;
|
private final SharedPreferences prefPod;
|
||||||
private final Context context;
|
private final Context context;
|
||||||
|
private DiasporaPod currentPod0Cached;
|
||||||
|
|
||||||
public AppSettings(Context context) {
|
public AppSettings(Context context) {
|
||||||
this.context = context.getApplicationContext();
|
this.context = context.getApplicationContext();
|
||||||
|
@ -135,24 +141,44 @@ public class AppSettings {
|
||||||
setString(prefPod, R.string.pref_key__podprofile_name, name);
|
setString(prefPod, R.string.pref_key__podprofile_name, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPodDomain() {
|
|
||||||
return getString(prefPod, R.string.pref_key__poddomain, "");
|
// TODO: Remove legacy at some time ;)
|
||||||
|
public void upgradeLegacyPoddomain() {
|
||||||
|
String legacy = getString(prefPod, R.string.pref_key__poddomain_legacy, "");
|
||||||
|
if (!legacy.equals("")) {
|
||||||
|
DiasporaPod pod = new DiasporaPod();
|
||||||
|
pod.setName(legacy);
|
||||||
|
pod.getPodUrls().add(new DiasporaPodUrl().setHost(legacy));
|
||||||
|
setPod(pod);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPodDomain(String podDomain) {
|
public DiasporaPod getPod() {
|
||||||
setString(prefPod, R.string.pref_key__poddomain, podDomain);
|
upgradeLegacyPoddomain();
|
||||||
|
if (currentPod0Cached == null) {
|
||||||
|
String pref = getString(prefPod, R.string.pref_key__current_pod_0, "");
|
||||||
|
|
||||||
|
try {
|
||||||
|
currentPod0Cached = new DiasporaPod().fromJson(new JSONObject(pref));
|
||||||
|
} catch (JSONException e) {
|
||||||
|
currentPod0Cached = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return currentPod0Cached;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasPodDomain() {
|
public void setPod(DiasporaPod pod) {
|
||||||
return !getString(prefPod, R.string.pref_key__poddomain, "").equals("");
|
try {
|
||||||
|
setString(prefPod, R.string.pref_key__current_pod_0,
|
||||||
|
pod == null ? null : pod.toJson().toString());
|
||||||
|
currentPod0Cached = pod;
|
||||||
|
} catch (JSONException ignored) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String[] getPreviousPodlist() {
|
public boolean hasPod() {
|
||||||
return getStringArray(prefApp, R.string.pref_key__previous_podlist);
|
upgradeLegacyPoddomain();
|
||||||
}
|
return !getString(prefPod, R.string.pref_key__current_pod_0, "").equals("");
|
||||||
|
|
||||||
public void setPreviousPodlist(String[] pods) {
|
|
||||||
setStringArray(prefApp, R.string.pref_key__previous_podlist, pods);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPodAspects(PodAspect[] aspects) {
|
public void setPodAspects(PodAspect[] aspects) {
|
||||||
|
@ -238,6 +264,7 @@ public class AppSettings {
|
||||||
public void setProxyHttpHost(String value) {
|
public void setProxyHttpHost(String value) {
|
||||||
setString(prefApp, R.string.pref_key__http_proxy_host, value);
|
setString(prefApp, R.string.pref_key__http_proxy_host, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default value: 0
|
* Default value: 0
|
||||||
*
|
*
|
||||||
|
|
|
@ -0,0 +1,516 @@
|
||||||
|
package com.github.dfa.diaspora_android.data;
|
||||||
|
|
||||||
|
import org.json.JSONArray;
|
||||||
|
import org.json.JSONException;
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by gsantner (https://gsantner.github.io/ on 30.09.16.
|
||||||
|
* DiasporaPodList - List container for DiasporaPod's, with methods to merge with other DiasporaPodLists
|
||||||
|
* DiasporaPod - Data container for a Pod, can include N DiasporaPodUrl's
|
||||||
|
* DiasporaPodUrl - A Url of an DiasporaPod
|
||||||
|
* For all Classes a loading and saving to JSON method is available
|
||||||
|
*/
|
||||||
|
public class DiasporaPodList implements Iterable<DiasporaPodList.DiasporaPod>, Serializable {
|
||||||
|
private List<DiasporaPod> pods = new ArrayList<>();
|
||||||
|
private boolean trackMergeChanges = false;
|
||||||
|
private Integer trackAddedIndexStart = -1;
|
||||||
|
private List<Integer> trackUpdatedIndexes = new ArrayList<>();
|
||||||
|
private boolean keepOldNameDuringMerge = false;
|
||||||
|
private long timestamp;
|
||||||
|
|
||||||
|
public DiasporaPodList() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load DiasporaPodList from Json
|
||||||
|
*
|
||||||
|
* @param json Json Object
|
||||||
|
*/
|
||||||
|
public DiasporaPodList fromJson(JSONObject json) throws JSONException {
|
||||||
|
JSONArray jarr;
|
||||||
|
pods.clear();
|
||||||
|
|
||||||
|
if (json.has("pods")) {
|
||||||
|
jarr = json.getJSONArray("pods");
|
||||||
|
for (int i = 0; i < jarr.length(); i++) {
|
||||||
|
DiasporaPod pod = new DiasporaPod().fromJson(jarr.getJSONObject(i));
|
||||||
|
pods.add(pod);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (json.has("timestamp")) {
|
||||||
|
timestamp = json.getLong("timestamp");
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert DiasporaPodList to JSON
|
||||||
|
*/
|
||||||
|
public JSONObject toJson() throws JSONException {
|
||||||
|
JSONObject json = new JSONObject();
|
||||||
|
JSONArray jpods = new JSONArray();
|
||||||
|
for (DiasporaPod pod : pods) {
|
||||||
|
jpods.put(pod.toJson());
|
||||||
|
}
|
||||||
|
json.put("pods", jpods);
|
||||||
|
json.put("timestamp", System.currentTimeMillis());
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Merge newer entries into this podlist
|
||||||
|
* Will add new pods, and update data of pods with data from the new list
|
||||||
|
*
|
||||||
|
* @param newPodList Another podlist
|
||||||
|
*/
|
||||||
|
public void mergeWithNewerEntries(final DiasporaPodList newPodList) throws JSONException {
|
||||||
|
if (isTrackMergeChanges()) {
|
||||||
|
trackAddedIndexStart = -1;
|
||||||
|
trackUpdatedIndexes.clear();
|
||||||
|
}
|
||||||
|
for (DiasporaPod newPod : newPodList) {
|
||||||
|
int index = pods.indexOf(newPod);
|
||||||
|
if (index >= 0) {
|
||||||
|
DiasporaPod updatePodBak = new DiasporaPod().fromJson(pods.get(index).toJson());
|
||||||
|
DiasporaPod updatePod = pods.get(index);
|
||||||
|
updatePod.fromJson(newPod.toJson());
|
||||||
|
|
||||||
|
// Restore Pod id (if was set to zero)
|
||||||
|
if (updatePodBak.getId() != 0 && updatePod.getId() == 0) {
|
||||||
|
updatePod.setId(updatePodBak.getId());
|
||||||
|
}
|
||||||
|
if (updatePodBak.getActive6() != 0 && updatePod.getActive6() == 0) {
|
||||||
|
updatePod.setActive6(updatePodBak.getActive6());
|
||||||
|
}
|
||||||
|
if (updatePodBak.getScore() != 0 && updatePod.getScore() == 0) {
|
||||||
|
updatePod.setScore(updatePodBak.getScore());
|
||||||
|
}
|
||||||
|
if (!updatePodBak.getName().equals("") && keepOldNameDuringMerge) {
|
||||||
|
updatePod.setName(updatePodBak.getName());
|
||||||
|
}
|
||||||
|
if (isTrackMergeChanges()) {
|
||||||
|
trackUpdatedIndexes.add(index);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
pods.add(newPod);
|
||||||
|
if (isTrackMergeChanges() && trackAddedIndexStart == -1) {
|
||||||
|
trackAddedIndexStart = pods.size() - 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sort the pod list
|
||||||
|
*/
|
||||||
|
public void sortPods() {
|
||||||
|
Collections.sort(pods);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Iterator for Iterable interface (forEach, ..)
|
||||||
|
*/
|
||||||
|
public Iterator<DiasporaPod> iterator() {
|
||||||
|
return pods.iterator();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int size() {
|
||||||
|
return pods.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int indexOf(DiasporaPod pod) {
|
||||||
|
return pods.indexOf(pod);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<DiasporaPod> getPods() {
|
||||||
|
return pods;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPods(List<DiasporaPod> pods) {
|
||||||
|
this.pods = pods;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DiasporaPod getPodAt(int index) {
|
||||||
|
if (index >= 0 && index < pods.size()) {
|
||||||
|
return pods.get(index);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isTrackMergeChanges() {
|
||||||
|
return trackMergeChanges;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTrackMergeChanges(boolean trackMergeChanges) {
|
||||||
|
this.trackMergeChanges = trackMergeChanges;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getTrackAddedIndexStart() {
|
||||||
|
return trackAddedIndexStart;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Integer> getTrackUpdatedIndexes() {
|
||||||
|
return trackUpdatedIndexes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isKeepOldNameDuringMerge() {
|
||||||
|
return keepOldNameDuringMerge;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKeepOldNameDuringMerge(boolean keepOldNameDuringMerge) {
|
||||||
|
this.keepOldNameDuringMerge = keepOldNameDuringMerge;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* ██████╗ ██████╗ ██████╗
|
||||||
|
* ██╔══██╗██╔═══██╗██╔══██╗
|
||||||
|
* ██████╔╝██║ ██║██║ ██║
|
||||||
|
* ██╔═══╝ ██║ ██║██║ ██║
|
||||||
|
* ██║ ╚██████╔╝██████╔╝
|
||||||
|
* ╚═╝ ╚═════╝ ╚═════╝
|
||||||
|
*/
|
||||||
|
public static class DiasporaPod implements Iterable<DiasporaPodList.DiasporaPod.DiasporaPodUrl>, Comparable<DiasporaPod>, Serializable {
|
||||||
|
private List<DiasporaPodUrl> podUrls = new ArrayList<>();
|
||||||
|
private List<String> mainLangs = new ArrayList<>();
|
||||||
|
private String name = "";
|
||||||
|
private int score = 0;
|
||||||
|
private int id = 0;
|
||||||
|
private long active6 = 0;
|
||||||
|
|
||||||
|
|
||||||
|
public DiasporaPod() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load a DiasporaPod from JSON
|
||||||
|
*
|
||||||
|
* @param json Json Object
|
||||||
|
*/
|
||||||
|
public DiasporaPod fromJson(JSONObject json) throws JSONException {
|
||||||
|
JSONArray jarr;
|
||||||
|
|
||||||
|
if (json.has("name")) {
|
||||||
|
name = json.getString("name");
|
||||||
|
}
|
||||||
|
if (json.has("mainLangs")) {
|
||||||
|
jarr = json.getJSONArray("mainLangs");
|
||||||
|
for (int i = 0; i < jarr.length(); i++) {
|
||||||
|
String val = jarr.getString(i);
|
||||||
|
if (!mainLangs.contains(val)) {
|
||||||
|
mainLangs.add(val);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (json.has("podUrls")) {
|
||||||
|
jarr = json.getJSONArray("podUrls");
|
||||||
|
for (int i = 0; i < jarr.length(); i++) {
|
||||||
|
DiasporaPodUrl podUrl = new DiasporaPodUrl().fromJson(jarr.getJSONObject(i));
|
||||||
|
if (!podUrls.contains(podUrl)) {
|
||||||
|
podUrls.add(podUrl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (json.has("score")) {
|
||||||
|
score = json.getInt("score");
|
||||||
|
}
|
||||||
|
if (json.has("active6")) {
|
||||||
|
active6 = json.getLong("active6");
|
||||||
|
}
|
||||||
|
if (json.has("id")) {
|
||||||
|
id = json.getInt("id");
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert DiasporaPod to JSON
|
||||||
|
*/
|
||||||
|
public JSONObject toJson() throws JSONException {
|
||||||
|
JSONObject json = new JSONObject();
|
||||||
|
json.put("name", name);
|
||||||
|
json.put("score", score);
|
||||||
|
json.put("active6", active6);
|
||||||
|
json.put("id", id);
|
||||||
|
|
||||||
|
// Pod urls
|
||||||
|
JSONArray jarr = new JSONArray();
|
||||||
|
for (DiasporaPodUrl value : podUrls) {
|
||||||
|
jarr.put(value.toJson());
|
||||||
|
}
|
||||||
|
json.put("podUrls", jarr);
|
||||||
|
|
||||||
|
// main langs
|
||||||
|
jarr = new JSONArray();
|
||||||
|
for (String value : mainLangs) {
|
||||||
|
jarr.put(value);
|
||||||
|
}
|
||||||
|
json.put("mainLangs", jarr);
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
boolean ret = false;
|
||||||
|
if (o instanceof DiasporaPod) {
|
||||||
|
DiasporaPod otherPod = (DiasporaPod) o;
|
||||||
|
|
||||||
|
// Check if id is equal
|
||||||
|
ret = this.id != 0 && this.id == otherPod.id;
|
||||||
|
|
||||||
|
// Check if host is the same (fallback if id is 0)
|
||||||
|
if (!ret) {
|
||||||
|
for (DiasporaPodUrl podUrl : podUrls) {
|
||||||
|
for (DiasporaPodUrl otherPodUrl : otherPod.getPodUrls()) {
|
||||||
|
if (podUrl.getBaseUrl().equals(otherPodUrl.getBaseUrl())) {
|
||||||
|
ret = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int compareTo(DiasporaPod otherPod) {
|
||||||
|
if (otherPod != null) {
|
||||||
|
List<DiasporaPodUrl> myPodUrls = getPodUrls();
|
||||||
|
List<DiasporaPodUrl> otherPodUrls = otherPod.getPodUrls();
|
||||||
|
if (!myPodUrls.isEmpty() && !otherPodUrls.isEmpty()) {
|
||||||
|
return myPodUrls.get(0).getHost().compareTo(otherPodUrls.get(0).getHost());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return name.compareTo(otherPod.getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return name + "(" + id + ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Iterator for Iterable interface (forEach, ..)
|
||||||
|
*/
|
||||||
|
public Iterator<DiasporaPodUrl> iterator() {
|
||||||
|
return podUrls.iterator();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Getter & Setter
|
||||||
|
*/
|
||||||
|
public List<DiasporaPodUrl> getPodUrls() {
|
||||||
|
return podUrls;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DiasporaPod setPodUrls(List<DiasporaPodUrl> podUrls) {
|
||||||
|
this.podUrls = podUrls;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getMainLangs() {
|
||||||
|
return mainLangs;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DiasporaPod setMainLangs(List<String> mainLangs) {
|
||||||
|
this.mainLangs = mainLangs;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DiasporaPod appendMainLangs(String... values) {
|
||||||
|
for (String mainLang : values) {
|
||||||
|
this.mainLangs.add(mainLang);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the first DiasporaPodUrl in the list
|
||||||
|
*/
|
||||||
|
public DiasporaPodUrl getPodUrl() {
|
||||||
|
if (podUrls.size() > 0) {
|
||||||
|
return podUrls.get(0);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DiasporaPod appendPodUrls(DiasporaPodUrl... values) {
|
||||||
|
for (DiasporaPodUrl value : values) {
|
||||||
|
this.podUrls.add(value);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DiasporaPod setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getScore() {
|
||||||
|
return score;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DiasporaPod setScore(int score) {
|
||||||
|
this.score = score;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getActive6() {
|
||||||
|
return active6;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DiasporaPod setActive6(long active6) {
|
||||||
|
this.active6 = active6;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DiasporaPod setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ██████╗ ██████╗ ██████╗ ██╗ ██╗██████╗ ██╗
|
||||||
|
* ██╔══██╗██╔═══██╗██╔══██╗ ██║ ██║██╔══██╗██║
|
||||||
|
* ██████╔╝██║ ██║██║ ██║ ██║ ██║██████╔╝██║
|
||||||
|
* ██╔═══╝ ██║ ██║██║ ██║ ██║ ██║██╔══██╗██║
|
||||||
|
* ██║ ╚██████╔╝██████╔╝ ╚██████╔╝██║ ██║███████╗
|
||||||
|
* ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝
|
||||||
|
*/
|
||||||
|
public static class DiasporaPodUrl implements Serializable {
|
||||||
|
private String host = "";
|
||||||
|
private String protocol = "https";
|
||||||
|
private Integer port = 443;
|
||||||
|
|
||||||
|
public DiasporaPodUrl() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public DiasporaPodUrl(JSONObject json) throws JSONException {
|
||||||
|
fromJson(json);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the base url
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getBaseUrl() {
|
||||||
|
return protocol + "://" + host + (isPortNeeded() ? port : "");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert JSON to DiasporaPodList
|
||||||
|
*
|
||||||
|
* @param json JSON Object
|
||||||
|
*/
|
||||||
|
public DiasporaPodUrl fromJson(JSONObject json) throws JSONException {
|
||||||
|
if (json.has("host")) {
|
||||||
|
host = json.getString("host");
|
||||||
|
}
|
||||||
|
if (json.has("protocol")) {
|
||||||
|
protocol = json.getString("protocol");
|
||||||
|
}
|
||||||
|
if (json.has("port")) {
|
||||||
|
port = json.getInt("port");
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* Convert DiasporaPodList to JSON
|
||||||
|
*/
|
||||||
|
public JSONObject toJson() throws JSONException {
|
||||||
|
JSONObject json = new JSONObject();
|
||||||
|
json.put("host", host);
|
||||||
|
if (!protocol.equals("https")) {
|
||||||
|
json.put("protocol", protocol);
|
||||||
|
}
|
||||||
|
if (port != 443) {
|
||||||
|
json.put("port", port);
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set default values for https
|
||||||
|
*/
|
||||||
|
public void setHttpsDefaults() {
|
||||||
|
setProtocol("https");
|
||||||
|
setPort(443);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set default values for http
|
||||||
|
*/
|
||||||
|
public void setHttpDefaults() {
|
||||||
|
setProtocol("http");
|
||||||
|
setPort(80);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tells if the ports needs to shown
|
||||||
|
*/
|
||||||
|
public boolean isPortNeeded() {
|
||||||
|
return !((port == 80 && protocol.equals("http")) || (port == 443 && protocol.equals("https")));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return getBaseUrl();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (o instanceof DiasporaPodUrl) {
|
||||||
|
return getBaseUrl().equals(((DiasporaPodUrl) o).getBaseUrl());
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GETTER & SETTER
|
||||||
|
*/
|
||||||
|
public String getHost() {
|
||||||
|
return host;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DiasporaPodUrl setHost(String host) {
|
||||||
|
this.host = host;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProtocol() {
|
||||||
|
return protocol;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DiasporaPodUrl setProtocol(String protocol) {
|
||||||
|
this.protocol = protocol;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getPort() {
|
||||||
|
return port;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DiasporaPodUrl setPort(Integer port) {
|
||||||
|
this.port = port;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -70,8 +70,8 @@ public class PodAspect {
|
||||||
public String toHtmlLink(final App app) {
|
public String toHtmlLink(final App app) {
|
||||||
final AppSettings appSettings = app.getSettings();
|
final AppSettings appSettings = app.getSettings();
|
||||||
return String.format(Locale.getDefault(),
|
return String.format(Locale.getDefault(),
|
||||||
"<a href='https://%s/aspects?a_ids[]=%d' style='color: #000000; text-decoration: none;'>%s</a>",
|
"<a href='%s/aspects?a_ids[]=%d' style='color: #000000; text-decoration: none;'>%s</a>",
|
||||||
appSettings.getPodDomain(), id, name);
|
appSettings.getPod().getPodUrl().getBaseUrl(), id, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -20,11 +20,9 @@ package com.github.dfa.diaspora_android.data;
|
||||||
|
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
|
|
||||||
import com.github.dfa.diaspora_android.util.AppLog;
|
|
||||||
import com.github.dfa.diaspora_android.util.Log;
|
|
||||||
|
|
||||||
import com.github.dfa.diaspora_android.App;
|
import com.github.dfa.diaspora_android.App;
|
||||||
import com.github.dfa.diaspora_android.listener.WebUserProfileChangedListener;
|
import com.github.dfa.diaspora_android.listener.WebUserProfileChangedListener;
|
||||||
|
import com.github.dfa.diaspora_android.util.AppLog;
|
||||||
|
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
|
@ -173,6 +171,7 @@ public class PodUserProfile {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the avatar, returns true if this was a new one, false if already the old one
|
* Sets the avatar, returns true if this was a new one, false if already the old one
|
||||||
|
*
|
||||||
* @param avatarUrl url
|
* @param avatarUrl url
|
||||||
* @return true if new avatar url
|
* @return true if new avatar url
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -41,10 +41,10 @@ import com.github.dfa.diaspora_android.App;
|
||||||
import com.github.dfa.diaspora_android.R;
|
import com.github.dfa.diaspora_android.R;
|
||||||
import com.github.dfa.diaspora_android.activity.MainActivity;
|
import com.github.dfa.diaspora_android.activity.MainActivity;
|
||||||
import com.github.dfa.diaspora_android.data.AppSettings;
|
import com.github.dfa.diaspora_android.data.AppSettings;
|
||||||
import com.github.dfa.diaspora_android.util.ProxyHandler;
|
|
||||||
import com.github.dfa.diaspora_android.ui.ContextMenuWebView;
|
import com.github.dfa.diaspora_android.ui.ContextMenuWebView;
|
||||||
import com.github.dfa.diaspora_android.util.theming.ThemeHelper;
|
|
||||||
import com.github.dfa.diaspora_android.util.AppLog;
|
import com.github.dfa.diaspora_android.util.AppLog;
|
||||||
|
import com.github.dfa.diaspora_android.util.ProxyHandler;
|
||||||
|
import com.github.dfa.diaspora_android.util.theming.ThemeHelper;
|
||||||
import com.github.dfa.diaspora_android.webview.CustomWebViewClient;
|
import com.github.dfa.diaspora_android.webview.CustomWebViewClient;
|
||||||
import com.github.dfa.diaspora_android.webview.ProgressBarWebChromeClient;
|
import com.github.dfa.diaspora_android.webview.ProgressBarWebChromeClient;
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@ public abstract class CustomFragment extends Fragment {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We have an optionsMenu
|
* We have an optionsMenu
|
||||||
|
*
|
||||||
* @param savedInstanceState state
|
* @param savedInstanceState state
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -44,12 +45,14 @@ public abstract class CustomFragment extends Fragment {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the tag used to identify the Fragment.
|
* Return the tag used to identify the Fragment.
|
||||||
|
*
|
||||||
* @return tag
|
* @return tag
|
||||||
*/
|
*/
|
||||||
public abstract String getFragmentTag();
|
public abstract String getFragmentTag();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add fragment-dependent options to the bottom options toolbar
|
* Add fragment-dependent options to the bottom options toolbar
|
||||||
|
*
|
||||||
* @param menu bottom menu
|
* @param menu bottom menu
|
||||||
* @param inflater inflater
|
* @param inflater inflater
|
||||||
*/
|
*/
|
||||||
|
@ -58,6 +61,7 @@ public abstract class CustomFragment extends Fragment {
|
||||||
/**
|
/**
|
||||||
* Return true if the fragment reacted to a back button press, false else.
|
* Return true if the fragment reacted to a back button press, false else.
|
||||||
* In case the fragment returned false, the parent activity should handle the backPress.
|
* In case the fragment returned false, the parent activity should handle the backPress.
|
||||||
|
*
|
||||||
* @return did we react to the back press?
|
* @return did we react to the back press?
|
||||||
*/
|
*/
|
||||||
public abstract boolean onBackPressed();
|
public abstract boolean onBackPressed();
|
||||||
|
|
|
@ -44,12 +44,12 @@ import com.github.dfa.diaspora_android.App;
|
||||||
import com.github.dfa.diaspora_android.R;
|
import com.github.dfa.diaspora_android.R;
|
||||||
import com.github.dfa.diaspora_android.activity.MainActivity;
|
import com.github.dfa.diaspora_android.activity.MainActivity;
|
||||||
import com.github.dfa.diaspora_android.data.PodUserProfile;
|
import com.github.dfa.diaspora_android.data.PodUserProfile;
|
||||||
import com.github.dfa.diaspora_android.webview.DiasporaStreamWebChromeClient;
|
|
||||||
import com.github.dfa.diaspora_android.webview.FileUploadWebChromeClient;
|
|
||||||
import com.github.dfa.diaspora_android.util.AppLog;
|
import com.github.dfa.diaspora_android.util.AppLog;
|
||||||
import com.github.dfa.diaspora_android.util.DiasporaUrlHelper;
|
import com.github.dfa.diaspora_android.util.DiasporaUrlHelper;
|
||||||
import com.github.dfa.diaspora_android.util.Helpers;
|
import com.github.dfa.diaspora_android.util.Helpers;
|
||||||
import com.github.dfa.diaspora_android.util.WebHelper;
|
import com.github.dfa.diaspora_android.util.WebHelper;
|
||||||
|
import com.github.dfa.diaspora_android.webview.DiasporaStreamWebChromeClient;
|
||||||
|
import com.github.dfa.diaspora_android.webview.FileUploadWebChromeClient;
|
||||||
|
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
|
|
||||||
|
@ -228,6 +228,7 @@ public class DiasporaStreamFragment extends BrowserFragment {
|
||||||
public String getSharedText() {
|
public String getSharedText() {
|
||||||
return ((MainActivity) getActivity()).getTextToBeShared();
|
return ((MainActivity) getActivity()).getTextToBeShared();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setSharedText(String shared) {
|
public void setSharedText(String shared) {
|
||||||
((MainActivity) getActivity()).setTextToBeShared(shared);
|
((MainActivity) getActivity()).setTextToBeShared(shared);
|
||||||
|
@ -261,7 +262,8 @@ public class DiasporaStreamFragment extends BrowserFragment {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AppLog.v(this, "onOpenFileChooser");
|
AppLog.v(this, "onOpenFileChooser");
|
||||||
if (imageUploadFilePathCallbackNew != null) imageUploadFilePathCallbackNew.onReceiveValue(null);
|
if (imageUploadFilePathCallbackNew != null)
|
||||||
|
imageUploadFilePathCallbackNew.onReceiveValue(null);
|
||||||
imageUploadFilePathCallbackNew = filePathCallback;
|
imageUploadFilePathCallbackNew = filePathCallback;
|
||||||
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||||
if (takePictureIntent.resolveActivity(getContext().getPackageManager()) != null) {
|
if (takePictureIntent.resolveActivity(getContext().getPackageManager()) != null) {
|
||||||
|
|
|
@ -18,20 +18,16 @@
|
||||||
*/
|
*/
|
||||||
package com.github.dfa.diaspora_android.fragment;
|
package com.github.dfa.diaspora_android.fragment;
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.content.BroadcastReceiver;
|
import android.content.BroadcastReceiver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.design.widget.Snackbar;
|
import android.support.design.widget.Snackbar;
|
||||||
import android.support.v4.content.LocalBroadcastManager;
|
import android.support.v4.content.LocalBroadcastManager;
|
||||||
import android.text.Editable;
|
import android.support.v4.view.MenuItemCompat;
|
||||||
import android.text.SpannableString;
|
import android.support.v7.widget.SearchView;
|
||||||
import android.text.TextWatcher;
|
|
||||||
import android.text.util.Linkify;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuInflater;
|
import android.view.MenuInflater;
|
||||||
|
@ -41,74 +37,98 @@ import android.view.ViewGroup;
|
||||||
import android.webkit.CookieManager;
|
import android.webkit.CookieManager;
|
||||||
import android.widget.AdapterView;
|
import android.widget.AdapterView;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.EditText;
|
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.github.dfa.diaspora_android.App;
|
import com.github.dfa.diaspora_android.App;
|
||||||
import com.github.dfa.diaspora_android.R;
|
import com.github.dfa.diaspora_android.R;
|
||||||
import com.github.dfa.diaspora_android.activity.MainActivity;
|
import com.github.dfa.diaspora_android.activity.MainActivity;
|
||||||
import com.github.dfa.diaspora_android.data.AppSettings;
|
import com.github.dfa.diaspora_android.data.AppSettings;
|
||||||
|
import com.github.dfa.diaspora_android.data.DiasporaPodList;
|
||||||
|
import com.github.dfa.diaspora_android.data.DiasporaPodList.DiasporaPod;
|
||||||
import com.github.dfa.diaspora_android.task.GetPodsService;
|
import com.github.dfa.diaspora_android.task.GetPodsService;
|
||||||
|
import com.github.dfa.diaspora_android.ui.PodSelectionDialog;
|
||||||
import com.github.dfa.diaspora_android.util.AppLog;
|
import com.github.dfa.diaspora_android.util.AppLog;
|
||||||
import com.github.dfa.diaspora_android.util.DiasporaUrlHelper;
|
import com.github.dfa.diaspora_android.util.DiasporaUrlHelper;
|
||||||
import com.github.dfa.diaspora_android.util.WebHelper;
|
import com.github.dfa.diaspora_android.util.Helpers;
|
||||||
|
|
||||||
|
import org.json.JSONException;
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import butterknife.BindView;
|
||||||
|
import butterknife.ButterKnife;
|
||||||
|
import butterknife.OnClick;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fragment that lets the user choose a Pod
|
* Fragment that lets the user choose a Pod
|
||||||
* Created by vanitas on 01.10.16.
|
* Created by vanitas on 01.10.16.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class PodSelectionFragment extends CustomFragment {
|
public class PodSelectionFragment extends CustomFragment implements SearchView.OnQueryTextListener, PodSelectionDialog.PodSelectionDialogResultListener {
|
||||||
public static final String TAG = "com.github.dfa.diaspora_android.PodSelectionFragment";
|
public static final String TAG = "com.github.dfa.diaspora_android.PodSelectionFragment";
|
||||||
|
|
||||||
protected EditText editFilter;
|
@BindView(R.id.podselection__fragment__listpods)
|
||||||
protected ListView listPods;
|
protected ListView listViewPod;
|
||||||
protected ImageView selectPodButton;
|
|
||||||
|
|
||||||
protected App app;
|
protected App app;
|
||||||
protected AppSettings appSettings;
|
protected AppSettings appSettings;
|
||||||
|
private DiasporaPodList podList;
|
||||||
|
private ArrayAdapter<String> listViewPodAdapter;
|
||||||
|
private String filterString = "";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
AppLog.d(this, "onCreateView()");
|
AppLog.d(this, "onCreateView()");
|
||||||
return inflater.inflate(R.layout.podselection__fragment, container, false);
|
View view = inflater.inflate(R.layout.podselection__fragment, container, false);
|
||||||
|
ButterKnife.bind(this, view);
|
||||||
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
this.app = (App) getActivity().getApplication();
|
app = (App) getActivity().getApplication();
|
||||||
this.appSettings = app.getSettings();
|
appSettings = app.getSettings();
|
||||||
|
|
||||||
this.editFilter = (EditText) view.findViewById(R.id.podselection__edit_filter);
|
// Load local podlist
|
||||||
this.listPods = (ListView) view.findViewById(R.id.podselection__listpods);
|
podList = new DiasporaPodList();
|
||||||
this.selectPodButton = (ImageView) view.findViewById(R.id.podselection__button_select_pod);
|
mergePodlistWithRessources(podList);
|
||||||
|
podList.setTrackMergeChanges(true);
|
||||||
|
updateListedPods();
|
||||||
|
|
||||||
listPods.setTextFilterEnabled(true);
|
|
||||||
listPods.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
listViewPod.setTextFilterEnabled(true);
|
||||||
@Override
|
listViewPod.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||||
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
|
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
|
||||||
showPodConfirmationDialog((String) listPods.getAdapter().getItem(i));
|
String text = ((TextView) view).getText().toString();
|
||||||
|
for (DiasporaPod pod : podList) {
|
||||||
|
if (pod.getPodUrl().getHost().equals(text)) {
|
||||||
|
showPodSelectionDialog(pod);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
setListedPods(appSettings.getPreviousPodlist());
|
|
||||||
LocalBroadcastManager.getInstance(getContext()).registerReceiver(podListReceiver, new IntentFilter(GetPodsService.MESSAGE_PODS_RECEIVED));
|
LocalBroadcastManager.getInstance(getContext()).registerReceiver(podListReceiver, new IntentFilter(GetPodsService.MESSAGE_PODS_RECEIVED));
|
||||||
if (!WebHelper.isOnline(getContext())) {
|
Helpers.showInfoIfUserNotConnectedToInternet(getContext(), listViewPod);
|
||||||
Snackbar.make(listPods, R.string.no_internet, Snackbar.LENGTH_LONG).show();
|
|
||||||
}
|
}
|
||||||
selectPodButton.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
public void mergePodlistWithRessources(DiasporaPodList podlist) {
|
||||||
public void onClick(View view) {
|
String sPodlist = Helpers.readTextfileFromRawRessource(getContext(), R.raw.podlist, "", "");
|
||||||
if (editFilter.getText().length() > 4 && editFilter.getText().toString().contains("")) {
|
try {
|
||||||
showPodConfirmationDialog(editFilter.getText().toString());
|
JSONObject jPodlist = new JSONObject(sPodlist);
|
||||||
} else {
|
podlist.mergeWithNewerEntries(new DiasporaPodList().fromJson(jPodlist));
|
||||||
Snackbar.make(listPods, R.string.valid_pod, Snackbar.LENGTH_LONG).show();
|
} catch (JSONException e) {
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
@OnClick(R.id.podselection__fragment__button_use_custom_pod)
|
||||||
|
public void onPodButtonClicked(View v) {
|
||||||
|
showPodSelectionDialog(new DiasporaPod());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -116,28 +136,20 @@ public class PodSelectionFragment extends CustomFragment {
|
||||||
return TAG;
|
return TAG;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onCreateBottomOptionsMenu(Menu menu, MenuInflater inflater) {
|
|
||||||
/* Nothing to do */
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onBackPressed() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private final BroadcastReceiver podListReceiver = new BroadcastReceiver() {
|
private final BroadcastReceiver podListReceiver = new BroadcastReceiver() {
|
||||||
@Override
|
@Override
|
||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
if (intent.hasExtra("pods")) {
|
if (intent.hasExtra(GetPodsService.EXTRA_PODLIST)) {
|
||||||
Bundle extras = intent.getExtras();
|
Bundle extras = intent.getExtras();
|
||||||
String[] pods = extras.getStringArray("pods");
|
DiasporaPodList newPods = (DiasporaPodList) extras.get(GetPodsService.EXTRA_PODLIST);
|
||||||
if (pods != null && pods.length > 0) {
|
if (newPods != null && newPods.getPods().size() > 0) {
|
||||||
app.getSettings().setPreviousPodlist(pods);
|
try {
|
||||||
setListedPods(pods);
|
podList.mergeWithNewerEntries(newPods);
|
||||||
|
updateListedPods();
|
||||||
|
} catch (JSONException ignored) {
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
setListedPods(app.getSettings().getPreviousPodlist());
|
Snackbar.make(listViewPod, R.string.podlist_error, Snackbar.LENGTH_SHORT).show();
|
||||||
Snackbar.make(listPods, R.string.podlist_error, Snackbar.LENGTH_SHORT).show();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -150,67 +162,78 @@ public class PodSelectionFragment extends CustomFragment {
|
||||||
getContext().startService(i);
|
getContext().startService(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updateListedPods() {
|
||||||
private void setListedPods(String[] listedPodsArr) {
|
|
||||||
final ArrayList<String> listedPodsList = new ArrayList<>();
|
final ArrayList<String> listedPodsList = new ArrayList<>();
|
||||||
for (String pod : listedPodsArr) {
|
for (DiasporaPod pod : this.podList) {
|
||||||
listedPodsList.add(pod.toLowerCase());
|
listedPodsList.add(pod.getPodUrl().getHost());
|
||||||
}
|
}
|
||||||
|
|
||||||
final ArrayAdapter<String> adapter = new ArrayAdapter<>(
|
listViewPodAdapter = new ArrayAdapter<>(
|
||||||
getContext(),
|
getContext(),
|
||||||
android.R.layout.simple_list_item_1,
|
android.R.layout.simple_list_item_1,
|
||||||
listedPodsList);
|
listedPodsList);
|
||||||
|
|
||||||
// save index and top position
|
// save index and top position
|
||||||
int index = listPods.getFirstVisiblePosition();
|
int index = listViewPod.getFirstVisiblePosition();
|
||||||
View v = listPods.getChildAt(0);
|
View v = listViewPod.getChildAt(0);
|
||||||
int top = (v == null) ? 0 : (v.getTop() - listPods.getPaddingTop());
|
int top = (v == null) ? 0 : (v.getTop() - listViewPod.getPaddingTop());
|
||||||
listPods.setAdapter(adapter);
|
listViewPod.setAdapter(listViewPodAdapter);
|
||||||
listPods.setSelectionFromTop(index, top);
|
listViewPod.setSelectionFromTop(index, top);
|
||||||
|
|
||||||
|
listViewPodAdapter.getFilter().filter(filterString);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void showPodSelectionDialog(final DiasporaPod selectedPod) {
|
||||||
|
PodSelectionDialog dialog = PodSelectionDialog.newInstance(selectedPod, this);
|
||||||
|
dialog.show(getFragmentManager(), PodSelectionDialog.TAG);
|
||||||
|
}
|
||||||
|
|
||||||
adapter.getFilter().filter(editFilter.getText());
|
|
||||||
editFilter.addTextChangedListener(new TextWatcher() {
|
|
||||||
@Override
|
@Override
|
||||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
public void onDestroy() {
|
||||||
(adapter).getFilter().filter(s.toString());
|
LocalBroadcastManager.getInstance(getContext()).unregisterReceiver(podListReceiver);
|
||||||
|
super.onDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
@Override
|
||||||
|
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||||
|
inflater.inflate(R.menu.podselection__menu, menu);
|
||||||
|
|
||||||
|
MenuItem searchItem = menu.findItem(R.id.podselection__action_search);
|
||||||
|
if (searchItem != null) {
|
||||||
|
SearchView searchView = (SearchView) MenuItemCompat.getActionView(searchItem);
|
||||||
|
searchView.setOnQueryTextListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void afterTextChanged(Editable s) {
|
super.onCreateOptionsMenu(menu, inflater);
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showPodConfirmationDialog(final String selectedPod) {
|
@Override
|
||||||
// Make a clickable link
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
final SpannableString dialogMessage = new SpannableString(getString(R.string.confirm_pod, selectedPod));
|
switch (item.getItemId()) {
|
||||||
Linkify.addLinks(dialogMessage, Linkify.ALL);
|
case R.id.action_reload: {
|
||||||
|
if (!Helpers.showInfoIfUserNotConnectedToInternet(getContext(), listViewPod)) {
|
||||||
// Check if online
|
Intent i = new Intent(getContext(), GetPodsService.class);
|
||||||
if (!WebHelper.isOnline(getContext())) {
|
getContext().startService(i);
|
||||||
Snackbar.make(listPods, R.string.no_internet, Snackbar.LENGTH_LONG).show();
|
return true;
|
||||||
return;
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show dialog
|
@Override
|
||||||
new AlertDialog.Builder(getContext())
|
public boolean onQueryTextChange(String newText) {
|
||||||
.setTitle(getString(R.string.confirmation))
|
if (listViewPodAdapter != null) {
|
||||||
.setMessage(dialogMessage)
|
(listViewPodAdapter).getFilter().filter(newText);
|
||||||
.setPositiveButton(android.R.string.yes,
|
|
||||||
new DialogInterface.OnClickListener() {
|
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
|
||||||
onPodSelectionConfirmed(selectedPod);
|
|
||||||
}
|
}
|
||||||
})
|
return true;
|
||||||
.setNegativeButton(android.R.string.no, null)
|
|
||||||
.show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onPodSelectionConfirmed(String selectedPod) {
|
@Override
|
||||||
app.getSettings().setPodDomain(selectedPod);
|
public void onPodSelectionDialogResult(DiasporaPod pod, boolean accepted) {
|
||||||
|
System.out.println(accepted + ": " + pod.toString());
|
||||||
|
if (accepted) {
|
||||||
|
app.getSettings().setPod(pod);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||||
|
@ -226,35 +249,29 @@ public class PodSelectionFragment extends CustomFragment {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
((MainActivity)getActivity()).openDiasporaUrl(new DiasporaUrlHelper(appSettings).getPodUrl());
|
MainActivity mainActivity = (MainActivity) getActivity();
|
||||||
|
DiasporaUrlHelper urlHelper = new DiasporaUrlHelper(appSettings);
|
||||||
|
mainActivity.invalidateOptionsMenu();
|
||||||
|
mainActivity.openDiasporaUrl(urlHelper.getSignInUrl());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Dummy implementations
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreateBottomOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public boolean onQueryTextSubmit(String query) {
|
||||||
LocalBroadcastManager.getInstance(getContext()).unregisterReceiver(podListReceiver);
|
return false;
|
||||||
super.onDestroy();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
public boolean onBackPressed() {
|
||||||
inflater.inflate(R.menu.podselection__menu, menu);
|
|
||||||
super.onCreateOptionsMenu(menu, inflater);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
|
||||||
switch (item.getItemId()) {
|
|
||||||
case R.id.action_reload: {
|
|
||||||
if (WebHelper.isOnline(getContext())) {
|
|
||||||
Intent i = new Intent(getContext(), GetPodsService.class);
|
|
||||||
getContext().startService(i);
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
Snackbar.make(listPods, R.string.no_internet, Snackbar.LENGTH_LONG).show();
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return super.onOptionsItemSelected(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -24,24 +24,24 @@ import android.os.AsyncTask;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.support.v4.content.LocalBroadcastManager;
|
import android.support.v4.content.LocalBroadcastManager;
|
||||||
|
|
||||||
|
import com.github.dfa.diaspora_android.data.DiasporaPodList;
|
||||||
import com.github.dfa.diaspora_android.util.AppLog;
|
import com.github.dfa.diaspora_android.util.AppLog;
|
||||||
|
|
||||||
import org.json.JSONArray;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.net.ssl.HttpsURLConnection;
|
import javax.net.ssl.HttpsURLConnection;
|
||||||
|
|
||||||
import info.guardianproject.netcipher.NetCipher;
|
import info.guardianproject.netcipher.NetCipher;
|
||||||
|
|
||||||
public class GetPodsService extends Service {
|
public class GetPodsService extends Service {
|
||||||
|
public static final String EXTRA_PODLIST = "pods";
|
||||||
public static final String MESSAGE_PODS_RECEIVED = "com.github.dfa.diaspora.podsreceived";
|
public static final String MESSAGE_PODS_RECEIVED = "com.github.dfa.diaspora.podsreceived";
|
||||||
|
public static final String PODDY_PODLIST_URL = "https://raw.githubusercontent.com/Diaspora-for-Android/diaspora-android-extras/master/podList/podlist.json";
|
||||||
|
|
||||||
public GetPodsService() {
|
public GetPodsService() {
|
||||||
}
|
}
|
||||||
|
@ -53,75 +53,48 @@ public class GetPodsService extends Service {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void getPods() {
|
private void getPods() {
|
||||||
/*
|
AsyncTask<Void, Void, DiasporaPodList> getPodsAsync = new AsyncTask<Void, Void, DiasporaPodList>() {
|
||||||
* Most of the code in this AsyncTask is from the file getPodlistTask.java
|
|
||||||
* from the app "Diaspora Webclient".
|
|
||||||
* A few modifications and adaptations were made by me.
|
|
||||||
* Source:
|
|
||||||
* https://github.com/voidcode/Diaspora-Webclient/blob/master/src/com/voidcode/diasporawebclient/getPodlistTask.java
|
|
||||||
* Thanks to Terkel Sørensen ; License : GPLv3
|
|
||||||
*/
|
|
||||||
AsyncTask<Void, Void, String[]> getPodsAsync = new AsyncTask<Void, Void, String[]>() {
|
|
||||||
@Override
|
@Override
|
||||||
protected String[] doInBackground(Void... params) {
|
protected DiasporaPodList doInBackground(Void... params) {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
// TODO: Update deprecated code
|
BufferedReader br = null;
|
||||||
|
|
||||||
StringBuilder builder = new StringBuilder();
|
|
||||||
//HttpClient client = new DefaultHttpClient();
|
|
||||||
List<String> list = null;
|
|
||||||
HttpsURLConnection connection;
|
|
||||||
InputStream inStream;
|
|
||||||
try {
|
try {
|
||||||
connection = NetCipher.getHttpsURLConnection("https://podupti.me/api.php?key=4r45tg&format=json");
|
HttpsURLConnection con = NetCipher.getHttpsURLConnection(PODDY_PODLIST_URL);
|
||||||
int statusCode = connection.getResponseCode();
|
if (con.getResponseCode() == HttpsURLConnection.HTTP_OK) {
|
||||||
if (statusCode == 200) {
|
br = new BufferedReader(new InputStreamReader(con.getInputStream()));
|
||||||
inStream = connection.getInputStream();
|
|
||||||
BufferedReader reader = new BufferedReader(
|
|
||||||
new InputStreamReader(inStream));
|
|
||||||
String line;
|
String line;
|
||||||
while ((line = reader.readLine()) != null) {
|
while ((line = br.readLine()) != null) {
|
||||||
builder.append(line);
|
sb.append(line);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
// Parse JSON & return pod list
|
||||||
inStream.close();
|
JSONObject json = new JSONObject(sb.toString());
|
||||||
} catch (IOException e) {/*Nothing to do*/}
|
return new DiasporaPodList().fromJson(json);
|
||||||
|
|
||||||
connection.disconnect();
|
|
||||||
} else {
|
} else {
|
||||||
AppLog.e(this, "Failed to download list of pods");
|
AppLog.e(this, "Failed to download list of pods");
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException | JSONException e) {
|
||||||
//TODO handle json buggy feed
|
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
} finally {
|
||||||
//Parse the JSON Data
|
if (br != null) {
|
||||||
try {
|
try {
|
||||||
JSONObject jsonObjectAll = new JSONObject(builder.toString());
|
br.close();
|
||||||
JSONArray jsonArrayAll = jsonObjectAll.getJSONArray("pods");
|
} catch (IOException ignored) {
|
||||||
AppLog.d(this, "Number of entries " + jsonArrayAll.length());
|
}
|
||||||
list = new ArrayList<>();
|
}
|
||||||
for (int i = 0; i < jsonArrayAll.length(); i++) {
|
|
||||||
JSONObject jo = jsonArrayAll.getJSONObject(i);
|
|
||||||
if (jo.getString("secure").equals("true"))
|
|
||||||
list.add(jo.getString("domain"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
// Could not fetch list of pods :(
|
||||||
//TODO Handle Parsing errors here
|
return new DiasporaPodList();
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
if (list != null)
|
|
||||||
return list.toArray(new String[list.size()]);
|
|
||||||
else
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPostExecute(String[] pods) {
|
protected void onPostExecute(DiasporaPodList pods) {
|
||||||
|
if (pods == null) {
|
||||||
|
pods = new DiasporaPodList();
|
||||||
|
}
|
||||||
Intent broadcastIntent = new Intent(MESSAGE_PODS_RECEIVED);
|
Intent broadcastIntent = new Intent(MESSAGE_PODS_RECEIVED);
|
||||||
broadcastIntent.putExtra("pods", pods != null ? pods : new String[0]);
|
broadcastIntent.putExtra(EXTRA_PODLIST, pods);
|
||||||
LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(broadcastIntent);
|
LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(broadcastIntent);
|
||||||
stopSelf();
|
stopSelf();
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,12 +22,9 @@ import android.graphics.Bitmap;
|
||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
|
|
||||||
import com.github.dfa.diaspora_android.util.AppLog;
|
|
||||||
import com.github.dfa.diaspora_android.util.Log;
|
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
|
||||||
import com.github.dfa.diaspora_android.App;
|
import com.github.dfa.diaspora_android.util.AppLog;
|
||||||
|
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
|
@ -20,13 +20,11 @@ package com.github.dfa.diaspora_android.task;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
|
|
||||||
import com.github.dfa.diaspora_android.util.AppLog;
|
|
||||||
import com.github.dfa.diaspora_android.util.Log;
|
|
||||||
import android.webkit.CookieManager;
|
import android.webkit.CookieManager;
|
||||||
|
|
||||||
import com.github.dfa.diaspora_android.App;
|
import com.github.dfa.diaspora_android.App;
|
||||||
import com.github.dfa.diaspora_android.data.PodUserProfile;
|
import com.github.dfa.diaspora_android.data.PodUserProfile;
|
||||||
|
import com.github.dfa.diaspora_android.util.AppLog;
|
||||||
import com.github.dfa.diaspora_android.util.DiasporaUrlHelper;
|
import com.github.dfa.diaspora_android.util.DiasporaUrlHelper;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
|
|
|
@ -20,12 +20,10 @@ package com.github.dfa.diaspora_android.task;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
|
|
||||||
import com.github.dfa.diaspora_android.util.AppLog;
|
|
||||||
import com.github.dfa.diaspora_android.util.Log;
|
|
||||||
import android.webkit.CookieManager;
|
import android.webkit.CookieManager;
|
||||||
|
|
||||||
import com.github.dfa.diaspora_android.App;
|
import com.github.dfa.diaspora_android.App;
|
||||||
|
import com.github.dfa.diaspora_android.util.AppLog;
|
||||||
import com.github.dfa.diaspora_android.util.DiasporaUrlHelper;
|
import com.github.dfa.diaspora_android.util.DiasporaUrlHelper;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
|
|
|
@ -9,6 +9,8 @@ import android.support.design.widget.AppBarLayout;
|
||||||
|
|
||||||
public interface IntellihideToolbarActivityListener {
|
public interface IntellihideToolbarActivityListener {
|
||||||
int toolbarDefaultScrollFlags = AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL | AppBarLayout.LayoutParams.SCROLL_FLAG_ENTER_ALWAYS | AppBarLayout.LayoutParams.SCROLL_FLAG_SNAP;
|
int toolbarDefaultScrollFlags = AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL | AppBarLayout.LayoutParams.SCROLL_FLAG_ENTER_ALWAYS | AppBarLayout.LayoutParams.SCROLL_FLAG_SNAP;
|
||||||
|
|
||||||
void enableToolbarHiding();
|
void enableToolbarHiding();
|
||||||
|
|
||||||
void disableToolbarHiding();
|
void disableToolbarHiding();
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,195 @@
|
||||||
|
package com.github.dfa.diaspora_android.ui;
|
||||||
|
|
||||||
|
|
||||||
|
import android.app.Dialog;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.support.annotation.NonNull;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
|
import android.support.v7.app.AppCompatDialogFragment;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.RadioGroup;
|
||||||
|
import android.widget.Spinner;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.github.dfa.diaspora_android.R;
|
||||||
|
import com.github.dfa.diaspora_android.data.DiasporaPodList.DiasporaPod;
|
||||||
|
import com.github.dfa.diaspora_android.data.DiasporaPodList.DiasporaPod.DiasporaPodUrl;
|
||||||
|
|
||||||
|
import org.json.JSONException;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import butterknife.BindView;
|
||||||
|
import butterknife.ButterKnife;
|
||||||
|
import butterknife.OnClick;
|
||||||
|
import butterknife.OnItemSelected;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by gsantner (https://gsantner.github.io) on 06.10.16.
|
||||||
|
*/
|
||||||
|
public class PodSelectionDialog extends AppCompatDialogFragment {
|
||||||
|
public static final String TAG = "com.github.dfa.diaspora_android.PodSelectionDialog";
|
||||||
|
|
||||||
|
public static interface PodSelectionDialogResultListener {
|
||||||
|
void onPodSelectionDialogResult(DiasporaPod pod, boolean accepted);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static PodSelectionDialog newInstance(PodSelectionDialogResultListener resultListener) {
|
||||||
|
return newInstance(new DiasporaPod(), resultListener);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static PodSelectionDialog newInstance(DiasporaPod pod, PodSelectionDialogResultListener resultListener) {
|
||||||
|
PodSelectionDialog dialog = new PodSelectionDialog();
|
||||||
|
dialog.setPod(pod);
|
||||||
|
dialog.setResultListener(resultListener);
|
||||||
|
return dialog;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
// ██████╗ ██╗ █████╗ ██╗ ██████╗ ██████╗
|
||||||
|
// ██╔══██╗██║██╔══██╗██║ ██╔═══██╗██╔════╝
|
||||||
|
// ██║ ██║██║███████║██║ ██║ ██║██║ ███╗
|
||||||
|
// ██║ ██║██║██╔══██║██║ ██║ ██║██║ ██║
|
||||||
|
// ██████╔╝██║██║ ██║███████╗╚██████╔╝╚██████╔╝
|
||||||
|
// ╚═════╝ ╚═╝╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═════╝
|
||||||
|
*/
|
||||||
|
|
||||||
|
@BindView(R.id.podselection__dialog__edit_podaddress)
|
||||||
|
EditText editPodAddress;
|
||||||
|
|
||||||
|
@BindView(R.id.podselection__dialog__edit_podname)
|
||||||
|
EditText editPodName;
|
||||||
|
|
||||||
|
@BindView(R.id.podselection__dialog__radiogroup_protocol)
|
||||||
|
RadioGroup radiogrpProtocol;
|
||||||
|
|
||||||
|
@BindView(R.id.podselection__dialog__text_profile)
|
||||||
|
TextView textProfile;
|
||||||
|
|
||||||
|
@BindView(R.id.podselection__dialog__spinner_profile)
|
||||||
|
Spinner spinnerProfile;
|
||||||
|
|
||||||
|
private PodSelectionDialogResultListener resultListener;
|
||||||
|
private View root;
|
||||||
|
private DiasporaPod pod = new DiasporaPod();
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||||
|
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||||
|
LayoutInflater inflater = getActivity().getLayoutInflater();
|
||||||
|
|
||||||
|
// Bind UI
|
||||||
|
root = inflater.inflate(R.layout.podselection__dialog, null);
|
||||||
|
ButterKnife.bind(this, root);
|
||||||
|
editPodName.setText(pod.getName());
|
||||||
|
List<DiasporaPodUrl> podUrls = pod.getPodUrls();
|
||||||
|
if (podUrls.size() > 0) {
|
||||||
|
uiLoadDiasporaUrl(0);
|
||||||
|
}
|
||||||
|
if (podUrls.size() > 1) {
|
||||||
|
textProfile.setVisibility(View.VISIBLE);
|
||||||
|
spinnerProfile.setVisibility(View.VISIBLE);
|
||||||
|
String[] podUrlss = new String[podUrls.size()];
|
||||||
|
for (int i = 0; i < podUrls.size(); podUrlss[i] = podUrls.get(i++).getBaseUrl()) ;
|
||||||
|
ArrayAdapter<String> spinnerAdapter = new ArrayAdapter<String>(getContext(), android.R.layout.simple_spinner_item, podUrlss);
|
||||||
|
spinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||||
|
spinnerProfile.setAdapter(spinnerAdapter);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
builder.setView(root);
|
||||||
|
return builder.create();
|
||||||
|
}
|
||||||
|
|
||||||
|
@OnItemSelected(R.id.podselection__dialog__spinner_profile)
|
||||||
|
public void spinnerItemSelected(Spinner spinner, int position) {
|
||||||
|
uiLoadDiasporaUrl(position);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void uiLoadDiasporaUrl(int wantedPodUrlPos) {
|
||||||
|
List<DiasporaPodUrl> podUrls = pod.getPodUrls();
|
||||||
|
if (podUrls.size() == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
wantedPodUrlPos = wantedPodUrlPos < podUrls.size() ? wantedPodUrlPos : 0;
|
||||||
|
|
||||||
|
DiasporaPodUrl url1 = podUrls.get(wantedPodUrlPos);
|
||||||
|
editPodAddress.setText(url1.getHost());
|
||||||
|
radiogrpProtocol.check(url1.getProtocol().equals("https")
|
||||||
|
? R.id.podselection__dialog__radio_https : R.id.podselection__dialog__radio_http);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@OnClick({R.id.podselection__dialog__btn_ok, R.id.podselection__dialog__btn_cancel})
|
||||||
|
public void onResultButtonClicked(View view) {
|
||||||
|
boolean POSITIVE_PRESSED = view.getId() == R.id.podselection__dialog__btn_ok;
|
||||||
|
if (POSITIVE_PRESSED) {
|
||||||
|
if (!checkInputs()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
DiasporaPodUrl podUrl = new DiasporaPodUrl();
|
||||||
|
if (radiogrpProtocol.getCheckedRadioButtonId() == R.id.podselection__dialog__radio_https) {
|
||||||
|
podUrl.setHttpsDefaults();
|
||||||
|
} else {
|
||||||
|
podUrl.setHttpDefaults();
|
||||||
|
}
|
||||||
|
podUrl.setHost(editPodAddress.getText().toString());
|
||||||
|
pod.setName(editPodName.getText().toString());
|
||||||
|
pod.getPodUrls().clear();
|
||||||
|
pod.getPodUrls().add(podUrl);
|
||||||
|
getDialog().dismiss();
|
||||||
|
publishResult(POSITIVE_PRESSED);
|
||||||
|
} else {
|
||||||
|
getDialog().cancel();
|
||||||
|
publishResult(POSITIVE_PRESSED);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean checkInputs() {
|
||||||
|
boolean ok = true;
|
||||||
|
String s = editPodAddress.getText().toString();
|
||||||
|
if (TextUtils.isEmpty(s) || s.length() < 3) {
|
||||||
|
editPodAddress.setError(getString(R.string.missing_value));
|
||||||
|
ok = false;
|
||||||
|
}
|
||||||
|
s = editPodName.getText().toString();
|
||||||
|
if (TextUtils.isEmpty(s) || s.length() < 3) {
|
||||||
|
editPodName.setError(getString(R.string.missing_value));
|
||||||
|
ok = false;
|
||||||
|
}
|
||||||
|
return ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void publishResult(boolean accepted) {
|
||||||
|
if (resultListener != null) {
|
||||||
|
resultListener.onPodSelectionDialogResult(pod, accepted);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GETTER & SETTER
|
||||||
|
*/
|
||||||
|
public PodSelectionDialogResultListener getResultListener() {
|
||||||
|
return resultListener;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResultListener(PodSelectionDialogResultListener resultListener) {
|
||||||
|
this.resultListener = resultListener;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DiasporaPod getPod() {
|
||||||
|
return pod;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPod(DiasporaPod pod) {
|
||||||
|
try {
|
||||||
|
this.pod = new DiasporaPod().fromJson(pod.toJson());
|
||||||
|
} catch (JSONException ignored) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -26,7 +26,6 @@ import android.support.customtabs.CustomTabsClient;
|
||||||
import android.support.customtabs.CustomTabsIntent;
|
import android.support.customtabs.CustomTabsIntent;
|
||||||
import android.support.customtabs.CustomTabsServiceConnection;
|
import android.support.customtabs.CustomTabsServiceConnection;
|
||||||
import android.support.customtabs.CustomTabsSession;
|
import android.support.customtabs.CustomTabsSession;
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -68,6 +67,7 @@ public class CustomTabActivityHelper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unbinds the Activity from the Custom Tabs Service
|
* Unbinds the Activity from the Custom Tabs Service
|
||||||
|
*
|
||||||
* @param activity the activity that is connected to the service
|
* @param activity the activity that is connected to the service
|
||||||
*/
|
*/
|
||||||
public void unbindCustomTabsService(Activity activity) {
|
public void unbindCustomTabsService(Activity activity) {
|
||||||
|
@ -93,6 +93,7 @@ public class CustomTabActivityHelper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register a Callback to be called when connected or disconnected from the Custom Tabs Service
|
* Register a Callback to be called when connected or disconnected from the Custom Tabs Service
|
||||||
|
*
|
||||||
* @param connectionCallback
|
* @param connectionCallback
|
||||||
*/
|
*/
|
||||||
public void setConnectionCallback(ConnectionCallback connectionCallback) {
|
public void setConnectionCallback(ConnectionCallback connectionCallback) {
|
||||||
|
@ -101,6 +102,7 @@ public class CustomTabActivityHelper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Binds the Activity to the Custom Tabs Service
|
* Binds the Activity to the Custom Tabs Service
|
||||||
|
*
|
||||||
* @param activity the activity to be binded to the service
|
* @param activity the activity to be binded to the service
|
||||||
*/
|
*/
|
||||||
public void bindCustomTabsService(Activity activity) {
|
public void bindCustomTabsService(Activity activity) {
|
||||||
|
@ -161,7 +163,6 @@ public class CustomTabActivityHelper {
|
||||||
*/
|
*/
|
||||||
public interface CustomTabFallback {
|
public interface CustomTabFallback {
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @param activity The Activity that wants to open the Uri
|
* @param activity The Activity that wants to open the Uri
|
||||||
* @param uri The uri to be opened by the fallback
|
* @param uri The uri to be opened by the fallback
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -26,7 +26,6 @@ import android.content.pm.ResolveInfo;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.support.customtabs.CustomTabsService;
|
import android.support.customtabs.CustomTabsService;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
import com.github.dfa.diaspora_android.util.AppLog;
|
import com.github.dfa.diaspora_android.util.AppLog;
|
||||||
|
|
||||||
|
@ -47,13 +46,14 @@ public class CustomTabsHelper {
|
||||||
|
|
||||||
private static String sPackageNameToUse;
|
private static String sPackageNameToUse;
|
||||||
|
|
||||||
private CustomTabsHelper() {}
|
private CustomTabsHelper() {
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Goes through all apps that handle VIEW intents and have a warmup service. Picks
|
* Goes through all apps that handle VIEW intents and have a warmup service. Picks
|
||||||
* the one chosen by the user if there is one, otherwise makes a best effort to return a
|
* the one chosen by the user if there is one, otherwise makes a best effort to return a
|
||||||
* valid package name.
|
* valid package name.
|
||||||
*
|
* <p>
|
||||||
* This is <strong>not</strong> threadsafe.
|
* This is <strong>not</strong> threadsafe.
|
||||||
*
|
*
|
||||||
* @param context {@link Context} to use for accessing {@link PackageManager}.
|
* @param context {@link Context} to use for accessing {@link PackageManager}.
|
||||||
|
@ -107,6 +107,7 @@ public class CustomTabsHelper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to check whether there is a specialized handler for a given intent.
|
* Used to check whether there is a specialized handler for a given intent.
|
||||||
|
*
|
||||||
* @param intent The intent to check with.
|
* @param intent The intent to check with.
|
||||||
* @return Whether there is a specialized handler for the given intent.
|
* @return Whether there is a specialized handler for the given intent.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -21,6 +21,7 @@ package com.github.dfa.diaspora_android.util;
|
||||||
import com.github.dfa.diaspora_android.App;
|
import com.github.dfa.diaspora_android.App;
|
||||||
import com.github.dfa.diaspora_android.R;
|
import com.github.dfa.diaspora_android.R;
|
||||||
import com.github.dfa.diaspora_android.data.AppSettings;
|
import com.github.dfa.diaspora_android.data.AppSettings;
|
||||||
|
import com.github.dfa.diaspora_android.data.DiasporaPodList.DiasporaPod;
|
||||||
import com.github.dfa.diaspora_android.data.PodAspect;
|
import com.github.dfa.diaspora_android.data.PodAspect;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -31,7 +32,6 @@ import com.github.dfa.diaspora_android.data.PodAspect;
|
||||||
public class DiasporaUrlHelper {
|
public class DiasporaUrlHelper {
|
||||||
private final AppSettings settings;
|
private final AppSettings settings;
|
||||||
|
|
||||||
public static final String HTTPS = "https://";
|
|
||||||
public static final String SUBURL_NOTIFICATIONS = "/notifications";
|
public static final String SUBURL_NOTIFICATIONS = "/notifications";
|
||||||
public static final String SUBURL_POSTS = "/posts/";
|
public static final String SUBURL_POSTS = "/posts/";
|
||||||
public static final String SUBURL_STREAM = "/stream";
|
public static final String SUBURL_STREAM = "/stream";
|
||||||
|
@ -49,6 +49,10 @@ public class DiasporaUrlHelper {
|
||||||
public static final String SUBURL_FOLOWED_TAGS = "/followed_tags";
|
public static final String SUBURL_FOLOWED_TAGS = "/followed_tags";
|
||||||
public static final String SUBURL_ASPECTS = "/aspects";
|
public static final String SUBURL_ASPECTS = "/aspects";
|
||||||
public static final String SUBURL_STATISTICS = "/statistics";
|
public static final String SUBURL_STATISTICS = "/statistics";
|
||||||
|
public static final String SUBURL_PERSONAL_SETTINGS = "/user/edit";
|
||||||
|
public static final String SUBURL_MANAGE_TAGS = "/tag_followings/manage";
|
||||||
|
public static final String SUBURL_SIGN_IN = "/users/sign_in";
|
||||||
|
public static final String SUBURL_MANAGE_CONTACTS = "/contacts";
|
||||||
public static final String URL_BLANK = "about:blank";
|
public static final String URL_BLANK = "about:blank";
|
||||||
|
|
||||||
public DiasporaUrlHelper(AppSettings settings) {
|
public DiasporaUrlHelper(AppSettings settings) {
|
||||||
|
@ -56,17 +60,22 @@ public class DiasporaUrlHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a https url of the pod set in AppSettings.
|
* Return a url of the pod set in AppSettings.
|
||||||
* Eg. https://pod.geraspora.de
|
* Eg. https://pod.geraspora.de
|
||||||
*
|
*
|
||||||
* @return https://(pod-domain.tld)
|
* @return https://(pod-domain.tld)
|
||||||
*/
|
*/
|
||||||
public String getPodUrl() {
|
public String getPodUrl() {
|
||||||
return HTTPS + settings.getPodDomain();
|
DiasporaPod pod = settings.getPod();
|
||||||
|
if (pod != null) {
|
||||||
|
return pod.getPodUrl().getBaseUrl();
|
||||||
|
}
|
||||||
|
return "http://127.0.0.1";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a https url that points to the stream of the configured diaspora account
|
* Return a url that points to the stream of the configured diaspora account
|
||||||
*
|
*
|
||||||
* @return https://(pod-domain.tld)/stream
|
* @return https://(pod-domain.tld)/stream
|
||||||
*/
|
*/
|
||||||
|
@ -75,7 +84,7 @@ public class DiasporaUrlHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a https url that points to the notifications feed of the configured diaspora account
|
* Return a url that points to the notifications feed of the configured diaspora account
|
||||||
*
|
*
|
||||||
* @return https://(pod-domain.tld)/notifications
|
* @return https://(pod-domain.tld)/notifications
|
||||||
*/
|
*/
|
||||||
|
@ -84,7 +93,7 @@ public class DiasporaUrlHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a https url that points to the post with the id postId
|
* Returns a url that points to the post with the id postId
|
||||||
*
|
*
|
||||||
* @return https://(pod-domain.tld)/posts/(postId)
|
* @return https://(pod-domain.tld)/posts/(postId)
|
||||||
*/
|
*/
|
||||||
|
@ -93,7 +102,7 @@ public class DiasporaUrlHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a https url that points to the conversations overview of the registered diaspora account
|
* Return a url that points to the conversations overview of the registered diaspora account
|
||||||
*
|
*
|
||||||
* @return https://(pod-domain.tld)/conversations
|
* @return https://(pod-domain.tld)/conversations
|
||||||
*/
|
*/
|
||||||
|
@ -102,7 +111,7 @@ public class DiasporaUrlHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a https url that points to the new-post form that lets the user create a new post
|
* Return a url that points to the new-post form that lets the user create a new post
|
||||||
*
|
*
|
||||||
* @return https://(pod-domain.tld)/status_messages/new
|
* @return https://(pod-domain.tld)/status_messages/new
|
||||||
*/
|
*/
|
||||||
|
@ -111,7 +120,7 @@ public class DiasporaUrlHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a https url that shows the profile of the currently registered diaspora account
|
* Return a url that shows the profile of the currently registered diaspora account
|
||||||
*
|
*
|
||||||
* @return https://(pod-domain.tld)/people/(profileId)
|
* @return https://(pod-domain.tld)/people/(profileId)
|
||||||
*/
|
*/
|
||||||
|
@ -120,7 +129,7 @@ public class DiasporaUrlHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a https url that shows the profile of the user with user id profileId
|
* Return a url that shows the profile of the user with user id profileId
|
||||||
*
|
*
|
||||||
* @param profileId Id of the profile to be shown
|
* @param profileId Id of the profile to be shown
|
||||||
* @return https://(pod-domain.tld)/people/(profileId)
|
* @return https://(pod-domain.tld)/people/(profileId)
|
||||||
|
@ -130,7 +139,7 @@ public class DiasporaUrlHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a https url that points to the activities feed of the currently registered diaspora account
|
* Return a url that points to the activities feed of the currently registered diaspora account
|
||||||
*
|
*
|
||||||
* @return https://(pod-domain.tld)/activity
|
* @return https://(pod-domain.tld)/activity
|
||||||
*/
|
*/
|
||||||
|
@ -139,7 +148,7 @@ public class DiasporaUrlHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a https url that points to the feed of posts that were liked by the currently registered diaspora account
|
* Return a url that points to the feed of posts that were liked by the currently registered diaspora account
|
||||||
*
|
*
|
||||||
* @return https://(pod-domain.tld)/liked
|
* @return https://(pod-domain.tld)/liked
|
||||||
*/
|
*/
|
||||||
|
@ -148,7 +157,7 @@ public class DiasporaUrlHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a https url that points to the stream of posts that were commented by the currently registered diaspora account
|
* Return a url that points to the stream of posts that were commented by the currently registered diaspora account
|
||||||
*
|
*
|
||||||
* @return https://(pod-domain.tld)/commented
|
* @return https://(pod-domain.tld)/commented
|
||||||
*/
|
*/
|
||||||
|
@ -157,7 +166,7 @@ public class DiasporaUrlHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a https url that points to the stream of posts in which the currently registered diaspora account has been mentioned in
|
* Return a url that points to the stream of posts in which the currently registered diaspora account has been mentioned in
|
||||||
*
|
*
|
||||||
* @return https://(pod-domain.tld)/mentions
|
* @return https://(pod-domain.tld)/mentions
|
||||||
*/
|
*/
|
||||||
|
@ -166,7 +175,7 @@ public class DiasporaUrlHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a https url that points to the stream of public posts
|
* Return a url that points to the stream of public posts
|
||||||
*
|
*
|
||||||
* @return https://(pod-domain.tld)/public
|
* @return https://(pod-domain.tld)/public
|
||||||
*/
|
*/
|
||||||
|
@ -175,7 +184,7 @@ public class DiasporaUrlHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a https url that toggles between mobile and desktop view when opened
|
* Return a url that toggles between mobile and desktop view when opened
|
||||||
*
|
*
|
||||||
* @return https://(pod-domain.tld)/mobile/toggle
|
* @return https://(pod-domain.tld)/mobile/toggle
|
||||||
*/
|
*/
|
||||||
|
@ -184,7 +193,7 @@ public class DiasporaUrlHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a https url that queries posts for the given hashtag query
|
* Return a url that queries posts for the given hashtag query
|
||||||
*
|
*
|
||||||
* @param query hashtag to be searched
|
* @param query hashtag to be searched
|
||||||
* @return https://(pod-domain.tld)/tags/query
|
* @return https://(pod-domain.tld)/tags/query
|
||||||
|
@ -194,7 +203,7 @@ public class DiasporaUrlHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a https url that queries user accounts for query
|
* Return a url that queries user accounts for query
|
||||||
*
|
*
|
||||||
* @param query search term
|
* @param query search term
|
||||||
* @return https://(pod-domain.tld)/people.mobile?q=(query)
|
* @return https://(pod-domain.tld)/people.mobile?q=(query)
|
||||||
|
@ -204,13 +213,50 @@ public class DiasporaUrlHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a https url that points to the statistics page of the pod.
|
* Return a url that points to the statistics page of the pod.
|
||||||
|
*
|
||||||
* @return https://(pod-domain.tld)/statistics
|
* @return https://(pod-domain.tld)/statistics
|
||||||
*/
|
*/
|
||||||
public String getStatisticsUrl() {
|
public String getStatisticsUrl() {
|
||||||
return getPodUrl() + SUBURL_STATISTICS;
|
return getPodUrl() + SUBURL_STATISTICS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a url that points to the sign in page of the pod.
|
||||||
|
*
|
||||||
|
* @return https://(pod-domain.tld)/users/sign_in
|
||||||
|
*/
|
||||||
|
public String getSignInUrl() {
|
||||||
|
return getPodUrl() + SUBURL_SIGN_IN;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a url that points to the personal settings page of the pod.
|
||||||
|
*
|
||||||
|
* @return https://(pod-domain.tld)/user/edit
|
||||||
|
*/
|
||||||
|
public String getPersonalSettingsUrl() {
|
||||||
|
return getPodUrl() + SUBURL_PERSONAL_SETTINGS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a url that points to the manage tags page of the pod.
|
||||||
|
*
|
||||||
|
* @return https://(pod-domain.tld)/tag_followings/manage
|
||||||
|
*/
|
||||||
|
public String getManageTagsUrl() {
|
||||||
|
return getPodUrl() + SUBURL_MANAGE_TAGS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a url that points to the manage tags page of the pod.
|
||||||
|
*
|
||||||
|
* @return https://(pod-domain.tld)/contacts
|
||||||
|
*/
|
||||||
|
public String getManageContactsUrl() {
|
||||||
|
return getPodUrl() + SUBURL_MANAGE_CONTACTS;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the url of the blank WebView
|
* Returns the url of the blank WebView
|
||||||
*
|
*
|
||||||
|
|
|
@ -26,8 +26,9 @@ import android.net.Uri;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Environment;
|
import android.os.Environment;
|
||||||
|
import android.support.design.widget.Snackbar;
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
import com.github.dfa.diaspora_android.App;
|
|
||||||
import com.github.dfa.diaspora_android.R;
|
import com.github.dfa.diaspora_android.R;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
|
@ -134,4 +135,18 @@ public class Helpers {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show Information if user is offline, returns true if is not connected to internet
|
||||||
|
*
|
||||||
|
* @param context Context
|
||||||
|
* @param anchor A view anchor
|
||||||
|
*/
|
||||||
|
public static boolean showInfoIfUserNotConnectedToInternet(Context context, View anchor) {
|
||||||
|
boolean isOnline = WebHelper.isOnline(context);
|
||||||
|
if (!isOnline) {
|
||||||
|
Snackbar.make(anchor, R.string.no_internet, Snackbar.LENGTH_LONG).show();
|
||||||
|
}
|
||||||
|
return !isOnline;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,7 @@ public class Log extends Observable {
|
||||||
private Log() {
|
private Log() {
|
||||||
this(null);
|
this(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Log(AppSettings appSettings) {
|
private Log(AppSettings appSettings) {
|
||||||
if (appSettings != null) {
|
if (appSettings != null) {
|
||||||
//TODO: Store/Restore logBuffer between app starts
|
//TODO: Store/Restore logBuffer between app starts
|
||||||
|
|
|
@ -139,16 +139,17 @@ public class WebHelper {
|
||||||
|
|
||||||
// Content
|
// Content
|
||||||
AppSettings appSettings = app.getSettings();
|
AppSettings appSettings = app.getSettings();
|
||||||
|
String pod0BaseUrl = appSettings.getPod().getPodUrl().getBaseUrl();
|
||||||
sb.append("<span style='margin-left: 30px; '></span>» ");
|
sb.append("<span style='margin-left: 30px; '></span>» ");
|
||||||
sb.append(String.format(Locale.getDefault(),
|
sb.append(String.format(Locale.getDefault(),
|
||||||
"<a href='https://%s/followed_tags' style='color: #000000; text-decoration: none;'><b>%s</b></a>",
|
"<a href='%s/followed_tags' style='color: #000000; text-decoration: none;'><b>%s</b></a>",
|
||||||
appSettings.getPodDomain(), app.getString(R.string.all_tags)));
|
pod0BaseUrl, app.getString(R.string.all_tags)));
|
||||||
sb.append("<hr style='height:5px;' />");
|
sb.append("<hr style='height:5px;' />");
|
||||||
for (String tag : profile.getFollowedTags()) {
|
for (String tag : profile.getFollowedTags()) {
|
||||||
sb.append("<span style='margin-left: 30px; '></span>» ");
|
sb.append("<span style='margin-left: 30px; '></span>» ");
|
||||||
sb.append(String.format(Locale.getDefault(),
|
sb.append(String.format(Locale.getDefault(),
|
||||||
"<a href='https://%s/tags/%s' style='color: #000000; text-decoration: none;'>#%s</a>",
|
"<a href='%s/tags/%s' style='color: #000000; text-decoration: none;'>#%s</a>",
|
||||||
appSettings.getPodDomain(), tag, tag));
|
pod0BaseUrl, tag, tag));
|
||||||
sb.append("<hr style='height:5px;' />");
|
sb.append("<hr style='height:5px;' />");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,8 @@ public class ThemeHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ThemeHelper getInstance() {
|
public static ThemeHelper getInstance() {
|
||||||
if(instance == null) throw new IllegalStateException("ThemeHelper must be initialized using getInstance(AppSettings) before it can be used!");
|
if (instance == null)
|
||||||
|
throw new IllegalStateException("ThemeHelper must be initialized using getInstance(AppSettings) before it can be used!");
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
package com.github.dfa.diaspora_android.webview;
|
package com.github.dfa.diaspora_android.webview;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.net.Uri;
|
|
||||||
import android.support.v4.content.LocalBroadcastManager;
|
import android.support.v4.content.LocalBroadcastManager;
|
||||||
import android.webkit.CookieManager;
|
import android.webkit.CookieManager;
|
||||||
import android.webkit.WebView;
|
import android.webkit.WebView;
|
||||||
|
@ -39,7 +38,7 @@ public class CustomWebViewClient extends WebViewClient {
|
||||||
|
|
||||||
//Open non-diaspora links in customtab/external browser
|
//Open non-diaspora links in customtab/external browser
|
||||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||||
if (!url.contains(app.getSettings().getPodDomain())) {
|
if (!url.contains(app.getSettings().getPod().getPodUrl().getHost())) {
|
||||||
Intent i = new Intent(MainActivity.ACTION_OPEN_EXTERNAL_URL);
|
Intent i = new Intent(MainActivity.ACTION_OPEN_EXTERNAL_URL);
|
||||||
i.putExtra(MainActivity.EXTRA_URL, url);
|
i.putExtra(MainActivity.EXTRA_URL, url);
|
||||||
LocalBroadcastManager.getInstance(app.getApplicationContext()).sendBroadcast(i);
|
LocalBroadcastManager.getInstance(app.getApplicationContext()).sendBroadcast(i);
|
||||||
|
@ -57,7 +56,7 @@ public class CustomWebViewClient extends WebViewClient {
|
||||||
|
|
||||||
if (cookies != null) {
|
if (cookies != null) {
|
||||||
cookieManager.setCookie(url, cookies);
|
cookieManager.setCookie(url, cookies);
|
||||||
cookieManager.setCookie("https://" + app.getSettings().getPodDomain(), cookies);
|
cookieManager.setCookie(app.getSettings().getPod().getPodUrl().getBaseUrl(), cookies);
|
||||||
//for (String c : cookies.split(";")) {
|
//for (String c : cookies.split(";")) {
|
||||||
//AppLog.d(this, "Cookie: " + c.split("=")[0] + " Value:" + c.split("=")[1]);
|
//AppLog.d(this, "Cookie: " + c.split("=")[0] + " Value:" + c.split("=")[1]);
|
||||||
//}
|
//}
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class DiasporaStreamWebChromeClient extends FileUploadWebChromeClient {
|
||||||
@Override
|
@Override
|
||||||
public void onProgressChanged(WebView wv, int progress) {
|
public void onProgressChanged(WebView wv, int progress) {
|
||||||
super.onProgressChanged(wv, progress);
|
super.onProgressChanged(wv, progress);
|
||||||
if (progress > 0 && progress <= 60) {
|
if (progress > 10 && progress <= 60) {
|
||||||
WebHelper.getUserProfile(wv);
|
WebHelper.getUserProfile(wv);
|
||||||
WebHelper.optimizeMobileSiteLayout(wv);
|
WebHelper.optimizeMobileSiteLayout(wv);
|
||||||
}
|
}
|
||||||
|
@ -57,6 +57,7 @@ public class DiasporaStreamWebChromeClient extends FileUploadWebChromeClient {
|
||||||
|
|
||||||
public interface SharedTextCallback {
|
public interface SharedTextCallback {
|
||||||
String getSharedText();
|
String getSharedText();
|
||||||
|
|
||||||
void setSharedText(String shared);
|
void setSharedText(String shared);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,8 +42,7 @@ public class FileUploadWebChromeClient extends ProgressBarWebChromeClient {
|
||||||
|
|
||||||
//For Android 4.1/4.2 only. DO NOT REMOVE!
|
//For Android 4.1/4.2 only. DO NOT REMOVE!
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
protected void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType, String capture)
|
protected void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType, String capture) {
|
||||||
{
|
|
||||||
fileUploadCallback.legacyImageUpload(uploadMsg, acceptType, capture);
|
fileUploadCallback.legacyImageUpload(uploadMsg, acceptType, capture);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,6 +53,7 @@ public class FileUploadWebChromeClient extends ProgressBarWebChromeClient {
|
||||||
|
|
||||||
public interface FileUploadCallback {
|
public interface FileUploadCallback {
|
||||||
boolean imageUpload(WebView webView, ValueCallback<Uri[]> filePathCallback, FileChooserParams fileChooserParams);
|
boolean imageUpload(WebView webView, ValueCallback<Uri[]> filePathCallback, FileChooserParams fileChooserParams);
|
||||||
|
|
||||||
void legacyImageUpload(ValueCallback<Uri> uploadMsg, String acceptType, String capture);
|
void legacyImageUpload(ValueCallback<Uri> uploadMsg, String acceptType, String capture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<android.support.design.widget.CoordinatorLayout
|
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/main_content"
|
android:id="@+id/main_content"
|
||||||
|
@ -16,24 +15,23 @@
|
||||||
android:theme="@style/AppTheme.AppBarOverlay">
|
android:theme="@style/AppTheme.AppBarOverlay">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/appbar_linear_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/appbar_linear_layout"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:background="?attr/colorPrimary"
|
android:background="?attr/colorPrimary"
|
||||||
|
android:orientation="vertical"
|
||||||
app:layout_scrollFlags="scroll|enterAlways|snap"
|
app:layout_scrollFlags="scroll|enterAlways|snap"
|
||||||
app:popupTheme="@style/AppTheme.PopupOverlay">
|
app:popupTheme="@style/AppTheme.PopupOverlay">
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<android.support.v7.widget.Toolbar
|
||||||
|
android:id="@+id/main__topbar"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content" />
|
||||||
android:id="@+id/main__topbar"/>
|
|
||||||
|
|
||||||
<android.support.design.widget.TabLayout
|
<android.support.design.widget.TabLayout
|
||||||
android:id="@+id/tabs"
|
android:id="@+id/tabs"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content" />
|
||||||
/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</android.support.design.widget.AppBarLayout>
|
</android.support.design.widget.AppBarLayout>
|
||||||
|
|
|
@ -19,16 +19,16 @@
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/fragment_about__app_name"
|
android:id="@+id/fragment_about__app_name"
|
||||||
|
style="@android:style/TextAppearance.DeviceDefault.Large"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textAlignment="center"
|
|
||||||
android:text="@string/diaspora_for_android"
|
android:text="@string/diaspora_for_android"
|
||||||
style="@android:style/TextAppearance.DeviceDefault.Large"/>
|
android:textAlignment="center" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/fragment_about__app_version"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content" />
|
||||||
android:id="@+id/fragment_about__app_version"/>
|
|
||||||
|
|
||||||
<android.support.v4.widget.Space
|
<android.support.v4.widget.Space
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -36,10 +36,10 @@
|
||||||
|
|
||||||
<com.github.dfa.diaspora_android.ui.HtmlTextView
|
<com.github.dfa.diaspora_android.ui.HtmlTextView
|
||||||
android:id="@+id/fragment_about__about_text"
|
android:id="@+id/fragment_about__about_text"
|
||||||
|
style="@android:style/TextAppearance.DeviceDefault.Small"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/fragment_about__about_content"
|
android:linksClickable="true"
|
||||||
style="@android:style/TextAppearance.DeviceDefault.Small"
|
android:text="@string/fragment_about__about_content" />
|
||||||
android:linksClickable="true" />
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</android.support.v4.widget.NestedScrollView>
|
</android.support.v4.widget.NestedScrollView>
|
||||||
|
|
|
@ -20,74 +20,77 @@
|
||||||
<!-- APP SECTION -->
|
<!-- APP SECTION -->
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/fragment_debug__section_app"
|
android:id="@+id/fragment_debug__section_app"
|
||||||
|
style="@android:style/TextAppearance.DeviceDefault.Large"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/fragment_debug__section_app"
|
android:text="@string/fragment_debug__section_app" />
|
||||||
style="@android:style/TextAppearance.DeviceDefault.Large"/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/fragment_debug__package_name"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content" />
|
||||||
android:id="@+id/fragment_debug__package_name"/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/fragment_debug__app_version"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content" />
|
||||||
android:id="@+id/fragment_debug__app_version"/>
|
|
||||||
|
|
||||||
<!-- DEVICE SECTION -->
|
<!-- DEVICE SECTION -->
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/fragment_debug__section_device"
|
android:id="@+id/fragment_debug__section_device"
|
||||||
|
style="@android:style/TextAppearance.DeviceDefault.Large"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/fragment_debug__section_device"
|
|
||||||
android:paddingTop="@dimen/activity_vertical_margin"
|
android:paddingTop="@dimen/activity_vertical_margin"
|
||||||
style="@android:style/TextAppearance.DeviceDefault.Large"/>
|
android:text="@string/fragment_debug__section_device" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/fragment_debug__android_version"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content" />
|
||||||
android:id="@+id/fragment_debug__android_version"/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/fragment_debug__device_name"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content" />
|
||||||
android:id="@+id/fragment_debug__device_name"/>
|
|
||||||
|
|
||||||
<!-- POD SECTION -->
|
<!-- POD SECTION -->
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/fragment_debug__section_pod"
|
android:id="@+id/fragment_debug__section_pod"
|
||||||
|
style="@android:style/TextAppearance.DeviceDefault.Large"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/fragment_debug__section_pod"
|
|
||||||
android:paddingTop="@dimen/activity_vertical_margin"
|
android:paddingTop="@dimen/activity_vertical_margin"
|
||||||
style="@android:style/TextAppearance.DeviceDefault.Large"/>
|
android:text="@string/fragment_debug__section_pod" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/fragment_debug__pod_domain"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content" />
|
||||||
android:id="@+id/fragment_debug__pod_domain"/>
|
|
||||||
|
|
||||||
<!-- LOG SECTION -->
|
<!-- LOG SECTION -->
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/fragment_debug__section_log"
|
android:id="@+id/fragment_debug__section_log"
|
||||||
|
style="@android:style/TextAppearance.DeviceDefault.Large"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/fragment_debug__section_log"
|
|
||||||
android:paddingTop="@dimen/activity_vertical_margin"
|
android:paddingTop="@dimen/activity_vertical_margin"
|
||||||
style="@android:style/TextAppearance.DeviceDefault.Large"/>
|
android:text="@string/fragment_debug__section_log" />
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<HorizontalScrollView
|
<HorizontalScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/fragment_debug__log_box"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:longClickable="true"
|
android:longClickable="true" />
|
||||||
android:id="@+id/fragment_debug__log_box" />
|
|
||||||
</HorizontalScrollView>
|
</HorizontalScrollView>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -16,32 +16,33 @@
|
||||||
<android.support.v4.widget.Space
|
<android.support.v4.widget.Space
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/activity_vertical_margin" />
|
android:layout_height="@dimen/activity_vertical_margin" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
style="@android:style/TextAppearance.DeviceDefault.Large"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/fragment_license__copyright_years"
|
android:text="@string/fragment_license__copyright_years" />
|
||||||
style="@android:style/TextAppearance.DeviceDefault.Large"/>
|
|
||||||
|
|
||||||
<com.github.dfa.diaspora_android.ui.HtmlTextView
|
<com.github.dfa.diaspora_android.ui.HtmlTextView
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/fragment_license__licensetext"
|
android:id="@+id/fragment_license__licensetext"
|
||||||
android:text="@string/fragment_license__license_content"
|
|
||||||
style="@android:style/TextAppearance.DeviceDefault.Small"
|
style="@android:style/TextAppearance.DeviceDefault.Small"
|
||||||
android:linksClickable="true" />
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:linksClickable="true"
|
||||||
|
android:text="@string/fragment_license__license_content" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
style="@android:style/TextAppearance.DeviceDefault.Large"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/fragment_license__3rd_party_libs_title"
|
|
||||||
android:paddingTop="@dimen/activity_vertical_margin"
|
android:paddingTop="@dimen/activity_vertical_margin"
|
||||||
style="@android:style/TextAppearance.DeviceDefault.Large"/>
|
android:text="@string/fragment_license__3rd_party_libs_title" />
|
||||||
|
|
||||||
<com.github.dfa.diaspora_android.ui.HtmlTextView
|
<com.github.dfa.diaspora_android.ui.HtmlTextView
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/fragment_license__3rdparty"
|
android:id="@+id/fragment_license__3rdparty"
|
||||||
style="@android:style/TextAppearance.DeviceDefault.Small"
|
style="@android:style/TextAppearance.DeviceDefault.Small"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
android:linksClickable="true" />
|
android:linksClickable="true" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</android.support.v4.widget.NestedScrollView>
|
</android.support.v4.widget.NestedScrollView>
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
|
|
@ -1,35 +1,38 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout 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:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/color_picker_dialog__title_background"
|
android:id="@+id/color_picker_dialog__title_background"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/color_picker_dialog__title"
|
android:id="@+id/color_picker_dialog__title"
|
||||||
android:layout_margin="20dp"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Large.Inverse"
|
android:layout_margin="20dp"
|
||||||
/>
|
android:textAppearance="@style/TextAppearance.AppCompat.Large.Inverse" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<uz.shift.colorpicker.LineColorPicker
|
<uz.shift.colorpicker.LineColorPicker
|
||||||
android:id="@+id/color_picker_dialog__base_picker"
|
android:id="@+id/color_picker_dialog__base_picker"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:layout_margin="10dp"
|
android:layout_margin="10dp"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
app:orientation="horizontal" />
|
app:orientation="horizontal" />
|
||||||
|
|
||||||
<uz.shift.colorpicker.LineColorPicker
|
<uz.shift.colorpicker.LineColorPicker
|
||||||
android:id="@+id/color_picker_dialog__shade_picker"
|
android:id="@+id/color_picker_dialog__shade_picker"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="40dp"
|
android:layout_height="40dp"
|
||||||
android:layout_marginTop="30dp"
|
|
||||||
android:layout_margin="10dp"
|
android:layout_margin="10dp"
|
||||||
android:layout_marginBottom="10dp"
|
android:layout_marginBottom="10dp"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
app:orientation="horizontal" />
|
app:orientation="horizontal" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -1,20 +1,23 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
|
||||||
<android.support.v4.widget.NestedScrollView
|
<android.support.v4.widget.NestedScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<android.support.v7.widget.RecyclerView
|
<android.support.v7.widget.RecyclerView
|
||||||
android:id="@+id/fragment_followed_tags__recycler_view"
|
android:id="@+id/fragment_followed_tags__recycler_view"
|
||||||
android:scrollbars="vertical"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:scrollbars="vertical"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||||
|
|
||||||
<!-- Offset -->
|
<!-- Offset -->
|
||||||
|
|
|
@ -19,10 +19,10 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="start"
|
android:layout_gravity="start"
|
||||||
android:fitsSystemWindows="true"
|
android:fitsSystemWindows="true"
|
||||||
app:itemTextColor="@color/primary_text"
|
|
||||||
app:paddingEnd="0dp"
|
|
||||||
app:paddingStart="0dp"
|
|
||||||
app:headerLayout="@layout/main__nav_header"
|
app:headerLayout="@layout/main__nav_header"
|
||||||
app:menu="@menu/main__navdrawer" />
|
app:itemTextColor="@color/primary_text"
|
||||||
|
app:menu="@menu/main__navdrawer"
|
||||||
|
app:paddingEnd="0dp"
|
||||||
|
app:paddingStart="0dp" />
|
||||||
|
|
||||||
</android.support.v4.widget.DrawerLayout>
|
</android.support.v4.widget.DrawerLayout>
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<android.support.design.widget.CoordinatorLayout
|
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
android:id="@+id/nav_drawer"
|
android:id="@+id/nav_drawer"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="110dp"
|
android:layout_height="110dp"
|
||||||
|
android:background="@color/colorPrimary"
|
||||||
android:gravity="bottom"
|
android:gravity="bottom"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:background="@color/colorPrimary"
|
|
||||||
android:theme="@style/ThemeOverlay.AppCompat.Dark">
|
android:theme="@style/ThemeOverlay.AppCompat.Dark">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|
121
app/src/main/res/layout/podselection__dialog.xml
Normal file
121
app/src/main/res/layout/podselection__dialog.xml
Normal file
|
@ -0,0 +1,121 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<ScrollView 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"
|
||||||
|
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||||
|
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||||
|
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||||
|
android:scrollbars="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/podselection__dialog__text_profile"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/activity_vertical_margin"
|
||||||
|
android:text="@string/profile"
|
||||||
|
android:textAppearance="@style/AppTheme.TextAppearance.Caption"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<Spinner
|
||||||
|
android:id="@+id/podselection__dialog__spinner_profile"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/activity_horizontal_margin_half"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/activity_horizontal_margin_half"
|
||||||
|
android:text="@string/pod_name"
|
||||||
|
android:textAppearance="@style/AppTheme.TextAppearance.Caption" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/podselection__dialog__edit_podname"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/activity_horizontal_margin_half"
|
||||||
|
android:ems="10"
|
||||||
|
android:hint="@string/pod_name"
|
||||||
|
android:inputType="textPersonName"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||||
|
tools:text="Geraspora" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/activity_horizontal_margin_half"
|
||||||
|
android:text="@string/pod_address"
|
||||||
|
android:textAppearance="@style/AppTheme.TextAppearance.Caption" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/podselection__dialog__edit_podaddress"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/activity_horizontal_margin_half"
|
||||||
|
android:ems="10"
|
||||||
|
android:hint="@string/pod_address"
|
||||||
|
android:inputType="textPersonName"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||||
|
tools:text="pod.geraspora.de" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/activity_horizontal_margin_half"
|
||||||
|
android:text="@string/http_protocol"
|
||||||
|
android:textAppearance="@style/AppTheme.TextAppearance.Caption" />
|
||||||
|
|
||||||
|
<RadioGroup
|
||||||
|
android:id="@+id/podselection__dialog__radiogroup_protocol"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/activity_horizontal_margin_half"
|
||||||
|
android:checkedButton="@+id/podselection__dialog__radio_https"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/podselection__dialog__radio_http"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="http" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/podselection__dialog__radio_https"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="https" />
|
||||||
|
</RadioGroup>
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/podselection__dialog__btn_cancel"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="@android:string/cancel" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/podselection__dialog__btn_ok"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="@android:string/ok" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</ScrollView>
|
|
@ -4,62 +4,29 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||||
android:paddingTop="@dimen/activity_vertical_margin"
|
android:paddingTop="@dimen/activity_vertical_margin"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
tools:showIn="@layout/podselection__fragment">
|
|
||||||
|
|
||||||
<ListView
|
<Button
|
||||||
android:id="@+id/podselection__listpods"
|
android:id="@+id/podselection__fragment__button_use_custom_pod"
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_above="@+id/podselection__podupti_notice"
|
|
||||||
android:layout_below="@+id/podselection__edit_filter"
|
|
||||||
android:choiceMode="singleChoice" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/podselection__edit_filter"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentTop="true"
|
android:layout_alignParentTop="true"
|
||||||
android:layout_toEndOf="@+id/textView"
|
android:text="@string/podselection__custom_pod"
|
||||||
android:layout_toStartOf="@+id/podselection__button_select_pod"
|
tools:text="Benutzerdefinierter Pod" />
|
||||||
android:hint="@string/filter_hint"
|
|
||||||
android:inputType="textUri|textWebEditText" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/podselection__button_select_pod"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_above="@+id/podselection__listpods"
|
|
||||||
android:layout_alignEnd="@+id/podselection__listpods"
|
|
||||||
android:layout_alignTop="@+id/podselection__edit_filter"
|
|
||||||
android:contentDescription="@string/confirm_url"
|
|
||||||
android:paddingLeft="5dp"
|
|
||||||
android:paddingRight="5dp"
|
|
||||||
android:src="@drawable/ic_arrow_forward_black_48px" />
|
|
||||||
|
|
||||||
<TextView
|
<ListView
|
||||||
android:id="@+id/podselection__podupti_notice"
|
android:id="@+id/podselection__fragment__listpods"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_alignParentStart="true"
|
android:layout_below="@+id/podselection__fragment__button_use_custom_pod"
|
||||||
android:autoLink="web"
|
android:choiceMode="singleChoice" />
|
||||||
android:text="@string/podlist_source_note"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_above="@+id/podselection__listpods"
|
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:layout_alignParentTop="true"
|
|
||||||
android:layout_marginEnd="0dp"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:text="@string/prefix_https"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
|
@ -1,23 +1,27 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/recycler_view__list_item__root"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
android:id="@+id/recycler_view__list_item__divider"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:background="@color/divider" />
|
android:background="@color/divider" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/recycler_view__list_item__text"
|
android:id="@+id/recycler_view__list_item__text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/activity_horizontal_margin"
|
|
||||||
android:layout_marginEnd="@dimen/activity_horizontal_margin"
|
|
||||||
android:layout_marginTop="12dp"
|
|
||||||
android:layout_marginBottom="12dp"
|
android:layout_marginBottom="12dp"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Large" />
|
android:layout_marginEnd="@dimen/activity_horizontal_margin"
|
||||||
<View
|
android:layout_marginStart="@dimen/activity_horizontal_margin"
|
||||||
android:layout_width="match_parent"
|
android:layout_marginTop="12dp"
|
||||||
android:layout_height="1dp"
|
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||||
android:background="@color/divider"/>
|
android:textColor="@color/primary_text"
|
||||||
|
tools:text="Very much text" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -1,9 +1,10 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout 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:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<android.support.design.widget.AppBarLayout
|
<android.support.design.widget.AppBarLayout
|
||||||
android:id="@+id/settings__appbar"
|
android:id="@+id/settings__appbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:orientation="vertical" android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" android:layout_gravity="center_horizontal"
|
android:layout_height="match_parent"
|
||||||
android:paddingStart="@dimen/activity_horizontal_margin_half" android:paddingEnd="@dimen/activity_horizontal_margin_half">
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingEnd="@dimen/activity_horizontal_margin_half"
|
||||||
|
android:paddingStart="@dimen/activity_horizontal_margin_half">
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/dialog_search__input"
|
android:id="@+id/dialog_search__input"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:singleLine="true"
|
|
||||||
android:hint="@string/app_hashtag"
|
android:hint="@string/app_hashtag"
|
||||||
/>
|
android:maxLines="1" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<group android:checkableBehavior="none">
|
<group android:checkableBehavior="none" android:id="@+id/nav_group__pod">
|
||||||
<item
|
<item
|
||||||
android:id="@+id/nav_stream"
|
android:id="@+id/nav_stream"
|
||||||
android:icon="@drawable/ic_stream"
|
android:icon="@drawable/ic_stream"
|
||||||
|
|
|
@ -1,6 +1,13 @@
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/podselection__action_search"
|
||||||
|
android:icon="@drawable/ic_search_white_48px"
|
||||||
|
android:title="@string/search"
|
||||||
|
app:actionViewClass="android.support.v7.widget.SearchView"
|
||||||
|
app:showAsAction="always|collapseActionView" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_reload"
|
android:id="@+id/action_reload"
|
||||||
android:icon="@drawable/ic_refresh_white_48px"
|
android:icon="@drawable/ic_refresh_white_48px"
|
||||||
|
|
1435
app/src/main/res/raw/podlist.json
Normal file
1435
app/src/main/res/raw/podlist.json
Normal file
File diff suppressed because it is too large
Load diff
|
@ -2,12 +2,14 @@
|
||||||
<!--Generated by crowdin.com-->
|
<!--Generated by crowdin.com-->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Key Names (Untranslatable) -->
|
<!-- Key Names (Untranslatable) -->
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
<!-- PodProfile -->
|
<!-- PodProfile -->
|
||||||
<!-- More -->
|
<!-- More -->
|
||||||
<!-- Category Titles -->
|
<!-- Category Titles -->
|
||||||
<!-- Visuals -->
|
<!-- Visuals -->
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Font size -->
|
<!-- Font size -->
|
||||||
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
||||||
<!-- Load images -->
|
<!-- Load images -->
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<!--Generated by crowdin.com-->
|
<!--Generated by crowdin.com-->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Key Names (Untranslatable) -->
|
<!-- Key Names (Untranslatable) -->
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
<!-- PodProfile -->
|
<!-- PodProfile -->
|
||||||
<!-- More -->
|
<!-- More -->
|
||||||
|
@ -15,12 +16,6 @@
|
||||||
<string name="pref_desc__sub_nav_slider">Konfiguration der Sichtbarkeit von Einträgen im Navigation-Slider</string>
|
<string name="pref_desc__sub_nav_slider">Konfiguration der Sichtbarkeit von Einträgen im Navigation-Slider</string>
|
||||||
<string name="pref_cat__visibility_nav_items">Sichtbarkeit der Einträge</string>
|
<string name="pref_cat__visibility_nav_items">Sichtbarkeit der Einträge</string>
|
||||||
<!-- Themes -->
|
<!-- Themes -->
|
||||||
<string name="pref_title__themes">Farbschema</string>
|
|
||||||
<string name="pref_desc__themes">Einstellungen des Farbdesigns</string>
|
|
||||||
<string name="pref_title__primary_color">Primärfarbe</string>
|
|
||||||
<string name="pref_desc__primary_color">Färbung der Werkzeugleisten</string>
|
|
||||||
<string name="pref_title__accent_color">Akzentfarbe</string>
|
|
||||||
<string name="pref_desc__accent_color">Färbung der Details</string>
|
|
||||||
<!-- Font size -->
|
<!-- Font size -->
|
||||||
<string name="pref_title__font_size">Schriftgröße</string>
|
<string name="pref_title__font_size">Schriftgröße</string>
|
||||||
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
||||||
|
@ -30,9 +25,6 @@
|
||||||
<!-- Proxy -->
|
<!-- Proxy -->
|
||||||
<string name="pref_title__sub_proxy">Proxy</string>
|
<string name="pref_title__sub_proxy">Proxy</string>
|
||||||
<string name="pref_title__proxy_enabled">Aktiviere Netzwerkproxy</string>
|
<string name="pref_title__proxy_enabled">Aktiviere Netzwerkproxy</string>
|
||||||
<string name="pref_desc__http_proxy_enabled">Nutze einen Proxyserver, um Firewalls zu umgehen</string>
|
|
||||||
<string name="pref_title__http_proxy_host">Host</string>
|
|
||||||
<string name="pref_title__http_proxy_port">Port</string>
|
|
||||||
<!-- Chrome custom tabs -->
|
<!-- Chrome custom tabs -->
|
||||||
<string name="pref_title__chrome_custom_tabs_enabled">Chrome Custom Tabs</string>
|
<string name="pref_title__chrome_custom_tabs_enabled">Chrome Custom Tabs</string>
|
||||||
<string name="pref_desc__chrome_custom_tabs_enabled">Externe Links mit Chrome Custom Tabs öffnen. Chromium oder Google Chrome muss für dieses Feature installiert sein.\nWICHTIGER HINWEIS: Chrome Custom Tabs verwenden die konfigurierten Proxy-Server nicht!</string>
|
<string name="pref_desc__chrome_custom_tabs_enabled">Externe Links mit Chrome Custom Tabs öffnen. Chromium oder Google Chrome muss für dieses Feature installiert sein.\nWICHTIGER HINWEIS: Chrome Custom Tabs verwenden die konfigurierten Proxy-Server nicht!</string>
|
||||||
|
|
|
@ -2,12 +2,14 @@
|
||||||
<!--Generated by crowdin.com-->
|
<!--Generated by crowdin.com-->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Key Names (Untranslatable) -->
|
<!-- Key Names (Untranslatable) -->
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
<!-- PodProfile -->
|
<!-- PodProfile -->
|
||||||
<!-- More -->
|
<!-- More -->
|
||||||
<!-- Category Titles -->
|
<!-- Category Titles -->
|
||||||
<!-- Visuals -->
|
<!-- Visuals -->
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Font size -->
|
<!-- Font size -->
|
||||||
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
||||||
<!-- Load images -->
|
<!-- Load images -->
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<!--Generated by crowdin.com-->
|
<!--Generated by crowdin.com-->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Key Names (Untranslatable) -->
|
<!-- Key Names (Untranslatable) -->
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
<!-- PodProfile -->
|
<!-- PodProfile -->
|
||||||
<!-- More -->
|
<!-- More -->
|
||||||
|
@ -14,6 +15,7 @@
|
||||||
<string name="pref_title__sub_nav_slider">Control deslizante de navegación</string>
|
<string name="pref_title__sub_nav_slider">Control deslizante de navegación</string>
|
||||||
<string name="pref_desc__sub_nav_slider">Control de visibilidad de las entradas en el cajón de navegación</string>
|
<string name="pref_desc__sub_nav_slider">Control de visibilidad de las entradas en el cajón de navegación</string>
|
||||||
<string name="pref_cat__visibility_nav_items">Elemento visibilidad</string>
|
<string name="pref_cat__visibility_nav_items">Elemento visibilidad</string>
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Font size -->
|
<!-- Font size -->
|
||||||
<string name="pref_title__font_size">Tamaño de letra</string>
|
<string name="pref_title__font_size">Tamaño de letra</string>
|
||||||
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
||||||
|
@ -22,9 +24,6 @@
|
||||||
<string name="pref_desc__load_images">Desactivar la carga de de imágenes a datos móviles seguros</string>
|
<string name="pref_desc__load_images">Desactivar la carga de de imágenes a datos móviles seguros</string>
|
||||||
<!-- Proxy -->
|
<!-- Proxy -->
|
||||||
<string name="pref_title__proxy_enabled">Activar Proxy</string>
|
<string name="pref_title__proxy_enabled">Activar Proxy</string>
|
||||||
<string name="pref_desc__http_proxy_enabled">El tráfico proxificado de Diaspora para evitar firewalls.\nPuede necesitar reiniciarse</string>
|
|
||||||
<string name="pref_title__http_proxy_host">Anfitrión</string>
|
|
||||||
<string name="pref_title__http_proxy_port">Puerto</string>
|
|
||||||
<!-- Chrome custom tabs -->
|
<!-- Chrome custom tabs -->
|
||||||
<!-- Diaspora Settings -->
|
<!-- Diaspora Settings -->
|
||||||
<string name="pref_title__personal_settings">Configuración personal</string>
|
<string name="pref_title__personal_settings">Configuración personal</string>
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<!--Generated by crowdin.com-->
|
<!--Generated by crowdin.com-->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Key Names (Untranslatable) -->
|
<!-- Key Names (Untranslatable) -->
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
<!-- PodProfile -->
|
<!-- PodProfile -->
|
||||||
<!-- More -->
|
<!-- More -->
|
||||||
|
@ -14,6 +15,7 @@
|
||||||
<string name="pref_title__sub_nav_slider">Barre de défilement</string>
|
<string name="pref_title__sub_nav_slider">Barre de défilement</string>
|
||||||
<string name="pref_desc__sub_nav_slider">Contrôles de la visibilité des entrées dans le volet de navigation</string>
|
<string name="pref_desc__sub_nav_slider">Contrôles de la visibilité des entrées dans le volet de navigation</string>
|
||||||
<string name="pref_cat__visibility_nav_items">Visibilité de l’élément</string>
|
<string name="pref_cat__visibility_nav_items">Visibilité de l’élément</string>
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Font size -->
|
<!-- Font size -->
|
||||||
<string name="pref_title__font_size">Taille de la police</string>
|
<string name="pref_title__font_size">Taille de la police</string>
|
||||||
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
||||||
|
@ -21,13 +23,16 @@
|
||||||
<string name="pref_title__load_images">Charger les images</string>
|
<string name="pref_title__load_images">Charger les images</string>
|
||||||
<string name="pref_desc__load_images">Désactiver le chargements des images pour préserver la data mobile</string>
|
<string name="pref_desc__load_images">Désactiver le chargements des images pour préserver la data mobile</string>
|
||||||
<!-- Proxy -->
|
<!-- Proxy -->
|
||||||
|
<string name="pref_title__http_proxy_load_tor_preset">Charger la pré-configuration Tor</string>
|
||||||
|
<string name="pref_desc__http_proxy_load_tor_preset">Charger les paramètres proxy pour Tor (Orbot) HTTP Proxy</string>
|
||||||
<string name="pref_title__sub_proxy">Proxy</string>
|
<string name="pref_title__sub_proxy">Proxy</string>
|
||||||
<string name="pref_title__proxy_enabled">Activer Proxy</string>
|
<string name="pref_title__proxy_enabled">Activer Proxy</string>
|
||||||
<string name="pref_desc__http_proxy_enabled">Serveur Proxy.\n(Nécessite un redémarrage)</string>
|
<string name="pref_desc__http_proxy_enabled">Proxy pour diaspora pour contourner les pare-feux.\nPeut nécessiter un redémarrage</string>
|
||||||
<string name="pref_title__http_proxy_host">Hôte</string>
|
<string name="pref_title__http_proxy_host">Hôte</string>
|
||||||
<string name="pref_title__http_proxy_port">Port</string>
|
<string name="pref_title__http_proxy_port">Port</string>
|
||||||
<!-- Chrome custom tabs -->
|
<!-- Chrome custom tabs -->
|
||||||
<string name="pref_title__chrome_custom_tabs_enabled">Onglets personnalisés de Chrome</string>
|
<string name="pref_title__chrome_custom_tabs_enabled">Onglets personnalisés de Chrome</string>
|
||||||
|
<string name="pref_desc__chrome_custom_tabs_enabled">Ouvrir les liens externes avec les onglets personnalisés de Chrome. Chomium ou Google Chrome doit être installé pour cette fonctionnalité. \nNOTE IMPORTANTE : les onglets personnalisés de Chrome n\'utilisent pas les serveurs proxy configurés !</string>
|
||||||
<!-- Diaspora Settings -->
|
<!-- Diaspora Settings -->
|
||||||
<string name="pref_title__personal_settings">Paramètres personnels</string>
|
<string name="pref_title__personal_settings">Paramètres personnels</string>
|
||||||
<string name="pref_desc__personal_settings">Ouvrir vos paramètres de compte diaspora</string>
|
<string name="pref_desc__personal_settings">Ouvrir vos paramètres de compte diaspora</string>
|
||||||
|
|
|
@ -2,12 +2,14 @@
|
||||||
<!--Generated by crowdin.com-->
|
<!--Generated by crowdin.com-->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Key Names (Untranslatable) -->
|
<!-- Key Names (Untranslatable) -->
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
<!-- PodProfile -->
|
<!-- PodProfile -->
|
||||||
<!-- More -->
|
<!-- More -->
|
||||||
<!-- Category Titles -->
|
<!-- Category Titles -->
|
||||||
<!-- Visuals -->
|
<!-- Visuals -->
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Font size -->
|
<!-- Font size -->
|
||||||
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
||||||
<!-- Load images -->
|
<!-- Load images -->
|
||||||
|
|
|
@ -2,12 +2,14 @@
|
||||||
<!--Generated by crowdin.com-->
|
<!--Generated by crowdin.com-->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Key Names (Untranslatable) -->
|
<!-- Key Names (Untranslatable) -->
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
<!-- PodProfile -->
|
<!-- PodProfile -->
|
||||||
<!-- More -->
|
<!-- More -->
|
||||||
<!-- Category Titles -->
|
<!-- Category Titles -->
|
||||||
<!-- Visuals -->
|
<!-- Visuals -->
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Font size -->
|
<!-- Font size -->
|
||||||
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
||||||
<!-- Load images -->
|
<!-- Load images -->
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<!--Generated by crowdin.com-->
|
<!--Generated by crowdin.com-->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Key Names (Untranslatable) -->
|
<!-- Key Names (Untranslatable) -->
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
<!-- PodProfile -->
|
<!-- PodProfile -->
|
||||||
<!-- More -->
|
<!-- More -->
|
||||||
|
@ -14,6 +15,7 @@
|
||||||
<string name="pref_title__sub_nav_slider">Menù di navigazione</string>
|
<string name="pref_title__sub_nav_slider">Menù di navigazione</string>
|
||||||
<string name="pref_desc__sub_nav_slider">Controlla la visibilità degli elementi nel menù di navigazione</string>
|
<string name="pref_desc__sub_nav_slider">Controlla la visibilità degli elementi nel menù di navigazione</string>
|
||||||
<string name="pref_cat__visibility_nav_items">Visibilità degli elementi</string>
|
<string name="pref_cat__visibility_nav_items">Visibilità degli elementi</string>
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Font size -->
|
<!-- Font size -->
|
||||||
<string name="pref_title__font_size">Dimensione font</string>
|
<string name="pref_title__font_size">Dimensione font</string>
|
||||||
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
||||||
|
@ -23,11 +25,11 @@
|
||||||
<!-- Proxy -->
|
<!-- Proxy -->
|
||||||
<string name="pref_title__sub_proxy">Proxy</string>
|
<string name="pref_title__sub_proxy">Proxy</string>
|
||||||
<string name="pref_title__proxy_enabled">Attiva proxy</string>
|
<string name="pref_title__proxy_enabled">Attiva proxy</string>
|
||||||
<string name="pref_desc__http_proxy_enabled">Traffico del proxy di Diaspora per bypassare i firewall.\nPuò essere necessario il riavvio dell\'app</string>
|
|
||||||
<string name="pref_title__http_proxy_host">Host</string>
|
<string name="pref_title__http_proxy_host">Host</string>
|
||||||
<string name="pref_title__http_proxy_port">Porta</string>
|
<string name="pref_title__http_proxy_port">Porta</string>
|
||||||
<!-- Chrome custom tabs -->
|
<!-- Chrome custom tabs -->
|
||||||
<string name="pref_title__chrome_custom_tabs_enabled">Schede personalizzate di Chrome</string>
|
<string name="pref_title__chrome_custom_tabs_enabled">Schede personalizzate di Chrome</string>
|
||||||
|
<string name="pref_desc__chrome_custom_tabs_enabled">Apri collegamenti esterni con le schede personalizzate di Chrome. Chromium o Google Chrome devono essere installati per questa funzione. \nNOTA IMPORTANTE: le schede personalizzate di Chrome non usano i server proxy configurabili!</string>
|
||||||
<!-- Diaspora Settings -->
|
<!-- Diaspora Settings -->
|
||||||
<string name="pref_title__personal_settings">Impostazioni personali</string>
|
<string name="pref_title__personal_settings">Impostazioni personali</string>
|
||||||
<string name="pref_desc__personal_settings">Apri le impostazioni del tuo account Diaspora</string>
|
<string name="pref_desc__personal_settings">Apri le impostazioni del tuo account Diaspora</string>
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<!--Generated by crowdin.com-->
|
<!--Generated by crowdin.com-->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Key Names (Untranslatable) -->
|
<!-- Key Names (Untranslatable) -->
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
<!-- PodProfile -->
|
<!-- PodProfile -->
|
||||||
<!-- More -->
|
<!-- More -->
|
||||||
|
@ -14,6 +15,7 @@
|
||||||
<string name="pref_title__sub_nav_slider">ナビゲーション スライダー</string>
|
<string name="pref_title__sub_nav_slider">ナビゲーション スライダー</string>
|
||||||
<string name="pref_desc__sub_nav_slider">ナビゲーションドロワー内のエントリーの表示を制御します</string>
|
<string name="pref_desc__sub_nav_slider">ナビゲーションドロワー内のエントリーの表示を制御します</string>
|
||||||
<string name="pref_cat__visibility_nav_items">アイテムの表示</string>
|
<string name="pref_cat__visibility_nav_items">アイテムの表示</string>
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Font size -->
|
<!-- Font size -->
|
||||||
<string name="pref_title__font_size">フォントサイズ</string>
|
<string name="pref_title__font_size">フォントサイズ</string>
|
||||||
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
||||||
|
@ -21,6 +23,8 @@
|
||||||
<string name="pref_title__load_images">画像の読み込み</string>
|
<string name="pref_title__load_images">画像の読み込み</string>
|
||||||
<string name="pref_desc__load_images">安全なモバイルデータのため、画像の読み込みを無効にします</string>
|
<string name="pref_desc__load_images">安全なモバイルデータのため、画像の読み込みを無効にします</string>
|
||||||
<!-- Proxy -->
|
<!-- Proxy -->
|
||||||
|
<string name="pref_title__http_proxy_load_tor_preset">Tor プリセットを読み込む</string>
|
||||||
|
<string name="pref_desc__http_proxy_load_tor_preset">Tor (Orbot) HTTP プロキシのプロキシ設定を読み込みます</string>
|
||||||
<string name="pref_title__sub_proxy">プロキシ</string>
|
<string name="pref_title__sub_proxy">プロキシ</string>
|
||||||
<string name="pref_title__proxy_enabled">プロキシを有効にする</string>
|
<string name="pref_title__proxy_enabled">プロキシを有効にする</string>
|
||||||
<string name="pref_desc__http_proxy_enabled">Diaspora の通信をプロキシして、ファイアウォールに回避します。\n再起動が必要になることがあります</string>
|
<string name="pref_desc__http_proxy_enabled">Diaspora の通信をプロキシして、ファイアウォールに回避します。\n再起動が必要になることがあります</string>
|
||||||
|
@ -28,6 +32,7 @@
|
||||||
<string name="pref_title__http_proxy_port">ポート</string>
|
<string name="pref_title__http_proxy_port">ポート</string>
|
||||||
<!-- Chrome custom tabs -->
|
<!-- Chrome custom tabs -->
|
||||||
<string name="pref_title__chrome_custom_tabs_enabled">Chrome カスタムタブ</string>
|
<string name="pref_title__chrome_custom_tabs_enabled">Chrome カスタムタブ</string>
|
||||||
|
<string name="pref_desc__chrome_custom_tabs_enabled">Chrome のカスタム タブで外部リンクを開きます。この機能は Chromium または Google Chrome をインストールする必要があります。\n重要な注意: Chrome のカスタム タブは構成されているプロキシ サーバーを使用しません!</string>
|
||||||
<!-- Diaspora Settings -->
|
<!-- Diaspora Settings -->
|
||||||
<string name="pref_title__personal_settings">個人用設定</string>
|
<string name="pref_title__personal_settings">個人用設定</string>
|
||||||
<string name="pref_desc__personal_settings">Diaspora アカウント設定を開きます</string>
|
<string name="pref_desc__personal_settings">Diaspora アカウント設定を開きます</string>
|
||||||
|
|
|
@ -2,12 +2,14 @@
|
||||||
<!--Generated by crowdin.com-->
|
<!--Generated by crowdin.com-->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Key Names (Untranslatable) -->
|
<!-- Key Names (Untranslatable) -->
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
<!-- PodProfile -->
|
<!-- PodProfile -->
|
||||||
<!-- More -->
|
<!-- More -->
|
||||||
<!-- Category Titles -->
|
<!-- Category Titles -->
|
||||||
<!-- Visuals -->
|
<!-- Visuals -->
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Font size -->
|
<!-- Font size -->
|
||||||
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
||||||
<!-- Load images -->
|
<!-- Load images -->
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<!--Generated by crowdin.com-->
|
<!--Generated by crowdin.com-->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Key Names (Untranslatable) -->
|
<!-- Key Names (Untranslatable) -->
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
<!-- PodProfile -->
|
<!-- PodProfile -->
|
||||||
<!-- More -->
|
<!-- More -->
|
||||||
|
@ -14,6 +15,7 @@
|
||||||
<string name="pref_title__sub_nav_slider">നാവിഗേഷൻ സ്ലൈഡർ</string>
|
<string name="pref_title__sub_nav_slider">നാവിഗേഷൻ സ്ലൈഡർ</string>
|
||||||
<string name="pref_desc__sub_nav_slider">നാവിഗേഷൻ ഡ്രാവറിൽ കാണേണ്ട എൻട്രികൾ നിയന്ത്രിക്കൂ</string>
|
<string name="pref_desc__sub_nav_slider">നാവിഗേഷൻ ഡ്രാവറിൽ കാണേണ്ട എൻട്രികൾ നിയന്ത്രിക്കൂ</string>
|
||||||
<string name="pref_cat__visibility_nav_items">ഇനത്തിന്റെ കാഴ്ച</string>
|
<string name="pref_cat__visibility_nav_items">ഇനത്തിന്റെ കാഴ്ച</string>
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Font size -->
|
<!-- Font size -->
|
||||||
<string name="pref_title__font_size">ഫോണ്ട് സൈസ്</string>
|
<string name="pref_title__font_size">ഫോണ്ട് സൈസ്</string>
|
||||||
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
||||||
|
@ -22,9 +24,6 @@
|
||||||
<string name="pref_desc__load_images">മൊബൈൽ ഡാറ്റ ഉപഭോഗം കുറയ്ക്കാനായി ചിത്രങ്ങൾ ലോഡ് ചെയ്യാതിരിക്കുക</string>
|
<string name="pref_desc__load_images">മൊബൈൽ ഡാറ്റ ഉപഭോഗം കുറയ്ക്കാനായി ചിത്രങ്ങൾ ലോഡ് ചെയ്യാതിരിക്കുക</string>
|
||||||
<!-- Proxy -->
|
<!-- Proxy -->
|
||||||
<string name="pref_title__proxy_enabled">പ്രോക്സി അനുവദിക്കൂ</string>
|
<string name="pref_title__proxy_enabled">പ്രോക്സി അനുവദിക്കൂ</string>
|
||||||
<string name="pref_desc__http_proxy_enabled">ഫയർവാളുകളെ മറികടക്കാൻ ഡയസ്പോറ ട്രാഫിക് പ്രോക്സി ചെയ്യൂ.\nപുനരാരംഭിക്കേണ്ടി വന്നേക്കാം</string>
|
|
||||||
<string name="pref_title__http_proxy_host">ആഥിതേയൻ</string>
|
|
||||||
<string name="pref_title__http_proxy_port">പോർട്ട്</string>
|
|
||||||
<!-- Chrome custom tabs -->
|
<!-- Chrome custom tabs -->
|
||||||
<!-- Diaspora Settings -->
|
<!-- Diaspora Settings -->
|
||||||
<string name="pref_title__personal_settings">സ്വകാര്യ സജ്ജീകരണങ്ങൾ</string>
|
<string name="pref_title__personal_settings">സ്വകാര്യ സജ്ജീകരണങ്ങൾ</string>
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<!--Generated by crowdin.com-->
|
<!--Generated by crowdin.com-->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Key Names (Untranslatable) -->
|
<!-- Key Names (Untranslatable) -->
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
<!-- PodProfile -->
|
<!-- PodProfile -->
|
||||||
<!-- More -->
|
<!-- More -->
|
||||||
|
@ -13,6 +14,7 @@
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
<string name="pref_title__sub_nav_slider">Navigatie Slider</string>
|
<string name="pref_title__sub_nav_slider">Navigatie Slider</string>
|
||||||
<string name="pref_cat__visibility_nav_items">Item Zichtbaarheid</string>
|
<string name="pref_cat__visibility_nav_items">Item Zichtbaarheid</string>
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Font size -->
|
<!-- Font size -->
|
||||||
<string name="pref_title__font_size">Lettergrootte</string>
|
<string name="pref_title__font_size">Lettergrootte</string>
|
||||||
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
||||||
|
@ -21,9 +23,6 @@
|
||||||
<string name="pref_desc__load_images">Afbeelding laden uitschakelen om mobiele data te besparen</string>
|
<string name="pref_desc__load_images">Afbeelding laden uitschakelen om mobiele data te besparen</string>
|
||||||
<!-- Proxy -->
|
<!-- Proxy -->
|
||||||
<string name="pref_title__proxy_enabled">Proxy inschakelen</string>
|
<string name="pref_title__proxy_enabled">Proxy inschakelen</string>
|
||||||
<string name="pref_desc__http_proxy_enabled">Gebruik een Proxy voor Diaspora om de firewalls te omzeilen.\nRestart nodig</string>
|
|
||||||
<string name="pref_title__http_proxy_host">Host</string>
|
|
||||||
<string name="pref_title__http_proxy_port">Poort</string>
|
|
||||||
<!-- Chrome custom tabs -->
|
<!-- Chrome custom tabs -->
|
||||||
<!-- Diaspora Settings -->
|
<!-- Diaspora Settings -->
|
||||||
<string name="pref_title__personal_settings">Persoonlijke instellingen</string>
|
<string name="pref_title__personal_settings">Persoonlijke instellingen</string>
|
||||||
|
|
|
@ -2,12 +2,14 @@
|
||||||
<!--Generated by crowdin.com-->
|
<!--Generated by crowdin.com-->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Key Names (Untranslatable) -->
|
<!-- Key Names (Untranslatable) -->
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
<!-- PodProfile -->
|
<!-- PodProfile -->
|
||||||
<!-- More -->
|
<!-- More -->
|
||||||
<!-- Category Titles -->
|
<!-- Category Titles -->
|
||||||
<!-- Visuals -->
|
<!-- Visuals -->
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Font size -->
|
<!-- Font size -->
|
||||||
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
||||||
<!-- Load images -->
|
<!-- Load images -->
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<!--Generated by crowdin.com-->
|
<!--Generated by crowdin.com-->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Key Names (Untranslatable) -->
|
<!-- Key Names (Untranslatable) -->
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
<!-- PodProfile -->
|
<!-- PodProfile -->
|
||||||
<!-- More -->
|
<!-- More -->
|
||||||
|
@ -11,6 +12,7 @@
|
||||||
<string name="pref_cat__pod_settings">Ustawienia poda</string>
|
<string name="pref_cat__pod_settings">Ustawienia poda</string>
|
||||||
<!-- Visuals -->
|
<!-- Visuals -->
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Font size -->
|
<!-- Font size -->
|
||||||
<string name="pref_title__font_size">Rozmiar czcionki</string>
|
<string name="pref_title__font_size">Rozmiar czcionki</string>
|
||||||
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<!--Generated by crowdin.com-->
|
<!--Generated by crowdin.com-->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Key Names (Untranslatable) -->
|
<!-- Key Names (Untranslatable) -->
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
<!-- PodProfile -->
|
<!-- PodProfile -->
|
||||||
<!-- More -->
|
<!-- More -->
|
||||||
|
@ -14,6 +15,7 @@
|
||||||
<string name="pref_title__sub_nav_slider">Controle deslizante de navegação</string>
|
<string name="pref_title__sub_nav_slider">Controle deslizante de navegação</string>
|
||||||
<string name="pref_desc__sub_nav_slider">Visibilidade do controle de entradas na gaveta de navegação</string>
|
<string name="pref_desc__sub_nav_slider">Visibilidade do controle de entradas na gaveta de navegação</string>
|
||||||
<string name="pref_cat__visibility_nav_items">Visibilidade de item</string>
|
<string name="pref_cat__visibility_nav_items">Visibilidade de item</string>
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Font size -->
|
<!-- Font size -->
|
||||||
<string name="pref_title__font_size">Tamanho da fonte</string>
|
<string name="pref_title__font_size">Tamanho da fonte</string>
|
||||||
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
||||||
|
@ -22,9 +24,6 @@
|
||||||
<string name="pref_desc__load_images">Desabilitar o carregamento de imagens para economizar seus créditos</string>
|
<string name="pref_desc__load_images">Desabilitar o carregamento de imagens para economizar seus créditos</string>
|
||||||
<!-- Proxy -->
|
<!-- Proxy -->
|
||||||
<string name="pref_title__proxy_enabled">Habilitar o Proxy</string>
|
<string name="pref_title__proxy_enabled">Habilitar o Proxy</string>
|
||||||
<string name="pref_desc__http_proxy_enabled">Usar proxy para o tráfego da diáspora para contornar firewalls.\nPode requerer reinicialização</string>
|
|
||||||
<string name="pref_title__http_proxy_host">Servidor</string>
|
|
||||||
<string name="pref_title__http_proxy_port">Porta</string>
|
|
||||||
<!-- Chrome custom tabs -->
|
<!-- Chrome custom tabs -->
|
||||||
<!-- Diaspora Settings -->
|
<!-- Diaspora Settings -->
|
||||||
<string name="pref_title__personal_settings">Configurações pessoais</string>
|
<string name="pref_title__personal_settings">Configurações pessoais</string>
|
||||||
|
|
|
@ -2,12 +2,14 @@
|
||||||
<!--Generated by crowdin.com-->
|
<!--Generated by crowdin.com-->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Key Names (Untranslatable) -->
|
<!-- Key Names (Untranslatable) -->
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
<!-- PodProfile -->
|
<!-- PodProfile -->
|
||||||
<!-- More -->
|
<!-- More -->
|
||||||
<!-- Category Titles -->
|
<!-- Category Titles -->
|
||||||
<!-- Visuals -->
|
<!-- Visuals -->
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Font size -->
|
<!-- Font size -->
|
||||||
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
||||||
<!-- Load images -->
|
<!-- Load images -->
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<!--Generated by crowdin.com-->
|
<!--Generated by crowdin.com-->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Key Names (Untranslatable) -->
|
<!-- Key Names (Untranslatable) -->
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
<!-- PodProfile -->
|
<!-- PodProfile -->
|
||||||
<!-- More -->
|
<!-- More -->
|
||||||
|
@ -14,6 +15,7 @@
|
||||||
<string name="pref_title__sub_nav_slider">Слайдер навигации</string>
|
<string name="pref_title__sub_nav_slider">Слайдер навигации</string>
|
||||||
<string name="pref_desc__sub_nav_slider">Управление видимостью записей в ящике навигации</string>
|
<string name="pref_desc__sub_nav_slider">Управление видимостью записей в ящике навигации</string>
|
||||||
<string name="pref_cat__visibility_nav_items">Видимость элемента</string>
|
<string name="pref_cat__visibility_nav_items">Видимость элемента</string>
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Font size -->
|
<!-- Font size -->
|
||||||
<string name="pref_title__font_size">Размер шрифта</string>
|
<string name="pref_title__font_size">Размер шрифта</string>
|
||||||
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
||||||
|
@ -22,9 +24,6 @@
|
||||||
<string name="pref_desc__load_images">Отключить загрузку изображений для экономии траффика</string>
|
<string name="pref_desc__load_images">Отключить загрузку изображений для экономии траффика</string>
|
||||||
<!-- Proxy -->
|
<!-- Proxy -->
|
||||||
<string name="pref_title__proxy_enabled">Использовать прокси</string>
|
<string name="pref_title__proxy_enabled">Использовать прокси</string>
|
||||||
<string name="pref_desc__http_proxy_enabled">Перенаправить трафик Диаспоры в обход брандмауэров.\nМожет потребовать перезапуска</string>
|
|
||||||
<string name="pref_title__http_proxy_host">Хост</string>
|
|
||||||
<string name="pref_title__http_proxy_port">Порт</string>
|
|
||||||
<!-- Chrome custom tabs -->
|
<!-- Chrome custom tabs -->
|
||||||
<!-- Diaspora Settings -->
|
<!-- Diaspora Settings -->
|
||||||
<string name="pref_title__personal_settings">Личные настройки</string>
|
<string name="pref_title__personal_settings">Личные настройки</string>
|
||||||
|
|
|
@ -2,12 +2,14 @@
|
||||||
<!--Generated by crowdin.com-->
|
<!--Generated by crowdin.com-->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Key Names (Untranslatable) -->
|
<!-- Key Names (Untranslatable) -->
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
<!-- PodProfile -->
|
<!-- PodProfile -->
|
||||||
<!-- More -->
|
<!-- More -->
|
||||||
<!-- Category Titles -->
|
<!-- Category Titles -->
|
||||||
<!-- Visuals -->
|
<!-- Visuals -->
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Font size -->
|
<!-- Font size -->
|
||||||
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
||||||
<!-- Load images -->
|
<!-- Load images -->
|
||||||
|
|
|
@ -2,12 +2,14 @@
|
||||||
<!--Generated by crowdin.com-->
|
<!--Generated by crowdin.com-->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Key Names (Untranslatable) -->
|
<!-- Key Names (Untranslatable) -->
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
<!-- PodProfile -->
|
<!-- PodProfile -->
|
||||||
<!-- More -->
|
<!-- More -->
|
||||||
<!-- Category Titles -->
|
<!-- Category Titles -->
|
||||||
<!-- Visuals -->
|
<!-- Visuals -->
|
||||||
<!-- Navigiation Slider -->
|
<!-- Navigiation Slider -->
|
||||||
|
<!-- Themes -->
|
||||||
<!-- Font size -->
|
<!-- Font size -->
|
||||||
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
|
||||||
<!-- Load images -->
|
<!-- Load images -->
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Key Names (Untranslatable) -->
|
<!-- Key Names (Untranslatable) -->
|
||||||
<string name="pref_key__poddomain" translatable="false">podDomain</string>
|
<string name="pref_key__poddomain_legacy" translatable="false">podDomain</string>
|
||||||
<string name="pref_key__previous_podlist" translatable="false">previousPodlist</string>
|
<string name="pref_key__current_pod_0" translatable="false">pref_key__current_pod_0</string>
|
||||||
<string name="pref_key__font_size" translatable="false">pref_key_font_size</string>
|
<string name="pref_key__font_size" translatable="false">pref_key_font_size</string>
|
||||||
<string name="pref_key__intellihide_toolbars" translatable="false">pref_key_intellihide_toolbars</string>
|
<string name="pref_key__intellihide_toolbars" translatable="false">pref_key_intellihide_toolbars</string>
|
||||||
<string name="pref_catkey__pod_settings" translatable="false">pref_key_category_pod_settings</string>
|
<string name="pref_catkey__pod_settings" translatable="false">pref_key_category_pod_settings</string>
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
<string name="title_activity_pods">Select Pod</string>
|
<string name="title_activity_pods">Select Pod</string>
|
||||||
<string name="filter_hint">Enter pod domain</string>
|
<string name="filter_hint">Enter pod domain</string>
|
||||||
<string name="confirm_url">Confirm pod url</string>
|
<string name="confirm_url">Confirm pod url</string>
|
||||||
|
<string name="search_for_pod">Search for Pod…</string>
|
||||||
<string name="podlist_source_note">Note: The podlist is populated by secure pods listed on https://podupti.me. You can enter in the edit field any pod not listed.</string>
|
<string name="podlist_source_note">Note: The podlist is populated by secure pods listed on https://podupti.me. You can enter in the edit field any pod not listed.</string>
|
||||||
<string name="valid_pod">Please enter a valid domain name</string>
|
<string name="valid_pod">Please enter a valid domain name</string>
|
||||||
<string name="podlist_error">Error: Could not retrieve list of pods!</string>
|
<string name="podlist_error">Error: Could not retrieve list of pods!</string>
|
||||||
|
@ -103,4 +104,9 @@
|
||||||
Diaspora. In the permissions section you can grant the \"write storage permission\".</string>
|
Diaspora. In the permissions section you can grant the \"write storage permission\".</string>
|
||||||
<string name="permission_denied">Permission denied.</string>
|
<string name="permission_denied">Permission denied.</string>
|
||||||
<string name="permission_granted_try_again">Permission granted. Please try again.</string>
|
<string name="permission_granted_try_again">Permission granted. Please try again.</string>
|
||||||
|
<string name="podselection__custom_pod">Custom Pod</string>
|
||||||
|
<string name="pod_name">Pod name</string>
|
||||||
|
<string name="http_protocol">Protocol</string>
|
||||||
|
<string name="pod_address">Pod address</string>
|
||||||
|
<string name="missing_value">Missing value</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -30,4 +30,8 @@
|
||||||
<item name="android:background">@color/white</item>
|
<item name="android:background">@color/white</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="AppTheme.TextAppearance.Caption" parent="TextAppearance.AppCompat.Caption">
|
||||||
|
<item name="android:textColor">@color/accent</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in a new issue