Skip to content

Instantly share code, notes, and snippets.

package com.example.abbas.testssd;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import java.util.ArrayList;
import java.util.List;
signingConfigs {
config {
storeFile file("${keystore_path}")
//edamash paeene file hast
def props = new Properties()
props.load(new FileInputStream("${keystore_config_path}"))
android.signingConfigs.config.storePassword props.keyStorePassword
android.signingConfigs.config.keyAlias props.keyAlias
android.signingConfigs.config.keyPassword props.keyAliasPassword
}
@abbas-oveissi
abbas-oveissi / UrlConnectionRequest.java
Created June 27, 2016 14:30
simple request example
package com.company;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
@abbas-oveissi
abbas-oveissi / DiskLruCache.java
Last active February 1, 2017 14:33
requestcacher
package ir.oveissi.lrucachetest;
/*
* Copyright (C) 2011 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
public class MyToolbar {
public static final int HAMBURGER_TOOLBAR=1;
public static final int BACK_TOOLBAR=2;
private final Context mcontext;
private int type;
private int toolbar_view_id;
private int toolbar_layout;
public enum Relationship
{
FOLLOWING,
FOLLOWER,
FRIEND
}
public static class User
{
public enum Relationship
{
FOLLOWING,
FOLLOWER,
FRIEND
}
public static class User
{
public String name;
{
"code" : 1024,
"message" : "Validation Failed",
"errors" : [
{
"code" : 5432,
"field" : "first_name",
"message" : "First name cannot have fancy characters"
},
{
"code" : 1234,
"message" : "Something bad happened :(",
}
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ir.oveissi</groupId>
<artifactId>dagger</artifactId>
<version>1.0-SNAPSHOT</version>