This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DefaultLog implements Log { | |
public static final String DEFAULT_TAG = "Ln"; | |
private String mDefaultTag; | |
public DefaultLog(String defaultTag) { | |
mDefaultTag = defaultTag; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String sql = | |
"SELECT " + | |
"chats._id, chats.title, " + | |
"display_names_view.first_name, display_names_view.last_name, friends.avatar_thumb, " + | |
"chats.last_create_operation_time, " + | |
"(SELECT chat_messages.message FROM chat_messages WHERE chat_messages.chat_local_id = chats._id ORDER BY chat_messages._id DESC LIMIT 1) AS last_message, " + | |
"(SELECT COUNT(1) " + | |
"FROM chat_messages " + | |
"WHERE chat_messages.chat_local_id = chats._id AND chat_messages.creator_id <> ? AND chat_messages.status = ?" + | |
") AS count_unread," + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AppInstance extends Application { | |
private static AppInstance mInstance; | |
@Inject | |
IStorage mStorage; | |
@Override | |
public void onCreate() { | |
super.onCreate(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Target(ElementType.METHOD) | |
@Retention(RetentionPolicy.RUNTIME) | |
public @interface Property { | |
String[] property() default {}; | |
} | |
public class PropertyChangeListenerAnnotated implements PropertyChangeListener { | |
private Handler mDefaultHandler; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private ViewTreeObserver.OnGlobalLayoutListener mOnGlobalLayoutListener; | |
class OnGlobalLayoutListenerImpl implements ViewTreeObserver.OnGlobalLayoutListener { | |
@Override | |
public void onGlobalLayout() { | |
int heightDiff = mViewHolder.activityRootView.getRootView().getHeight() - mViewHolder.activityRootView.getHeight(); | |
if ((heightDiff > getMinKeyboardHeight()) != mIsKeyboardDisplayed) { | |
mIsKeyboardDisplayed = heightDiff > getMinKeyboardHeight(); | |
setElementVisibilityForSearch(mIsKeyboardDisplayed); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.vk.im.ui.utils.recyclerview; | |
import android.support.v7.widget.RecyclerView; | |
import android.util.SparseIntArray; | |
/** | |
* RecycledViewPool with unlimited number of ViewHolders | |
* {@author uas.sorokin@gmail.com} | |
*/ | |
public class NoLimitRecycledViewPool extends RecyclerView.RecycledViewPool { |
OlderNewer