Commit 6e28a9e4 authored by Grigory Fedorov's avatar Grigory Fedorov

Merge branch 'release/1.0.7'

parents cb412ce2 2932fb72
...@@ -7,8 +7,8 @@ android { ...@@ -7,8 +7,8 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 14 minSdkVersion 14
targetSdkVersion 22 targetSdkVersion 22
versionCode 178 versionCode 179
versionName '1.0.6' versionName '1.0.7'
} }
compileOptions { compileOptions {
......
...@@ -323,6 +323,10 @@ public class SettingsManager implements OnInitializedListener, ...@@ -323,6 +323,10 @@ public class SettingsManager implements OnInitializedListener,
throw new IllegalStateException(); throw new IllegalStateException();
} }
public static boolean chatsShowBackground() {
return getBoolean(R.string.chats_show_background_key, R.bool.chats_show_background_default);
}
public static int chatsAppearanceStyle() { public static int chatsAppearanceStyle() {
String value = getString(R.string.chats_font_size_key, String value = getString(R.string.chats_font_size_key,
R.string.chats_font_size_default); R.string.chats_font_size_default);
......
...@@ -27,6 +27,7 @@ import com.xabber.android.data.account.AccountItem; ...@@ -27,6 +27,7 @@ import com.xabber.android.data.account.AccountItem;
import com.xabber.android.data.account.AccountManager; import com.xabber.android.data.account.AccountManager;
import com.xabber.android.data.account.ArchiveMode; import com.xabber.android.data.account.ArchiveMode;
import com.xabber.android.data.account.OnAccountArchiveModeChangedListener; import com.xabber.android.data.account.OnAccountArchiveModeChangedListener;
import com.xabber.android.data.account.OnAccountDisabledListener;
import com.xabber.android.data.account.OnAccountRemovedListener; import com.xabber.android.data.account.OnAccountRemovedListener;
import com.xabber.android.data.account.StatusMode; import com.xabber.android.data.account.StatusMode;
import com.xabber.android.data.connection.ConnectionItem; import com.xabber.android.data.connection.ConnectionItem;
...@@ -68,8 +69,8 @@ import java.util.Set; ...@@ -68,8 +69,8 @@ import java.util.Set;
* @author alexander.ivanov * @author alexander.ivanov
*/ */
public class MessageManager implements OnLoadListener, OnPacketListener, OnDisconnectListener, public class MessageManager implements OnLoadListener, OnPacketListener, OnDisconnectListener,
OnAccountRemovedListener, OnRosterReceivedListener, OnAccountArchiveModeChangedListener, OnAccountRemovedListener, OnAccountDisabledListener, OnRosterReceivedListener,
OnStatusChangeListener { OnAccountArchiveModeChangedListener, OnStatusChangeListener {
private final static MessageManager instance; private final static MessageManager instance;
...@@ -574,6 +575,11 @@ public class MessageManager implements OnLoadListener, OnPacketListener, OnDisco ...@@ -574,6 +575,11 @@ public class MessageManager implements OnLoadListener, OnPacketListener, OnDisco
chats.clear(accountItem.getAccount()); chats.clear(accountItem.getAccount());
} }
@Override
public void onAccountDisabled(AccountItem accountItem) {
chats.clear(accountItem.getAccount());
}
/** /**
* Export chat to file with specified name. * Export chat to file with specified name.
* *
......
...@@ -27,6 +27,7 @@ import android.widget.LinearLayout; ...@@ -27,6 +27,7 @@ import android.widget.LinearLayout;
import com.xabber.android.R; import com.xabber.android.R;
import com.xabber.android.data.ActivityManager; import com.xabber.android.data.ActivityManager;
import com.xabber.android.data.Application; import com.xabber.android.data.Application;
import com.xabber.android.data.SettingsManager;
import com.xabber.android.data.account.OnAccountChangedListener; import com.xabber.android.data.account.OnAccountChangedListener;
import com.xabber.android.data.entity.BaseEntity; import com.xabber.android.data.entity.BaseEntity;
import com.xabber.android.data.extension.archive.MessageArchiveManager; import com.xabber.android.data.extension.archive.MessageArchiveManager;
...@@ -62,6 +63,7 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener ...@@ -62,6 +63,7 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener
private static final String ACTION_ATTENTION = "com.xabber.android.data.ATTENTION"; private static final String ACTION_ATTENTION = "com.xabber.android.data.ATTENTION";
private static final String ACTION_RECENT_CHATS = "com.xabber.android.data.RECENT_CHATS"; private static final String ACTION_RECENT_CHATS = "com.xabber.android.data.RECENT_CHATS";
private static final String ACTION_SPECIFIC_CHAT = "com.xabber.android.data.ACTION_SPECIFIC_CHAT"; private static final String ACTION_SPECIFIC_CHAT = "com.xabber.android.data.ACTION_SPECIFIC_CHAT";
private static final String ACTION_SHORTCUT = "com.xabber.android.data.ACTION_SHORTCUT";
private static final String SAVED_INITIAL_ACCOUNT = "com.xabber.android.ui.ChatViewer.SAVED_INITIAL_ACCOUNT"; private static final String SAVED_INITIAL_ACCOUNT = "com.xabber.android.ui.ChatViewer.SAVED_INITIAL_ACCOUNT";
private static final String SAVED_INITIAL_USER = "com.xabber.android.ui.ChatViewer.SAVED_INITIAL_USER"; private static final String SAVED_INITIAL_USER = "com.xabber.android.ui.ChatViewer.SAVED_INITIAL_USER";
...@@ -134,6 +136,12 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener ...@@ -134,6 +136,12 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener
return intent; return intent;
} }
public static Intent createShortCutIntent(Context context, String account, String user) {
Intent intent = createClearTopIntent(context, account, user);
intent.setAction(ACTION_SHORTCUT);
return intent;
}
/** /**
* Create intent to send message. * Create intent to send message.
* <p/> * <p/>
...@@ -167,7 +175,7 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener ...@@ -167,7 +175,7 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener
return; return;
} }
setContentView(R.layout.activity_chat_viewer); setContentView(R.layout.chat_viewer);
statusBarPainter = new StatusBarPainter(this); statusBarPainter = new StatusBarPainter(this);
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN); getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
...@@ -178,6 +186,10 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener ...@@ -178,6 +186,10 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener
restoreInstanceState(savedInstanceState); restoreInstanceState(savedInstanceState);
} }
initChats();
}
private void initChats() {
if (initialChat != null) { if (initialChat != null) {
chatViewerAdapter = new ChatViewerAdapter(getFragmentManager(), initialChat, this); chatViewerAdapter = new ChatViewerAdapter(getFragmentManager(), initialChat, this);
} else { } else {
...@@ -187,7 +199,10 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener ...@@ -187,7 +199,10 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener
viewPager = (ViewPager) findViewById(R.id.pager); viewPager = (ViewPager) findViewById(R.id.pager);
viewPager.setAdapter(chatViewerAdapter); viewPager.setAdapter(chatViewerAdapter);
viewPager.setOnPageChangeListener(this); viewPager.setOnPageChangeListener(this);
viewPager.getBackground().setAlpha(30);
if (SettingsManager.chatsShowBackground()) {
viewPager.setBackgroundDrawable(getResources().getDrawable(R.drawable.chat_background_repeat));
}
chatScrollIndicatorAdapter = new ChatScrollIndicatorAdapter(this, chatScrollIndicatorAdapter = new ChatScrollIndicatorAdapter(this,
(LinearLayout)findViewById(R.id.chat_scroll_indicator)); (LinearLayout)findViewById(R.id.chat_scroll_indicator));
...@@ -219,6 +234,7 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener ...@@ -219,6 +234,7 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener
case ACTION_SPECIFIC_CHAT: case ACTION_SPECIFIC_CHAT:
case ACTION_ATTENTION: case ACTION_ATTENTION:
case Intent.ACTION_SEND: case Intent.ACTION_SEND:
case ACTION_SHORTCUT:
isRecentChatsSelected = false; isRecentChatsSelected = false;
selectedChat = new BaseEntity(getAccount(intent), getUser(intent)); selectedChat = new BaseEntity(getAccount(intent), getUser(intent));
break; break;
...@@ -233,7 +249,13 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener ...@@ -233,7 +249,13 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener
} }
setIntent(intent); setIntent(intent);
getSelectedPageDataFromIntent(); getSelectedPageDataFromIntent();
if (intent.getAction().equals(ACTION_SHORTCUT)) {
getInitialChatFromIntent();
initChats();
}
} }
private void restoreInstanceState(Bundle savedInstanceState) { private void restoreInstanceState(Bundle savedInstanceState) {
......
...@@ -112,7 +112,7 @@ public class ChatViewerFragment extends Fragment implements PopupMenu.OnMenuItem ...@@ -112,7 +112,7 @@ public class ChatViewerFragment extends Fragment implements PopupMenu.OnMenuItem
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
super.onCreateView(inflater, container, savedInstanceState); super.onCreateView(inflater, container, savedInstanceState);
View view = inflater.inflate(R.layout.chat_fragment, container, false); View view = inflater.inflate(R.layout.chat_viewer_fragment, container, false);
contactTitleView = view.findViewById(R.id.contact_title); contactTitleView = view.findViewById(R.id.contact_title);
...@@ -215,10 +215,17 @@ public class ChatViewerFragment extends Fragment implements PopupMenu.OnMenuItem ...@@ -215,10 +215,17 @@ public class ChatViewerFragment extends Fragment implements PopupMenu.OnMenuItem
}); });
updateChat();
return view; return view;
} }
@Override
public void onResume() {
super.onResume();
listener.registerChat(this);
updateChat();
restoreInputState();
}
@Override @Override
public void onDetach() { public void onDetach() {
...@@ -267,16 +274,6 @@ public class ChatViewerFragment extends Fragment implements PopupMenu.OnMenuItem ...@@ -267,16 +274,6 @@ public class ChatViewerFragment extends Fragment implements PopupMenu.OnMenuItem
} }
} }
@Override
public void onResume() {
super.onResume();
listener.registerChat(this);
updateChat();
restoreInputState();
}
public void restoreInputState() { public void restoreInputState() {
skipOnTextChanges = true; skipOnTextChanges = true;
...@@ -361,7 +358,7 @@ public class ChatViewerFragment extends Fragment implements PopupMenu.OnMenuItem ...@@ -361,7 +358,7 @@ public class ChatViewerFragment extends Fragment implements PopupMenu.OnMenuItem
public void updateChat() { public void updateChat() {
ContactTitleInflater.updateTitle(contactTitleView, getActivity(), abstractContact); ContactTitleInflater.updateTitle(contactTitleView, getActivity(), abstractContact);
int itemCountBeforeUpdate = recyclerView.getAdapter().getItemCount(); int itemCountBeforeUpdate = chatMessageAdapter.getItemCount();
chatMessageAdapter.onChange(); chatMessageAdapter.onChange();
scrollChat(itemCountBeforeUpdate); scrollChat(itemCountBeforeUpdate);
setUpOptionsMenu(toolbar.getMenu()); setUpOptionsMenu(toolbar.getMenu());
...@@ -369,9 +366,14 @@ public class ChatViewerFragment extends Fragment implements PopupMenu.OnMenuItem ...@@ -369,9 +366,14 @@ public class ChatViewerFragment extends Fragment implements PopupMenu.OnMenuItem
} }
private void scrollChat(int itemCountBeforeUpdate) { private void scrollChat(int itemCountBeforeUpdate) {
if (layoutManager.findLastVisibleItemPosition() == (itemCountBeforeUpdate - 1)) { int lastVisibleItemPosition = layoutManager.findLastVisibleItemPosition();
recyclerView.scrollToPosition(chatMessageAdapter.getItemCount() - 1); if (lastVisibleItemPosition == -1 || lastVisibleItemPosition == (itemCountBeforeUpdate - 1)) {
scrollDown();
}
} }
private void scrollDown() {
recyclerView.scrollToPosition(chatMessageAdapter.getItemCount() - 1);
} }
private void updateSecurityButton() { private void updateSecurityButton() {
......
...@@ -548,7 +548,7 @@ public class ContactList extends ManagedActivity implements OnAccountChangedList ...@@ -548,7 +548,7 @@ public class ContactList extends ManagedActivity implements OnAccountChangedList
private void createShortcut(AbstractContact abstractContact) { private void createShortcut(AbstractContact abstractContact) {
Intent intent = new Intent(); Intent intent = new Intent();
intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, ChatViewer.createClearTopIntent(this, intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, ChatViewer.createShortCutIntent(this,
abstractContact.getAccount(), abstractContact.getUser())); abstractContact.getAccount(), abstractContact.getUser()));
intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, abstractContact.getName()); intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, abstractContact.getName());
Bitmap bitmap; Bitmap bitmap;
......
...@@ -5,22 +5,19 @@ ...@@ -5,22 +5,19 @@
android:layout_height="match_parent" android:layout_height="match_parent"
> >
<android.support.v4.view.ViewPager <android.support.v4.view.ViewPager
android:id="@+id/pager" android:id="@+id/pager"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@drawable/chat_background_repeat"
/> />
<LinearLayout <LinearLayout
android:id="@+id/chat_scroll_indicator"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginTop="62dp" android:layout_marginTop="62dp"
android:id="@+id/chat_scroll_indicator" android:orientation="horizontal"
> >
</LinearLayout> </LinearLayout>
......
...@@ -22,13 +22,13 @@ ...@@ -22,13 +22,13 @@
android:layout_width="32dip" android:layout_width="32dip"
android:layout_height="32dip" android:layout_height="32dip"
android:layout_marginTop="3dp"
android:layout_marginLeft="6dp"
android:layout_alignTop="@+id/message_text"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:layout_alignTop="@+id/message_text"
android:layout_marginLeft="6dp"
android:layout_marginTop="3dp"
android:src="@drawable/ic_avatar_1" android:src="@drawable/ic_avatar_1"
/> />
...@@ -37,29 +37,29 @@ ...@@ -37,29 +37,29 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_toRightOf="@id/avatar" android:layout_marginEnd="48dp"
android:layout_toEndOf="@id/avatar" android:layout_marginLeft="6dp"
android:minWidth="142dp"
android:paddingLeft="16dp" android:layout_marginRight="48dp"
android:paddingRight="10dp"
android:paddingEnd="6dp"
android:paddingTop="8dp" android:layout_marginStart="6dp"
android:paddingBottom="8dp" android:layout_toEndOf="@id/avatar"
android:layout_toRightOf="@id/avatar"
android:autoLink="all" android:autoLink="all"
android:background="@drawable/message_incoming"
android:layout_marginLeft="6dp" android:minWidth="142dp"
android:layout_marginStart="6dp"
android:layout_marginRight="48dp" android:paddingBottom="8dp"
android:layout_marginEnd="48dp" android:paddingEnd="6dp"
android:paddingLeft="16dp"
android:paddingRight="10dp"
android:background="@drawable/message_incoming"> android:paddingTop="8dp">
<include layout="@layout/chat_message"/> <include layout="@layout/chat_viewer_message" />
</FrameLayout> </FrameLayout>
...@@ -68,14 +68,14 @@ ...@@ -68,14 +68,14 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_toRightOf="@+id/avatar"
android:layout_toEndOf="@+id/avatar"
android:layout_below="@+id/message_balloon" android:layout_below="@+id/message_balloon"
android:layout_toEndOf="@+id/avatar"
android:layout_toRightOf="@+id/avatar"
android:paddingLeft="16dp" android:paddingLeft="16dp"
android:textSize="10sp"
android:text="Feb 19, 2015 4:39 PM" android:text="Feb 19, 2015 4:39 PM"
android:textSize="10sp"
/> />
</RelativeLayout> </RelativeLayout>
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
android:id="@+id/message_layout" android:id="@+id/message_layout"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minWidth="160dp"
android:orientation="vertical" android:orientation="vertical"
tools:showIn="@layout/chat_viewer_outgoing_message" tools:showIn="@layout/chat_viewer_outgoing_message"
> >
...@@ -28,7 +27,7 @@ ...@@ -28,7 +27,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:autoLink="all" android:autoLink="all"
android:minWidth="160dp"
android:text="Some text\n line \nrgregrere" /> android:text="Some text\n line \nrgregrere" />
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -24,26 +24,26 @@ ...@@ -24,26 +24,26 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginEnd="6dp"
android:layout_marginLeft="48dp" android:layout_marginLeft="48dp"
android:layout_marginStart="48dp"
android:layout_marginRight="6dp" android:layout_marginRight="6dp"
android:layout_marginEnd="6dp" android:layout_marginStart="48dp"
android:paddingLeft="12dp" android:background="@drawable/message_outgoing_states"
android:paddingTop="8dp"
android:paddingBottom="8dp" android:paddingBottom="8dp"
android:paddingRight="16dp"
android:paddingEnd="16dp" android:paddingEnd="16dp"
android:paddingLeft="12dp"
android:paddingRight="16dp"
android:background="@drawable/message_outgoing_states" android:paddingTop="8dp"
> >
<include layout="@layout/chat_message"/> <include layout="@layout/chat_viewer_message" />
</FrameLayout> </FrameLayout>
...@@ -51,16 +51,16 @@ ...@@ -51,16 +51,16 @@
android:id="@+id/message_time" android:id="@+id/message_time"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/message_balloon"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_below="@+id/message_balloon"
android:paddingRight="16dp"
android:paddingEnd="16dp" android:paddingEnd="16dp"
android:paddingRight="16dp"
android:textSize="10sp"
android:text="Feb 19, 2015 4:39 PM" android:text="Feb 19, 2015 4:39 PM"
android:textSize="10sp"
/> />
<ImageView <ImageView
......
...@@ -3,94 +3,94 @@ ...@@ -3,94 +3,94 @@
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<item android:id="@+id/action_join_conference" <item android:id="@+id/action_join_conference"
android:title="@string/muc_join" android:icon="@drawable/ic_group_white_24dp"
app:showAsAction="never"
android:orderInCategory="80" android:orderInCategory="80"
android:title="@string/muc_join"
android:visible="false" android:visible="false"
android:icon="@drawable/ic_group_white_24dp" app:showAsAction="never"
/> />
<item android:id="@+id/action_invite_to_chat" <item android:id="@+id/action_invite_to_chat"
android:title="@string/muc_invite"
app:showAsAction="never"
android:orderInCategory="90" android:orderInCategory="90"
android:title="@string/muc_invite"
android:visible="false" android:visible="false"
app:showAsAction="never"
/> />
<item android:id="@+id/action_view_contact" <item android:id="@+id/action_view_contact"
android:title="@string/contact_viewer"
app:showAsAction="never"
android:orderInCategory="100" android:orderInCategory="100"
android:title="@string/contact_viewer"
android:visible="false" android:visible="false"
app:showAsAction="never"
/> />
<item android:id="@+id/action_chat_list" <item android:id="@+id/action_chat_list"
android:title="@string/chat_list"
app:showAsAction="ifRoom"
android:orderInCategory="110"
android:icon="@drawable/ic_list_white_24dp" android:icon="@drawable/ic_list_white_24dp"
android:orderInCategory="110"
android:title="@string/chat_list"
android:visible="false" android:visible="false"
app:showAsAction="ifRoom"
/> />
<item android:id="@+id/action_chat_settings" <item android:id="@+id/action_chat_settings"
android:orderInCategory="120"
android:title="@string/chat_settings" android:title="@string/chat_settings"
app:showAsAction="never" app:showAsAction="never"
android:orderInCategory="120"
/> />
<item android:id="@+id/action_show_history" <item android:id="@+id/action_show_history"
android:icon="@drawable/ic_forum_white_24dp"
android:orderInCategory="130"
android:title="@string/show_history" android:title="@string/show_history"
app:showAsAction="never" app:showAsAction="never"
android:orderInCategory="130"
android:icon="@drawable/ic_forum_white_24dp"
/> />
<item android:id="@+id/action_authorization_settings" <item android:id="@+id/action_authorization_settings"
android:title="@string/muc_edit"
app:showAsAction="never"
android:orderInCategory="133" android:orderInCategory="133"
android:title="@string/muc_edit"
android:visible="false" android:visible="false"
app:showAsAction="never"
/> />
<item android:id="@+id/action_leave_conference" <item android:id="@+id/action_leave_conference"
android:title="@string/muc_leave"
app:showAsAction="never"
android:orderInCategory="136" android:orderInCategory="136"
android:title="@string/muc_leave"
android:visible="false" android:visible="false"
app:showAsAction="never"
/> />
<item android:id="@+id/action_clear_history" <item android:id="@+id/action_clear_history"
android:title="@string/clear_history"
app:showAsAction="never"
android:orderInCategory="160"
android:icon="@drawable/ic_clear_all_white_24dp" android:icon="@drawable/ic_clear_all_white_24dp"
/> android:orderInCategory="160"
android:title="@string/clear_history"
<item android:id="@+id/action_close_chat"
android:title="@string/close_chat"
app:showAsAction="never" app:showAsAction="never"
android:orderInCategory="165"
android:visible="false"
android:icon="@drawable/ic_clear_white_24dp"
/> />
<item android:id="@+id/action_export_chat" <item android:id="@+id/action_export_chat"
android:orderInCategory="170"
android:title="@string/export_chat" android:title="@string/export_chat"
app:showAsAction="never" app:showAsAction="never"
android:orderInCategory="170"
/> />
<item android:id="@+id/action_call_attention" <item android:id="@+id/action_call_attention"
android:orderInCategory="180"
android:title="@string/call_attention" android:title="@string/call_attention"
app:showAsAction="never" app:showAsAction="never"
android:orderInCategory="180"
/> />
<item android:id="@+id/action_list_of_occupants" <item android:id="@+id/action_list_of_occupants"
android:title="@string/occupant_list"
app:showAsAction="never"
android:orderInCategory="200" android:orderInCategory="200"
android:title="@string/occupant_list"
android:visible="false" android:visible="false"
app:showAsAction="never"
/> />
<item
android:id="@+id/action_close_chat"
android:icon="@drawable/ic_clear_white_24dp"
android:orderInCategory="210"
android:title="@string/close_chat"
android:visible="false"
app:showAsAction="never" />
</menu> </menu>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools"> <resources>
<!-- http://dl.dropbox.com/u/1029995/com.xabber.android/preference_editor_debug.png --> <!-- http://dl.dropbox.com/u/1029995/com.xabber.android/preference_editor_debug.png -->
<string name="cache_clear">Очистить кэш\nУдалить все сохранённые локально данные. Это позволит уменьшить занимаемое программой место.</string> <string name="cache_clear">Очистить кэш\nУдалить все сохранённые локально данные. Это позволит уменьшить занимаемое программой место.</string>
<!-- http://dl.dropbox.com/u/1029995/com.xabber.android/preference_editor_debug_cache.png --> <!-- http://dl.dropbox.com/u/1029995/com.xabber.android/preference_editor_debug_cache.png -->
...@@ -72,6 +72,9 @@ ...@@ -72,6 +72,9 @@
<string name="chats_divide">Сообщение с новой строки\nОтображать сообщение с новой строки</string> <string name="chats_divide">Сообщение с новой строки\nОтображать сообщение с новой строки</string>
<!-- http://dl.dropbox.com/u/1029995/com.xabber.android/preference_editor_chat_viewer_new_line.png --> <!-- http://dl.dropbox.com/u/1029995/com.xabber.android/preference_editor_chat_viewer_new_line.png -->
<string name="chats_divide_portrait">В портретном режиме</string> <string name="chats_divide_portrait">В портретном режиме</string>
<string name="chats_show_background">Отображать фон\nОтключение может увеличить производительность</string>
<!-- http://dl.dropbox.com/u/1029995/com.xabber.android/preference_editor_chat_viewer.png --> <!-- http://dl.dropbox.com/u/1029995/com.xabber.android/preference_editor_chat_viewer.png -->
<string name="chats_font_size">Размер шрифта\nРазмер текста сообщения</string> <string name="chats_font_size">Размер шрифта\nРазмер текста сообщения</string>
<!-- http://dl.dropbox.com/u/1029995/com.xabber.android/preference_editor_chat_viewer_font_size.png --> <!-- http://dl.dropbox.com/u/1029995/com.xabber.android/preference_editor_chat_viewer_font_size.png -->
...@@ -147,7 +150,7 @@ ...@@ -147,7 +150,7 @@
<string name="chats_attention">Привлечение внимания\nОтзываться на запросы привлечения внимания</string> <string name="chats_attention">Привлечение внимания\nОтзываться на запросы привлечения внимания</string>
<string name="chats_attention_sound">Звук привлечения внимания\nВыберите мелодию звонка</string> <string name="chats_attention_sound">Звук привлечения внимания\nВыберите мелодию звонка</string>
<string name="connection_load_vcard">Загружать vCard\nЗагружать и обновлять персональную информацию и аватары контактов. Отключение поможет сэкономить трафик.</string> <string name="connection_load_vcard">Загружать vCard\nЗагружать и обновлять персональную информацию и аватары контактов. Отключение поможет сэкономить трафик.</string>
<string name="connection_use_carbons">Сообщения carbons\nПринимать сообщения других сессий Вашей учетной записи. Отключение поможет сэкономить трафик.</string> <string name="connection_use_carbons">Сообщения carbons\nМожет работать нестабильно! Принимать сообщения других сессий Вашей учетной записи. Отключение поможет сэкономить трафик.</string>
<string name="events_phrases">Ключевые фразы\nНастройки уведомлений о сообщениях содержащих ключевые фразы</string> <string name="events_phrases">Ключевые фразы\nНастройки уведомлений о сообщениях содержащих ключевые фразы</string>
<!-- http://dl.dropbox.com/u/1029995/com.xabber.android/preference_editor_security_remove.png --> <!-- http://dl.dropbox.com/u/1029995/com.xabber.android/preference_editor_security_remove.png -->
<string name="security_clear_certificate_warning">Вы действительно хотите удалить все игнорируемые сертификаты?</string> <string name="security_clear_certificate_warning">Вы действительно хотите удалить все игнорируемые сертификаты?</string>
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools"> <resources>
<!-- http://dl.dropbox.com/u/1029995/com.xabber.android/preference_editor_debug.png --> <!-- http://dl.dropbox.com/u/1029995/com.xabber.android/preference_editor_debug.png -->
<string name="cache_clear">Clear cache\nClear all local data. This can free some space.</string> <string name="cache_clear">Clear cache\nClear all local data. This can free some space.</string>
<!-- http://dl.dropbox.com/u/1029995/com.xabber.android/preference_editor_debug_cache.png --> <!-- http://dl.dropbox.com/u/1029995/com.xabber.android/preference_editor_debug_cache.png -->
...@@ -72,6 +72,9 @@ ...@@ -72,6 +72,9 @@
<string name="chats_divide">Message on the new line\nDisplay a message on a new line</string> <string name="chats_divide">Message on the new line\nDisplay a message on a new line</string>
<!-- http://dl.dropbox.com/u/1029995/com.xabber.android/preference_editor_chat_viewer_new_line.png --> <!-- http://dl.dropbox.com/u/1029995/com.xabber.android/preference_editor_chat_viewer_new_line.png -->
<string name="chats_divide_portrait">In portrait mode</string> <string name="chats_divide_portrait">In portrait mode</string>
<string name="chats_show_background">Show background\nDisabling may increase performance</string>
<!-- http://dl.dropbox.com/u/1029995/com.xabber.android/preference_editor_chat_viewer.png --> <!-- http://dl.dropbox.com/u/1029995/com.xabber.android/preference_editor_chat_viewer.png -->
<string name="chats_font_size">Font size\nSize of text in the message</string> <string name="chats_font_size">Font size\nSize of text in the message</string>
<!-- http://dl.dropbox.com/u/1029995/com.xabber.android/preference_editor_chat_viewer_font_size.png --> <!-- http://dl.dropbox.com/u/1029995/com.xabber.android/preference_editor_chat_viewer_font_size.png -->
...@@ -147,7 +150,7 @@ ...@@ -147,7 +150,7 @@
<string name="chats_attention">Attention\nReact for the incoming attention requests</string> <string name="chats_attention">Attention\nReact for the incoming attention requests</string>
<string name="chats_attention_sound">Attention sound\nChoose ring-tone</string> <string name="chats_attention_sound">Attention sound\nChoose ring-tone</string>
<string name="connection_load_vcard">Load vCard\nLoad and update contact\'s personal info and avatar. Disable to reduce traffic usage.</string> <string name="connection_load_vcard">Load vCard\nLoad and update contact\'s personal info and avatar. Disable to reduce traffic usage.</string>
<string name="connection_use_carbons">Carbon-copied mode\nWill share the sessions for the same account on this client. Disable to reduce traffic usage.</string> <string name="connection_use_carbons">Carbon-copied mode\nMay work unstable! Will share the sessions for the same account on this client. Disable to reduce traffic usage.</string>
<string name="events_phrases">Key phrases\nCustom sound notifications about messages with preset phrases</string> <string name="events_phrases">Key phrases\nCustom sound notifications about messages with preset phrases</string>
<!-- http://dl.dropbox.com/u/1029995/com.xabber.android/preference_editor_security_remove.png --> <!-- http://dl.dropbox.com/u/1029995/com.xabber.android/preference_editor_security_remove.png -->
<string name="security_clear_certificate_warning">Do you really want to remove all the ignored certificates?</string> <string name="security_clear_certificate_warning">Do you really want to remove all the ignored certificates?</string>
......
...@@ -246,6 +246,9 @@ ...@@ -246,6 +246,9 @@
</string-array> </string-array>
<string name="chats_hide_keyboard_default">@string/chats_hide_keyboard_landscape_value</string> <string name="chats_hide_keyboard_default">@string/chats_hide_keyboard_landscape_value</string>
<string name="chats_show_background_key">chats_show_background</string>
<bool name="chats_show_background_default">true</bool>
<string name="chats_font_size_key">chats_font_size</string> <string name="chats_font_size_key">chats_font_size</string>
<string name="chats_font_size_small_value">small</string> <string name="chats_font_size_small_value">small</string>
<string name="chats_font_size_normal_value">normal</string> <string name="chats_font_size_normal_value">normal</string>
...@@ -364,7 +367,7 @@ ...@@ -364,7 +367,7 @@
<bool name="connection_load_vcard_default">true</bool> <bool name="connection_load_vcard_default">true</bool>
<string name="connection_use_carbons_key">connection_use_carbons</string> <string name="connection_use_carbons_key">connection_use_carbons</string>
<bool name="connection_use_carbons_default">true</bool> <bool name="connection_use_carbons_default">false</bool>
<!-- preference_cache --> <!-- preference_cache -->
<string name="cache_clear_key">cache_clear</string> <string name="cache_clear_key">cache_clear</string>
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<CheckBoxPreference <CheckBoxPreference
android:title="@string/chats_show_avatars"
android:key="@string/chats_show_avatars_key"
android:defaultValue="@bool/chats_show_avatars_default" android:defaultValue="@bool/chats_show_avatars_default"
android:key="@string/chats_show_avatars_key"
android:title="@string/chats_show_avatars"
/> />
<CheckBoxPreference <CheckBoxPreference
android:title="@string/chats_send_by_enter"
android:key="@string/chats_send_by_enter_key"
android:defaultValue="@bool/chats_send_by_enter_default" android:defaultValue="@bool/chats_send_by_enter_default"
android:key="@string/chats_send_by_enter_key"
android:title="@string/chats_send_by_enter"
/> />
<ListPreference <ListPreference
android:title="@string/chats_show_status_change" android:defaultValue="@string/chats_show_status_change_default"
android:summary="@string/chats_show_status_change"
android:key="@string/chats_show_status_change_key"
android:entries="@array/chats_show_status_change_entries" android:entries="@array/chats_show_status_change_entries"
android:entryValues="@array/chats_show_status_change_entryvalues" android:entryValues="@array/chats_show_status_change_entryvalues"
android:defaultValue="@string/chats_show_status_change_default" android:key="@string/chats_show_status_change_key"
android:summary="@string/chats_show_status_change"
android:title="@string/chats_show_status_change"
/> />
<ListPreference <ListPreference
android:title="@string/chats_hide_keyboard" android:defaultValue="@string/chats_hide_keyboard_default"
android:key="@string/chats_hide_keyboard_key"
android:entries="@array/chats_hide_keyboard_entries" android:entries="@array/chats_hide_keyboard_entries"
android:entryValues="@array/chats_hide_keyboard_entryvalues" android:entryValues="@array/chats_hide_keyboard_entryvalues"
android:defaultValue="@string/chats_hide_keyboard_default" android:key="@string/chats_hide_keyboard_key"
android:title="@string/chats_hide_keyboard"
/>
<CheckBoxPreference
android:defaultValue="@bool/chats_show_background_default"
android:key="@string/chats_show_background_key"
android:title="@string/chats_show_background"
/> />
<ListPreference <ListPreference
android:title="@string/chats_font_size" android:defaultValue="@string/chats_font_size_default"
android:key="@string/chats_font_size_key"
android:entries="@array/chats_font_size_entries" android:entries="@array/chats_font_size_entries"
android:entryValues="@array/chats_font_size_entryvalues" android:entryValues="@array/chats_font_size_entryvalues"
android:defaultValue="@string/chats_font_size_default" android:key="@string/chats_font_size_key"
android:title="@string/chats_font_size"
/> />
<ListPreference <ListPreference
android:title="@string/chats_divide" android:defaultValue="@string/chats_divide_default"
android:key="@string/chats_divide_key"
android:entries="@array/chats_divide_entries" android:entries="@array/chats_divide_entries"
android:entryValues="@array/chats_divide_entryvalues" android:entryValues="@array/chats_divide_entryvalues"
android:defaultValue="@string/chats_divide_default" android:key="@string/chats_divide_key"
android:title="@string/chats_divide"
/> />
<CheckBoxPreference <CheckBoxPreference
android:title="@string/chats_state_notification"
android:key="@string/chats_state_notification_key"
android:defaultValue="@bool/chats_state_notification_default" android:defaultValue="@bool/chats_state_notification_default"
android:key="@string/chats_state_notification_key"
android:title="@string/chats_state_notification"
/> />
<CheckBoxPreference <CheckBoxPreference
android:title="@string/chats_attention"
android:key="@string/chats_attention_key"
android:defaultValue="@bool/chats_attention_default" android:defaultValue="@bool/chats_attention_default"
android:key="@string/chats_attention_key"
android:title="@string/chats_attention"
/> />
<RingtonePreference <RingtonePreference
android:title="@string/chats_attention_sound"
android:key="@string/chats_attention_sound_key"
android:defaultValue="@string/chats_attention_sound_default" android:defaultValue="@string/chats_attention_sound_default"
android:ringtoneType="ringtone"
android:dependency="@string/chats_attention_key" android:dependency="@string/chats_attention_key"
android:showSilent="true" android:key="@string/chats_attention_sound_key"
android:ringtoneType="ringtone"
android:showDefault="true" android:showDefault="true"
android:showSilent="true"
android:title="@string/chats_attention_sound"
/> />
</PreferenceScreen> </PreferenceScreen>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment