Skip to content

Instantly share code, notes, and snippets.

View SwordBearer's full-sized avatar
🤒
Out sick

SwordBearer SwordBearer

🤒
Out sick
  • Momo Tech
  • China
View GitHub Profile
@chrisbanes
chrisbanes / SystemUiHelper.java
Last active March 2, 2024 18:57
SystemUiHelper
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@zirouan
zirouan / Color theme - NavigationDrawer-Material Design
Last active August 22, 2017 12:36
Color theme - NavigationDrawer-Material Design
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="nliveo_white">#ffffff</color>
<color name="nliveo_grey">#e0e0e0</color>
<color name="nliveo_black">#000000</color>
<color name="nliveo_transparent">#00000000</color>
<color name="nliveo_blue_colorPrimary">#2196F3</color>
<color name="nliveo_blue_colorPrimaryDark">#1976D2</color>
<color name="nliveo_blue_alpha_colorPrimaryDark">#801976D2</color>
@aows
aows / gist:0bdd2ead2fb2ed1d4872
Created May 27, 2015 00:10
Changing text color of a MenuItem programmatically (Android)
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
MenuItem settingsMenuItem = menu.findItem(R.id.action_settings);
SpannableString s = new SpannableString(settingsMenuItem.getTitle());
s.setSpan(new ForegroundColorSpan(yourColor), 0, s.length(), 0);
settingsMenuItem.setTitle(s);
return super.onPrepareOptionsMenu(menu);
}
@blackcj
blackcj / MainActivity.java
Last active July 24, 2024 01:40
Design support library with CoordinatorLayout, SwipeRefreshLayout and RecyclerView.
import android.os.Bundle;
import android.support.design.widget.AppBarLayout;
import android.support.design.widget.TabLayout;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import com.blackcj.designsupportexample.adapters.RecyclerViewAdapter;
@alphamu
alphamu / SeparatorTextView.java
Last active February 3, 2023 18:54
Demonstration of how to make a custom TextView which has a separator running across it. Screenshot of TextView https://raw.githubusercontent.com/alphamu/RxAndroidDemo/master/app/SeparatorTextViewSample.png
import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.os.Build;
import android.util.AttributeSet;
import android.view.Gravity;
import android.widget.TextView;
/**
* Simple version used in the article:
@Tosyn
Tosyn / phalconphp_php7_ubuntu_16_04.sh
Last active October 28, 2021 10:43
PhalconPhp with PHP7 Installation on Ubuntu 16.04
#!/bin/bash
# PhalconPhp with PHP7 installation on ubuntu:16.04
sudo apt-get update
sudo apt-get install -y php7.0-fpm \
php7.0-cli \
php7.0-curl \
php7.0-gd \
@Haldir65
Haldir65 / 状态栏.txt
Created June 8, 2016 05:44
针对小米和魅族手机的状态栏修改实现
/**
* Created by 赵晨璞
*/
public class StatusBarUtil {
/**
* 修改状态栏为全透明
* @param activity
*/
@TargetApi(19)
package com.swordbearer.network.volley;
import android.text.TextUtils;
import com.android.volley.NetworkResponse;
import com.android.volley.ParseError;
import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.HttpHeaderParser;