Skip to content

Instantly share code, notes, and snippets.

水平垂直居中是前端的痛,也是前端__永恒__话题,这次记录两个用display:flex实现的方法:

第一种:

###html###

<div class="flex">
  <p>content content</p>
@tankcong
tankcong / ServerDate.java
Last active March 17, 2017 07:32
Android application time synchronization, using android.os.SystemClock
import android.os.SystemClock;
import java.util.Date;
/**
* Created by tankcong
*/
public class ServerDate {
private Date serverDate;
@tankcong
tankcong / FragmentTabHost
Created December 30, 2016 09:12
FragmentTabHost supporting reset existing tab.
import android.content.Context;
import android.content.res.TypedArray;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;