Skip to content

Instantly share code, notes, and snippets.

View Antarix's full-sized avatar

Antarix Antarix

View GitHub Profile
@Antarix
Antarix / AnimatedActivity.java
Last active November 24, 2016 09:13 — forked from kwent/AnimatedActivity.java
Activity transition animations like the Vine Android application. - See more at: http://blog.quent.in/index.php/2013/06/activity-transition-animations-like-the-vine-android-application/
public class AnimatedActivity extends Activity
{
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
//opening transition animations
overridePendingTransition(R.anim.activity_open_translate,R.anim.activity_close_scale);
}
@Antarix
Antarix / card_friend.xml
Last active November 24, 2016 09:12 — forked from fpopic/card_friend.xml
material list avatar two textviews and icon
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView
android:id="@+id/card_view_friend"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
card_view:cardCornerRadius="4dp"
card_view:cardUseCompatPadding="true">
@Antarix
Antarix / CardView.h
Last active January 7, 2020 12:11
Simple CardView for iOS Objective-C
#import <UIKit/UIKit.h>
@interface CardView : UIView
@end
@Antarix
Antarix / Polymertext.html
Created June 23, 2015 05:18
Ploymer designer demo
//demo
/*
* Copyright (C) 2015 Jared Rummler <jared.rummler@gmail.com>
*
* 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
@Antarix
Antarix / AES.c
Last active August 29, 2015 14:17 — forked from bricef/AES.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
* MCrypt API available online:
* http://linux.die.net/man/3/mcrypt
*/
#include <mcrypt.h>
/**
* Show the activity over the lockscreen and wake up the device. If you launched the app manually
* both of these conditions are already true. If you deployed from the IDE, however, this will
* save you from hundreds of power button presses and pattern swiping per day!
*/
public static void riseAndShine(Activity activity) {
activity.getWindow().addFlags(FLAG_SHOW_WHEN_LOCKED);
PowerManager power = (PowerManager) activity.getSystemService(POWER_SERVICE);
PowerManager.WakeLock lock =
@Antarix
Antarix / AudioFileFilter.java
Created January 23, 2015 05:35
AudioFileFilter for android (For folder wise music)
import java.io.File;
import java.io.FileFilter;
import java.io.FilenameFilter;
import java.util.ArrayList;
import com.designfuture.framework.util.LogHelper;
public class AudioFileFilter implements FileFilter {
protected static final String TAG = "AudioFileFilter";
// just add these few lines of code to your app delegate .m file right before the @implementation part
@implementation NSURLRequest (DSInvalidSSL)
+ (BOOL)allowsAnyHTTPSCertificateForHost:(NSString *)host {
return YES;
}
@end
@Antarix
Antarix / UnzipUtility.java
Created October 17, 2014 09:50
Unzip utility for Android
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
/**
* This utility extracts files and directories of a standard zip file to