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
| int lineWidth = getResources().getDimensionPixelOffset(R.dimen.one_dp); | |
| int lineColor = ContextCompat.getColor(getContext(), R.color.grey_light); | |
| textView.setText(new Truss() | |
| .appendln(new Snippety().hr(lineWidth, lineColor)) | |
| .build()); |
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
| Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.ic_star_black_24dp); | |
| int padding = getResources().getDimensionPixelOffset(R.dimen.space_medium); | |
| textView.setText(new Truss() | |
| .appendln("Image Bullet One", new Snippety().bullet(bitmap, padding)) | |
| .appendln("Image Bullet Two", new Snippety().bullet(bitmap, padding)) | |
| .build()); |
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
| int leadWidth = getResources().getDimensionPixelOffset(R.dimen.space_medium); | |
| int gapWidth = getResources().getDimensionPixelOffset(R.dimen.space_xlarge); | |
| textView.setText(new Truss() | |
| .appendln("Custom Bullet One", new Snippety().bullet(leadWidth, gapWidth, "I.")) | |
| .appendln("Custom Bullet Two", new Snippety().bullet(leadWidth, gapWidth, "II.")) | |
| .build()); |
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
| int leadWidth = getResources().getDimensionPixelOffset(R.dimen.space_medium); | |
| int gapWidth = getResources().getDimensionPixelOffset(R.dimen.space_xlarge); | |
| textView.setText(new Truss() | |
| .appendln("Bullet One", new Snippety().bullet(leadWidth, gapWidth)) | |
| .appendln("Bullet Two", new Snippety().bullet(leadWidth, gapWidth)) | |
| .build()); |
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
| int leadWidth = getResources().getDimensionPixelOffset(R.dimen.space_medium); | |
| int gapWidth = getResources().getDimensionPixelOffset(R.dimen.space_xlarge); | |
| textView.setText(new Truss() | |
| .appendln("Number One", new Snippety().number(leadWidth, gapWidth, 1)) | |
| .appendln("Number Two", new Snippety().number(leadWidth, gapWidth, 2)) | |
| .build()); |
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
| @Reusable | |
| class AppPushNotification @Inject | |
| constructor(private val notificationManager: NotificationManager, | |
| private val resolver: NotificationItemResolver, | |
| private val notificationBuilder: NotificationBuilder, | |
| private val collapsingNotificationManager: CollapsingNotificationManager) : PushNotification { | |
| override fun push(context: Context, data: Map<String, String>) { | |
| val item = resolver.resolve(context, data, collapsingNotificationManager.getNotificationsToCollapse(data)) |
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
| { | |
| "to" : "<firebase_instance_id>", | |
| "collapse_key" : "type_a", | |
| "data":{ | |
| "android_channel_id": "collapsingnotifications", | |
| "body": "First Notification", | |
| "title": "Collapsing A", | |
| "custom_url":"http://collapsingnotification.fueled.com/home" | |
| } | |
| } |
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
| public class MainActivity extends AppCompatActivity implements MainHandler { | |
| private ActivityMainBinding binding; | |
| private LoginModel model = new LoginModel(); | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| binding = DataBindingUtil.setContentView(this, R.layout.activity_main); |
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
| public interface MainHandler { | |
| void onLoginClicked(String email, String password); | |
| } |