This file contains hidden or 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 fun applyHashtagSpanForResiNumber(fullText: String, | |
messageEditorSpannable: Spannable) { | |
launch(UI) { | |
var indexAsync = async(CommonPool, CoroutineStart.LAZY) { | |
fullText.indexOf(RESI_NUMBER, 0) | |
} | |
while (indexAsync.await() != -1) { | |
val hashtagSpanAsync = async(CommonPool, CoroutineStart.LAZY) { | |
CharacterStyle.wrap(hashtagForegroundColorSpan) | |
} |
This file contains hidden or 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
fun initHotline(applicationContext: Context) { | |
initHotlineBaseConfig(applicationContext) | |
initHotlineNotification(applicationContext) | |
initHotlineUser(applicationContext) | |
} | |
private fun initHotlineBaseConfig(applicationContext: Context) { | |
val hotlineConfig = HotlineConfig(BuildConfig.HOTLINE_APP_ID, BuildConfig.HOTLINE_APP_KEY) | |
Hotline.getInstance(applicationContext).init(hotlineConfig) | |
} |
This file contains hidden or 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 io.prismapp.mobile.chat.base.dbflow.typeconverter | |
import com.raizlabs.android.dbflow.converter.TypeConverter | |
import io.prismapp.mobile.base.PrismApplication | |
import io.prismapp.mobile.chat.base.model.BrokerMetadata | |
/** | |
* Created by elsennovraditya on 8/24/16. | |
*/ | |
class BrokerMetadataConverter : TypeConverter<String, BrokerMetadata>() { |
This file contains hidden or 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 io.prismapp.mobile.chat.base.dbflow.typeconverter | |
import com.raizlabs.android.dbflow.converter.TypeConverter | |
import io.prismapp.mobile.base.PrismApplication | |
import io.prismapp.mobile.chat.base.model.BrokerMetadata | |
/** | |
* Created by elsennovraditya on 8/24/16. | |
*/ | |
class BrokerMetadataConverter : TypeConverter<String, BrokerMetadata>() { |
This file contains hidden or 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 void initLogout() { | |
RxNavi.observe(naviComponent, Event.VIEW_CREATED) | |
.filter(viewCreated -> accountPresenter.isLoggedIn(getContext())) | |
.observeOn(AndroidSchedulers.mainThread()) | |
.doOnNext(viewCreated -> viewCreated.view() | |
.findViewById(R.id.account_divider_logout).setVisibility(View.VISIBLE)) | |
.map(viewCreated -> { | |
View logoutButton = viewCreated.view().findViewById(R.id.account_logout); | |
logoutButton.setVisibility(View.VISIBLE); | |
return logoutButton; |
This file contains hidden or 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.novraditya.elsen.espressotestrecorder; | |
import android.support.test.espresso.ViewInteraction; | |
import android.support.test.rule.ActivityTestRule; | |
import android.support.test.runner.AndroidJUnit4; | |
import android.test.suitebuilder.annotation.LargeTest; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.view.ViewParent; |
This file contains hidden or 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.novraditya.elsen.tablayoutexample; | |
import android.content.Context; | |
import android.graphics.Point; | |
import android.util.DisplayMetrics; | |
import android.view.Display; | |
import android.view.WindowManager; | |
/** | |
* Created by elsennovraditya on 3/20/16. |
This file contains hidden or 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.novraditya.elsen.tablayoutexample; | |
import android.content.Context; | |
import android.support.design.widget.TabLayout; | |
import android.util.AttributeSet; | |
import java.lang.reflect.Field; | |
/** | |
* Created by elsennovraditya on 3/20/16. |
This file contains hidden or 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 onBackPressed() { | |
if (isTaskRoot()) { | |
startHomeActivity(); | |
} else { | |
super.onBackPressed(); | |
} | |
} | |
private void startHomeActivity() { |
This file contains hidden or 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
<activity | |
android:name=".ProductDetailActivity" | |
android:label="Product Detail" | |
android:screenOrientation="portrait" | |
android:theme="@style/ProductDetailTheme"> | |
<intent-filter> | |
<category android:name="android.intent.category.BROWSABLE" /> | |
<category android:name="android.intent.category.DEFAULT" /> | |
<action android:name="android.intent.action.VIEW" /> |
NewerOlder