This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.taxiqq.driver.network; | |
import android.content.Context; | |
import android.content.SharedPreferences; | |
import java.io.IOException; | |
import okhttp3.Credentials; | |
import okhttp3.Interceptor; | |
import okhttp3.Request; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_welcome); | |
/*handling full screen to normal screen mode*/ | |
WindowManager.LayoutParams attributes = getWindow().getAttributes(); | |
attributes.flags |= WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN; | |
getWindow().setAttributes(attributes); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void scaleAndAnimateToTop() { | |
ScaleAnimation animation = new ScaleAnimation(5.0f, 1.0f, 5.0f, 1.0f, | |
Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); | |
animation.setDuration(1000); | |
mView.startAnimation(animation); | |
} | |
private void animateInArc() { | |
Path path = new Path(); | |
path.arcTo(0f, 0f, 500f, 500f, 90f, 270f, true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private CallbackManager callbackManager; | |
private LoginManager loginManager; | |
private ProgressDialog mProgressDialog; | |
public FragmentLogin() { | |
} | |
@Nullable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FileUtils{ | |
public static String readableFileSize(long size) { | |
if(size <= 0) return "0"; | |
final String[] units = new String[] { "B", "kB", "MB", "GB", "TB" }; | |
int digitGroups = (int) (Math.log10(size)/Math.log10(1024)); | |
return new DecimalFormat("#,##0.#").format(size/Math.pow(1024, digitGroups)) + " " + units[digitGroups]; | |
} | |
} |