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
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.util.LinkedList; | |
import java.util.List; | |
import java.util.zip.GZIPInputStream; |
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
Added support for custom views with custom attributes in libraries. Layouts using custom attributes must use the namespace URI http://schemas.android.com/apk/res-auto instead of the URI that includes the app package name. This URI is replaced with the app specific one at build time. |
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
http://netpenthe.wordpress.com/2011/11/20/android-listviews-not-clickable/ | |
Apparently ListViews lose their clickability if they contain focusable child elements in their layout. | |
I initially set all the child elements to not be focusable. | |
But now do this in the getView() method instead: | |
((ViewGroup) convertedView).setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS); |
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.example.popup_test; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.os.Bundle; | |
import android.text.Editable; | |
import android.text.TextWatcher; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.view.ViewStub; |
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
function [ out ] = berlekamp_massey( ) | |
z=[ 0 0 0 0 1 1 1 1 1 0 1 0 1 0 0 1 1 0 0 0 1 0 0 0 0 1 1 1 1 1]; | |
n = length(z); | |
c = zeros(1,n); | |
b= zeros(1,n); | |
c(1) = 1; | |
b(1) = 1; | |
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 | |
public void onDestroyView() { | |
super.onDestroyView(); | |
getFragmentManager() | |
.beginTransaction() | |
.detach(mFilter) | |
.commit(); | |
} | |
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 void setLocale(String lang) { | |
myLocale = new Locale(lang); | |
Resources res = getResources(); | |
DisplayMetrics dm = res.getDisplayMetrics(); | |
Configuration conf = res.getConfiguration(); | |
conf.locale = myLocale; | |
res.updateConfiguration(conf, dm); | |
Intent refresh = new Intent(this, AndroidLocalize.class); |
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
Intent.createChooser(it, "Choose Email Client") |
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
/** | |
* User: korniltsev | |
* Date: 22.03.13 | |
* Time: 14:51 | |
*/ | |
public class ConfirmDialogFactory { | |
public static void build(Context c) | |
{ | |
final Dialog dialog = new Dialog(c,R.style.CustomStyle); |
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
/** | |
* User: korniltsev | |
* Date: 22.03.13 | |
* Time: 14:51 | |
*/ | |
public class ConfirmDialogFactory { | |
public static Dialog build(Activity a) | |
{ | |
final Dialog dialog = new Dialog(a,R.style.CustomStyle); |
OlderNewer