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.dengionline.content.faq; | |
import android.content.Context; | |
import com.dengionline.R; | |
import org.xml.sax.Attributes; | |
import org.xml.sax.InputSource; | |
import org.xml.sax.SAXException; | |
import org.xml.sax.XMLReader; | |
import org.xml.sax.helpers.DefaultHandler; |
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
SELECT friends._id, friends.global_first_name, friends.global_last_name, friends.friend_first_name, friends.friend_last_name, friends.status_text, friends.avatar_url | |
LEFT OUTER JOIN buddies ON buddies._id = | |
(SELECT buddies_contacts.buddy_id FROM buddies_contacts WHERE buddies_contacts.contact_hash IN | |
(SELECT friends_contacts.contact_hash FROM friends_contacts WHERE friends_contacts.private_user_id = friends.private_user_id)) | |
FROM friends_contacts | |
WHERE type = ? | |
ORDER BY global_first_name COLLATE LOCALIZED ASC |
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
public class MainFragment extends Fragment { | |
private Model mModel; | |
private TextView mTextView; | |
@Override | |
@SuppressWarnings("ConstantConditions") | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); |
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
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
mSubscriptionChatNotSynced = Observable | |
.combineLatest( | |
mMessagesListModel.isVisibleObservable(), | |
mMessagesListModel.isChatSyncedObervable(), | |
new Func2<Boolean, Boolean, Boolean>() { | |
@Override |
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 boolean hasNetwork() { | |
ConnectivityManager connectivityManager = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); | |
if (connectivityManager == null) { | |
return false; | |
} | |
NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo(); | |
if (networkInfo == null) { | |
return false; | |
} |
OlderNewer