Open in app

Sign In

Write

Sign In

Rohit Singh
Rohit Singh

72 Followers

Home

About

Oct 31, 2020

Slide Fragment from the Bottom in Android

If you want something like this. Then you are at the right place. It’s really simple. Just Create these 4 anim XML files, and replace the current fragment with your new fragment. 2 Fragments - 4 Anims DogsListFragment + DogDetailFragment slide_in_bottom + slide_out_top + slide_in_top + slide_out_bottom. But let’s visualize it first.

2 min read

Slide Fragment from the Bottom in Android
Slide Fragment from the Bottom in Android

2 min read


Jun 13, 2020

What is addToBackStack in Fragment

Fragment API unlike Activity API does not come with Back Button navigation by default. So if you have added or replaced many Fragments on a Fragment container. There is no way to go back to the previous Fragment on a Back Button Pressed. Let's see the difference between the behaviors Case 1: Default behavior getSupportFragmentManager() .beginTransaction() .add(R.id.fragmentContainer, fragment, "TAG") .commit();

Fragments

2 min read

What is addToBackStack in Fragment
What is addToBackStack in Fragment
Fragments

2 min read


May 18, 2020

How to Color part of TextView in Android

Use HTML-escapes + Html.fromHtml() The trick here is to add HTML Tags for styling in the String and then set that String to TextView. Code: Keep the string in string (resource)folder like this: Read the string from string (resource)folder like this String text = this.getResources().getString(R.string.textFromRes); htmlText.setText(Html.fromHtml(text)); Output: Note: The string shown in the above output looks like this

Android

1 min read

How to Color part of TextView in Android
How to Color part of TextView in Android
Android

1 min read


Apr 14, 2020

ESP32 Microprocessor + Mangoose OS(PART-1)

What is Mongoose OS? It is an open-source Operating System for the Internet of Things. which is used to create firmware(applications) for microprocessors. Many microcontrollers like ESP32, ESP8266, STM32, TI CC3200, TI CC3220, etc support this OS. What is MOS Tool? Mangoose OS uses mos tool to perform various tasks such as building firmware flashing firmware managing devices …

Esp32

2 min read

ESP32 Microprocessor + Mangoose OS(PART-1)
ESP32 Microprocessor + Mangoose OS(PART-1)
Esp32

2 min read


Mar 25, 2020

How to use LocalBroadcastManager in Android?

Advantages of using LocalBroadcast Receiver over Broadcast Reciever? Secure Out: Your broadcasted data remains inside the App. So other apps can not receive your data Secure In: Your app will not receive Data from other apps Broadcast. Drains less battery: It is a more efficient way to send/receive data locally. How to change your global Broadcast to LocalBroadcast? …

Android

2 min read

How to write LocalBroadcastManager in Android?
How to write LocalBroadcastManager in Android?
Android

2 min read


Feb 28, 2020

Why and How to use TaskStackBuilder in Android?

Q: Why? A: To provide proper navigation. When the app is launched by App icon (Normal Flow)

Taskstackbuilder

2 min read

Why and How to use TaskStackBuilder in Android?
Why and How to use TaskStackBuilder in Android?
Taskstackbuilder

2 min read


Feb 27, 2020

Intent Service: Don’t reinvent the wheel.

This is a re-post of an answer I wrote on Stackoverflow. IntentService extends Service class which clearly means that IntentService is intentionally made for the same purpose. So what is the purpose? `IntentService’s purpose is to make our job easier to run background tasks without even worrying about Creation of…

Android

2 min read

Intent Service: Don’t reinvent the wheel.
Intent Service: Don’t reinvent the wheel.
Android

2 min read


Feb 4, 2020

How to create a DoubleTapListner in Android

button.setOnClickListener(this); You must have seen this a thousand times. I bet. Wouldn’t it be nice to have something like this for “DoubleTapListner” You can create a DoubleTapListener by yourself by extending View.OncliclkListener and attach it to any View(Button, TextView, EditText, etc) in Android. Follow these simple steps and you will be able to create a Double, Triple and even a “unicorn” listener.

Android

1 min read

How to create a DoubleTapListner in Android
How to create a DoubleTapListner in Android
Android

1 min read


Dec 22, 2019

Different states of Android Activity

An Android Activity has 4 States Running Paused Stopped Destroyed Now there is a very unclear Demarcation among them if you just started learning Android application development. I will try to explain it in simple terms. So hang on! 1) Running When a user is actively interacting with an Activity then the…

Android App Development

3 min read

Different states of Android Activity
Different states of Android Activity
Android App Development

3 min read


Dec 20, 2019

How to run Apache Jena in Android

Apache Jena is an Open Source framework for building Semantic Web and Linked Data applications. It's quite popular and super-easy to run SPARQL queries from Eclipse IDE using Apache Jena library. However, there are not a lot of resources/support available online when you choose to use this framework to make…

Android

2 min read

How to run Apache Jena in Android
How to run Apache Jena in Android
Android

2 min read

Rohit Singh

Rohit Singh

72 Followers

Android Developer | Arizona State University | NASA Psyche Research Aide

Following
  • Joe Eames

    Joe Eames

  • Dhruvam Sharma

    Dhruvam Sharma

  • Aayush Arora

    Aayush Arora

  • Psyche Student Collaborations

    Psyche Student Collaborations

  • Hootsuite Engineering

    Hootsuite Engineering

See all (9)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech

Teams