Skip to content

Instantly share code, notes, and snippets.


Lekan Olad culjo

View GitHub Profile
View tuts-swiftlogin-5.swift
Button(action: submit) {
HStack(alignment: .center) {
//.. remaining body of view
View tuts-swiftlogin-4.swift
SecureField(.constant(""), placeholder: Text("Password"))
.padding(.bottom, 10)
View tuts-swiftlogin-3.swift
TextField(.constant(""), placeholder: Text("Email"))
.padding(EdgeInsets(top: 0, leading: 0, bottom: 15, trailing: 0))
culjo / tuts-swiftlogin-2.swift
Created June 27, 2019 02:02
A the second snippets from the swift login tutorial
View tuts-swiftlogin-2.swift
.resizable() // make the image resizable
.frame(width: 74.0, height: 74.0) // constraints the image to a specified width and height
.padding(Edge.Set.bottom, 20) // Adds a 20 space padding to the bottom of the image
Text("Login").bold().font(.title) // text with bold and title font
View swiftlogin-imageview.swift
VStack {
.frame(width: 74.0, height: 74.0)
.padding(Edge.Set.bottom, 20)
Text("Explore the world of Swift UI")
culjo / tuts-swiftlogin-contentview.swift
Last active July 15, 2020 00:30
A SwiftUI login screen
View tuts-swiftlogin-contentview.swift
import SwiftUI
struct ContentView : View {
@EnvironmentObject var loginViewModel: LoginViewModel
@State var counter: Int = 0
var body: some View {
VStack() {
culjo /
Created June 3, 2018 23:43 — forked from anandwana001/
Implementing Bottom Navigation Bar in your Android App with more than 3 items
public class MainActivity extends AppCompatActivity {
BottomNavigationView navigation;
Toolbar toolbar;
private int saveState;
private BottomNavigationView.OnNavigationItemSelectedListener mOnNavigationItemSelectedListener
culjo /
Created February 20, 2018 13:58 — forked from danielgomezrico/
Java / Android - calculate the distance between two coordinates with great circle formula.
import static java.lang.Math.acos;
import static java.lang.Math.cos;
import static java.lang.Math.sin;
* Calculate distance between coordinates.
public class DistanceCalculator {
static double PI_RAD = Math.PI / 180.0;
culjo /
Created February 14, 2018 23:54 — forked from lopspower/
How to Analyze & Manage Memory on Android Like a Boss

Analyze & Manage Memory on Android Like a Boss

This Blog is all about memory management in Android. It provides information about how you can analyze & reduce memory usage while developing an Android app.

Memory management is a complex field of computer science and there are many techniques being developed to make it more efficient. This guide is designed to introduce you to some of the basic memory management issues that programmers face.

Memory Management in Android

Android is a Linux based operating system. It uses native open source C libraries which power Linux machines. All the basic operating system operations like I/O, memory management and so on are handled by the Linux kernel. Like Java and .NET, Android uses its own run time and virtual machine to manage application memory. Unlike either of these frameworks, the Android run time also manages the lifetime processes. Each Android application runs in a separate process within its own Dalvik instance, relinquishing all responsibility for memo

culjo /
Created January 4, 2018 02:16
Fast Android Networking Network Call Handler
import android.content.Context;
import android.util.Log;
import android.widget.Toast;
import com.androidnetworking.AndroidNetworking;
import com.androidnetworking.common.Priority;
import com.androidnetworking.error.ANError;
import com.androidnetworking.interceptors.HttpLoggingInterceptor;
import com.androidnetworking.interfaces.JSONArrayRequestListener;
import com.androidnetworking.interfaces.JSONObjectRequestListener;