1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2024-12-22 19:08:03 +01:00

Improve navigation drawer, default visibilities

This commit is contained in:
Gregor Santner 2016-08-28 17:54:35 +02:00
parent 40a9823b19
commit 78b96d9ade
21 changed files with 47 additions and 48 deletions

View file

@ -9,8 +9,8 @@ android {
applicationId "com.github.dfa.diaspora_android"
minSdkVersion 17
targetSdkVersion 24
versionCode 6
versionName "0.1.5"
versionCode 7
versionName "0.1.6-dev"
}
buildTypes {
release {

View file

@ -136,6 +136,7 @@
<data android:host="diaspora.undernet.uy" android:scheme="https" />
<data android:host="diaspora.unixcorn.org" android:scheme="https" />
<data android:host="diasporausa.com" android:scheme="https" />
<data android:host="diaspora.xcelor8.com" android:scheme="https" />
<data android:host="diasp.org" android:scheme="https" />
<data android:host="dissociateduse.rs" android:scheme="https" />
<data android:host="distributed.chat" android:scheme="https" />
@ -239,6 +240,7 @@
<data android:host="wk3.org" 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.freehuman.fr" android:scheme="https" />
<!--@@@ PODLIST END-->
</intent-filter>

View file

@ -1024,7 +1024,7 @@ public class MainActivity extends AppCompatActivity
break;
}
case R.id.nav_settings_app: {
case R.id.nav_settings: {
startActivity(new Intent(this, SettingsActivity.class));
}
break;

View file

@ -269,7 +269,7 @@ public class AppSettings {
}
public boolean isVisibleInNavMentions() {
return getBoolean(prefApp, R.string.pref_key__visibility_nav__mentions, true);
return getBoolean(prefApp, R.string.pref_key__visibility_nav__mentions, false);
}
public boolean isVisibleInNavCommented() {

View file

@ -87,7 +87,7 @@ public class PodUserProfile {
// Avatar
if (json.has("avatar")) {
JSONObject avatarJson = json.getJSONObject("avatar");
if (avatarJson.has("medium") && setAvatarUrl(avatarJson.getString("medium"))) {
if (avatarJson.has("large") && setAvatarUrl(avatarJson.getString("large"))) {
app.getAvatarImageLoader().clearAvatarImage();
appSettings.setAvatarUrl(avatarUrl);
}
@ -168,6 +168,12 @@ public class PodUserProfile {
/*
* Private property setters
*/
/**
* Sets the avatar, returns true if this was a new one, false if already the old one
* @param avatarUrl url
* @return true if new avatar url
*/
private boolean setAvatarUrl(final String avatarUrl) {
if (!this.avatarUrl.equals(avatarUrl)) {
this.avatarUrl = avatarUrl;

View file

@ -1,28 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="110dp"
android:gravity="bottom"
android:orientation="vertical"
android:background="@color/colorPrimary"
android:theme="@style/ThemeOverlay.AppCompat.Dark">
<!--
<ImageView
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@drawable/header" />
-->
<LinearLayout
android:id="@+id/nav_profile_picture"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentEnd="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginTop="24dp"
android:orientation="horizontal"
android:clickable="true">
android:clickable="true"
android:orientation="horizontal">
<ImageView
android:id="@+id/navheader_user_image"
@ -30,8 +33,6 @@
android:layout_height="@android:dimen/notification_large_icon_height"
android:layout_gravity="center"
android:layout_marginEnd="@dimen/activity_horizontal_margin_half"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin_half"
android:layout_marginStart="@dimen/activity_horizontal_margin"
android:scaleType="fitCenter"
android:src="@drawable/ic_launcher" />
@ -39,17 +40,18 @@
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingEnd="@dimen/activity_horizontal_margin"
android:paddingLeft="@dimen/activity_horizontal_margin_half"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingStart="@dimen/activity_horizontal_margin_half"
android:orientation="vertical">
android:orientation="vertical"
android:paddingEnd="@dimen/activity_horizontal_margin_half"
android:paddingStart="@dimen/activity_horizontal_margin_half">
<TextView
android:id="@+id/navheader_title"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:maxLines="1"
android:paddingTop="@dimen/nav_header_vertical_spacing"
android:scrollHorizontally="true"
android:text="@string/app_name"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textColor="@color/white"
@ -59,7 +61,10 @@
android:id="@+id/podselection__podupti_notice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:maxLines="1"
android:paddingBottom="@dimen/activity_horizontal_margin"
android:scrollHorizontally="true"
android:text="@string/app_subtitle"
android:textColor="@color/white" />

View file

@ -53,12 +53,12 @@
android:visible="false"/>
</group>
<item android:title="@string/nav_menu_settings">
<item android:title="@string/nav_menu_more">
<menu>
<item
android:id="@+id/nav_settings_app"
android:id="@+id/nav_settings"
android:icon="@drawable/ic_settings_black_48px"
android:title="@string/nav_settings_view" />
android:title="@string/settings" />
<item
android:id="@+id/nav_help_license"

View file

@ -31,10 +31,10 @@
<string name="confirm_pod">Möchtest du wirklich \nhttps://%1$s\nals deinen Diaspora Pod auswählen?</string>
<string name="confirm_exit">Möchtest du die App verlassen?</string>
<!-- Drawer, Menu, Toolbar, ContextMenu -->
<string name="nav_help_license">Über die App | Hilfe</string>
<string name="nav_menu_more">Mehr</string>
<string name="nav_help_license">Über | Hilfe</string>
<string name="nav_followed_tags">Verfolgte Tags</string>
<string name="nav_public_activities">Öffentliche Aktivitäten</string>
<string name="nav_settings_view">App Einstellungen</string>
<string name="share__share_link_as_text">Link als Text teilen</string>
<string name="share__share_screenshot">Bildschirmfoto teilen</string>
<string name="share__take_screenshot">Bildschirmfoto speichern</string>

View file

@ -31,10 +31,8 @@
<string name="confirm_pod">¿Realmente desea usar\nhttps://%1$s\ncomo su Pod de Diaspora?</string>
<string name="confirm_exit">¿Desea salir?</string>
<!-- Drawer, Menu, Toolbar, ContextMenu -->
<string name="nav_help_license">Acerca de la aplicación | Ayuda</string>
<string name="nav_followed_tags">Etiquetas seguidas</string>
<string name="nav_public_activities">Actividad pública</string>
<string name="nav_settings_view">Ajustes de la aplicación</string>
<string name="share__share_link_as_text">Compartir link como texto</string>
<string name="share__share_screenshot">Compartir captura de pantalla de la página web</string>
<string name="share__take_screenshot">Tomar captura de pantalla de la página web</string>

View file

@ -31,10 +31,8 @@
<string name="confirm_pod">Voulez-vous vraiment utiliser\nhttps://%1$s\ncomme pod Diaspora ?</string>
<string name="confirm_exit">Souhaitez-vous quitter ?</string>
<!-- Drawer, Menu, Toolbar, ContextMenu -->
<string name="nav_help_license">À propos de l\'application | Aide</string>
<string name="nav_followed_tags">Hashtags suivis</string>
<string name="nav_public_activities">Activités publiques</string>
<string name="nav_settings_view">Paramètres de l\'application</string>
<string name="share__share_link_as_text">Partager le lien comme texte</string>
<string name="share__share_screenshot">Partager la capture d\'écran d\'un site web</string>
<string name="share__take_screenshot">Prendre une capture d\'écran d\'un site web</string>

View file

@ -31,10 +31,8 @@
<string name="confirm_pod">Vuoi veramente usare\nhttps://%1$s\ncome tuo pod di Diaspora?</string>
<string name="confirm_exit">Vuoi veramente uscire?</string>
<!-- Drawer, Menu, Toolbar, ContextMenu -->
<string name="nav_help_license">Info | Aiuto</string>
<string name="nav_followed_tags">Tag seguiti</string>
<string name="nav_public_activities">Attività pubbliche</string>
<string name="nav_settings_view">Impostazioni</string>
<string name="share__share_link_as_text">Condividi link</string>
<string name="share__share_screenshot">Condividi screensot</string>
<string name="share__take_screenshot">Fai uno screenshot</string>

View file

@ -31,10 +31,8 @@
<string name="confirm_pod">Diaspora のポッドとして\nhttps://%1$s\nを使用してもよろしいですか?</string>
<string name="confirm_exit">終了しますか?</string>
<!-- Drawer, Menu, Toolbar, ContextMenu -->
<string name="nav_help_license">アプリについて | ヘルプ</string>
<string name="nav_followed_tags">フォロー済タグ</string>
<string name="nav_public_activities">公開アクティビティ</string>
<string name="nav_settings_view">アプリの設定</string>
<string name="share__share_link_as_text">テキストとしてリンクを共有</string>
<string name="share__share_screenshot">Web ページのスクリーン ショットを共有</string>
<string name="share__take_screenshot">Web ページのスクリーン ショットを撮る</string>

View file

@ -31,10 +31,8 @@
<string name="confirm_pod">\nhttps://%1$s\nനിങ്ങളുടെ ഡയാസ്പൊറ പോഡായി ഉപയോഗിക്കണമെന്ന് ഉറപ്പാണോ?</string>
<string name="confirm_exit">പുറത്തേക്കു പോകണമോ?</string>
<!-- Drawer, Menu, Toolbar, ContextMenu -->
<string name="nav_help_license">പ്രയോഗത്തെ കുറിച്ച് | സഹായം</string>
<string name="nav_followed_tags">പിന്തുടരുന്ന ടാഗുകൾ</string>
<string name="nav_public_activities">പൊതു പ്രവൃത്തികൾ</string>
<string name="nav_settings_view">പ്രയോഗത്തിന്റെ സജ്ജീകരണങ്ങൾ</string>
<string name="share__share_link_as_text">ലിങ്ക് വാചകമായി പങ്കുവയ്ക്കൂ</string>
<string name="share__share_screenshot">വെബ്‌പേജിന്റെ ചിത്രം പങ്കുവയ്ക്കൂ</string>
<string name="share__take_screenshot">വെബ്‌പേജിന്റെ ചിത്രം എടുക്കുക</string>

View file

@ -31,10 +31,8 @@
<string name="confirm_pod">Wilt u echt \nhttps://%1$s\n als uw Diaspora pod gebruiken?</string>
<string name="confirm_exit">Wilt u afsluiten?</string>
<!-- Drawer, Menu, Toolbar, ContextMenu -->
<string name="nav_help_license">Over de app | Help</string>
<string name="nav_followed_tags">Gevolgde Tags</string>
<string name="nav_public_activities">Publieke activiteiten</string>
<string name="nav_settings_view">App-instellingen</string>
<string name="share__share_link_as_text">Link delen als tekst</string>
<string name="share__share_screenshot">Screenshot van de webpagina delen</string>
<string name="share__take_screenshot">Neem screenshot van de webpagina</string>

View file

@ -30,10 +30,8 @@
<string name="confirm_pod">Czy naprawdę chcesz używać\nhttps://%1$s \njako Twój Pod Diaspory?</string>
<string name="confirm_exit">Czy chcesz zakończyć?</string>
<!-- Drawer, Menu, Toolbar, ContextMenu -->
<string name="nav_help_license">O aplikacji | Pomoc</string>
<string name="nav_followed_tags">Obserwowane znaczniki</string>
<string name="nav_public_activities">Publiczna aktywność</string>
<string name="nav_settings_view">Ustawienia aplikacji</string>
<string name="share__share_link_as_text">Udostępnij odnośnik jako tekst</string>
<string name="share__share_screenshot">Podziel zrzut ekranu strony internetowej</string>
<string name="share__toast_saved_image_to_location">Zapisywanie obrazu do</string>

View file

@ -31,10 +31,8 @@
<string name="confirm_pod">Você realmente quer usar\nhttps://%1$s\no seu Pod diáspora?</string>
<string name="confirm_exit">Deseja sair?</string>
<!-- Drawer, Menu, Toolbar, ContextMenu -->
<string name="nav_help_license">Sobre o app | Ajuda</string>
<string name="nav_followed_tags">Tags selecionadas</string>
<string name="nav_public_activities">Atividades públicas</string>
<string name="nav_settings_view">Configurações do App</string>
<string name="share__share_link_as_text">Compartilhar link como texto</string>
<string name="share__share_screenshot">Compartilhar o screenshot da página Web</string>
<string name="share__take_screenshot">Tirar screenshot da página Web</string>

View file

@ -31,10 +31,8 @@
<string name="confirm_pod">Вы действительно хотите использовать\nhttps://%1$s\nв качестве вашего пода в Диаспоре?</string>
<string name="confirm_exit">Вы действительно хотите выйти?</string>
<!-- Drawer, Menu, Toolbar, ContextMenu -->
<string name="nav_help_license">О приложении | Справка</string>
<string name="nav_followed_tags">Отслеживаемые хэштеги</string>
<string name="nav_public_activities">Публичная активность</string>
<string name="nav_settings_view">Настройки приложения</string>
<string name="share__share_link_as_text">Разместить ссылку как текст</string>
<string name="share__share_screenshot">Разместить экранный снимок страницы</string>
<string name="share__take_screenshot">Сделать экранный снимок страницы</string>

View file

@ -7,4 +7,8 @@
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="fab_margin">16dp</dimen>
<dimen name="appbar_padding_top">8dp</dimen>
<!-- Per the design guidelines, navigation drawers should be between 240dp and 320dp:
https://developer.android.com/design/patterns/navigation-drawer.html -->
<dimen name="navigation_drawer_width">250dp</dimen>
</resources>

View file

@ -20,7 +20,7 @@
<!-- About (large amount of text) -->
<string name="fragment_about__about_content">
DiasporaForAndroid is your companion app for browsing the Diaspora social network. It adds additional features like useful toolbars and support for proxy servers like the Tor Network to your social experience. &lt;br>&lt;br>
DiasporaForAndroid is your companion app for browsing the Diaspora social network. It adds features like useful toolbars and support for proxy servers like the Tor Network to your social experience. &lt;br>&lt;br>
Diaspora uses Markdown to format posts. You can find more information at&lt;br>
https://wiki.diasporafoundation.org/Markdown_reference_guide &lt;br> &lt;br>

View file

@ -52,11 +52,11 @@
<string name="nav_activities" translatable="false">@string/activities</string>
<string name="nav_aspects" translatable="false">@string/aspects</string>
<string name="nav_profile" translatable="false">@string/profile</string>
<string name="nav_menu_settings" translatable="false">@string/settings</string>
<string name="nav_help_license">About the app | Help</string>
<string name="nav_settings" translatable="false">@string/settings</string>
<string name="nav_menu_more">More</string>
<string name="nav_help_license">About | Help</string>
<string name="nav_followed_tags">Followed Tags</string>
<string name="nav_public_activities">Public activities</string>
<string name="nav_settings_view">App settings</string>
<string name="share__share_link_as_text">Share link as text</string>
<string name="share__share_screenshot">Share screenshot of webpage</string>

View file

@ -26,7 +26,7 @@
android:key="@string/pref_key__visibility_nav__aspects"
android:title="@string/nav_aspects" />
<CheckBoxPreference
android:defaultValue="true"
android:defaultValue="false"
android:key="@string/pref_key__visibility_nav__activities"
android:title="@string/nav_activities" />
<CheckBoxPreference
@ -38,11 +38,11 @@
android:key="@string/pref_key__visibility_nav__commented"
android:title="@string/nav_commented" />
<CheckBoxPreference
android:defaultValue="true"
android:defaultValue="false"
android:key="@string/pref_key__visibility_nav__mentions"
android:title="@string/nav_mentions" />
<CheckBoxPreference
android:defaultValue="true"
android:defaultValue="false"
android:key="@string/pref_key__visibility_nav__public_activities"
android:title="@string/nav_public_activities" />
<CheckBoxPreference