Skip to content

Instantly share code, notes, and snippets.

View Zoha131's full-sized avatar
🎯
Hunting a Job

Md Abir Hasan Zoha Zoha131

🎯
Hunting a Job
View GitHub Profile
private IMainActivity mIMainActivity;
static int mAppHeight;
static int currentOrientation = -1;
public void setKeyboardVisibilityListener() {
final View contentView = getActivity().findViewById(android.R.id.content);
contentView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
private IMainActivity mIMainActivity;
static int mAppHeight;
static int currentOrientation = -1;
public void setKeyboardVisibilityListener() {
final View contentView = getActivity().findViewById(android.R.id.content);
contentView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Zoha131
Zoha131 / ImageBehavior.java
Last active May 12, 2019 10:51
Custom CoordinatorLayout Behavior
package io.github.zoha131.custombehavioronefinal;
import android.annotation.SuppressLint;
import android.content.Context;
import android.support.design.widget.CoordinatorLayout;
import android.support.v7.widget.Toolbar;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
@Zoha131
Zoha131 / Jetpack Compose Nested Navigation
Created November 19, 2020 17:22
When I make the nested navigation the startDestination then it works otherwise I can’t go to the nested navigation. How can I navigate to the nested navigation?
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.compose.foundation.layout.*
import androidx.compose.material.Text
import androidx.compose.material.Button
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.setContent
import androidx.compose.ui.unit.dp