本文整理了Java中com.zulip.android.ZulipApp.get()
方法的一些代码示例,展示了ZulipApp.get()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZulipApp.get()
方法的具体详情如下:
包路径:com.zulip.android.ZulipApp
类名称:ZulipApp
方法名:get
[英]Determines the server URI applicable for the user.
[中]确定适用于用户的服务器URI。
代码示例来源:origin: zulip/zulip-android
public ExpandableStreamDrawerAdapter(final Context context, Cursor cursor, int groupLayout,
String[] groupFrom, int[] groupTo, int childLayout,
String[] childFrom, int[] childTo) {
super(context, cursor, groupLayout, groupFrom, groupTo, childLayout, childFrom, childTo);
zulipApp = ZulipApp.get();
}
代码示例来源:origin: zulip/zulip-android
@Override
public String getTitle() {
return ZulipApp.get().getString(R.string.mentions);
}
代码示例来源:origin: zulip/zulip-android
public static String addHost(String url) {
if (!url.startsWith("http")) {
String hostUrl = ZulipApp.get().getServerHostUri();
if (hostUrl.endsWith("/")) {
url = hostUrl.substring(0, hostUrl.length() - 1) + url;
} else {
url = hostUrl + url;
}
}
return url;
}
}
代码示例来源:origin: zulip/zulip-android
@Before
public void setUp() {
app = ZulipApp.get();
if (ZulipApp.get().getApiKey() == null) {
BaseTest baseTest = new BaseTest();
baseTest.login();
sleep(4000);
}
//This is to make sure the latest recieved messages will be added to the list!
app.setPointer(app.getMaxMessageId());
setTestMessageStream((testMessageStream == null) ? RandomStringUtils.randomAlphanumeric(10) : testMessageStream);
setTestMessagePrivate((testMessagePrivate == null) ? RandomStringUtils.randomAlphanumeric(15) : testMessagePrivate);
}
代码示例来源:origin: zulip/zulip-android
@Before
public void setUp() {
if (ZulipApp.get().getApiKey() != null) {
logout();
}
}
代码示例来源:origin: zulip/zulip-android
private void loginThroughDevMail() {
//If EMAIL not specified click on first EMAIL.
if (EMAIL_TEST.equals("")) {
onView(allOf(withId(android.R.id.text1), emailFilter())).perform(click());
} else {
//Find and click the E-Mail Button.
ViewInteraction button = onView(Matchers.allOf(withId(android.R.id.text1), withText(EMAIL_TEST), isDisplayed()));
button.perform(click());
}
//Verify Correct E-Mail is Stored
assertThat(ZulipApp.get().getEmail(), is(EMAIL_TEST));
}
代码示例来源:origin: zulip/zulip-android
@Override
public String getTitle() {
ArrayList<String> names = new ArrayList<>();
for (Person person : people) {
// If PM to self then show title as your name
// people size == 1 implies PM to self
if (person.getId() != ZulipApp.get().getYou().getId() || people.size() == 1) {
names.add(person.getName());
}
}
return TextUtils.join(", ", names);
}
代码示例来源:origin: zulip/zulip-android
public ZulipInterceptor() {
app = ZulipApp.get();
}
代码示例来源:origin: zulip/zulip-android
public void setSubject(String subject) {
if (subject != null && subject.equals("")) {
// The empty string should be interpreted as "no topic"
// i18n here will be sad
this.subject = ZulipApp.get().getString(R.string.no_topic_in_message);
} else {
this.subject = subject;
}
}
代码示例来源:origin: zulip/zulip-android
public AsyncGetOldMessages(MessageListener listener) {
super(ZulipApp.get());
this.listener = listener;
rng = null;
}
代码示例来源:origin: zulip/zulip-android
@Override
public String getTitle() {
return isSameDay(date, new Date()) ? ZulipApp.get().getString(R.string.today_messages) : ZulipApp.get().getString(R.string.messages);
}
代码示例来源:origin: zulip/zulip-android
public NarrowFilterStream(String stream, String subject) {
this.stream = Stream.getByName(ZulipApp.get(), stream);
this.subject = subject;
}
代码示例来源:origin: zulip/zulip-android
@Override
public void onClick(DialogInterface dialogInterface, int i) {
ZulipApp.get().setDontShowAppDialog(true);
}
});
代码示例来源:origin: zulip/zulip-android
private NarrowFilterAllPMs(String recipient) {
this.recipient = recipient;
this.person = Person
.getById(ZulipApp.get(), Integer.valueOf(recipient));
}
代码示例来源:origin: zulip/zulip-android
public MessageListFragment() {
app = ZulipApp.get();
mMutedTopics = MutedTopics.get();
// Required empty public constructor
}
代码示例来源:origin: zulip/zulip-android
private NarrowFilterPM(String recipientString) {
this.recipientString = recipientString;
this.people = new ArrayList<>();
for (String id : this.recipientString.split(",")) {
this.people
.add(Person.getById(ZulipApp.get(), Integer.valueOf(id)));
}
}
代码示例来源:origin: zulip/zulip-android
public String getContent() {
if (content == null) {
content = formatContent(getFormattedContent(), ZulipApp.get()).toString();
}
return content;
}
代码示例来源:origin: zulip/zulip-android
private void init() {
app = ZulipApp.get();
mMutedTopics = MutedTopics.get();
request = new HTTPRequest(app);
}
代码示例来源:origin: zulip/zulip-android
public Stream getStream() {
if (stream == null && getType() == MessageType.STREAM_MESSAGE) {
stream = Stream.getByName(ZulipApp.get(), getRawRecipients());
}
return stream;
}
代码示例来源:origin: zulip/zulip-android
public void logOutGoogleAuth() {
GoogleSignInOptions googleSignInOptions = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestEmail()
.requestIdToken(BuildConfig.GOOGLE_CLIENT_ID)
.build();
mGoogleApiClient = new GoogleApiClient.Builder(ZulipApp.get())
.addApi(Auth.GOOGLE_SIGN_IN_API, googleSignInOptions)
.addConnectionCallbacks(this)
.build();
mGoogleApiClient.connect();
}
内容来源于网络,如有侵权,请联系作者删除!