Skip to content

Instantly share code, notes, and snippets.

View osmanghaziurdu's full-sized avatar

Juttg osmanghaziurdu

  • 17:21 (UTC +05:00)
View GitHub Profile
@zulu15
zulu15 / gist:cf1004fb816b43a00e48864060531ee7
Created August 1, 2019 23:50
ListView implementation with FirebaseUI
package com.zulu.fireapp;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ListView;
import android.widget.TextView;
import com.firebase.ui.database.FirebaseListAdapter;
@EduardoSP6
EduardoSP6 / back_button_toolbar_fragment
Last active December 13, 2023 16:08
Show back button in Toolbar from Fragment in Android App
# In this situation I have the MainActivity that calls FragmentA. This fragment implements OnBackStackChangedListener,
# and checks the size of the backStack; if it's less than one, then it hides the UP button. The fragments B and C are called by
# the A, them just show/hide the button.
# MainActivity:
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home: