Good article
http://www.androiddesignpatterns.com/2013/04/retaining-objects-across-config-changes.html
http://www.vogella.com/tutorials/AndroidBackgroundProcessing/article.html#concurrency_asynchtask_parallel
Source http://www.careerride.com/Spring-bean-lifecycle-in-spring-framework.aspx Question/response JAVA Spring What is Spring? Spring is a framework that resolves common problems in JEE architecture. (JDBC ,integration later, presentation layer …) Spring is managing business objects and encouraging practices POJO model (vs programming model) It’s highly recommended to use a architectural tiers (presentation,business,dao Layer) ; the inejection of the different beans
Le Grand collisionneur de hadrons (LHC) est un gigantesque instrument scientifique situé près de Genève, à cheval sur la frontière franco-suisse, à environ 100 mètres sous terre. C’est un accélérateur de particules, avec lequel les physiciens étudient les plus petites particules connues : les composants fondamentaux de la matière. Le LHC va révolutionner notre compréhension du monde,
Rendre un Jar executable en Spring Nous allons voir dans cet article comment packager un executable jar avec Maven 2 . Ayant rencontrer quelque problème dans le chargement des Beans Spring . Pour cela il faut inclure dans le packaging du jar les fichiers spring.handlers et spring.schemas. Nous utiliserons ici le plugin shade plutot
Samba permet de partager des dossiers sous Linux avec des ordinateurs locaux sous Windows, très pratique, donc ! De plus, il permet d’établir un réseau relativement sécurisé grâce à ses nombreuses fonctions. Commencez d’abord par l’installer : loguez vous en root puis tapez : apt-get install samba Il faut ensuite configurer quelques lignes du fichier
fév
20
Posted by : 20 février 2014
| On :Good article
http://www.androiddesignpatterns.com/2013/04/retaining-objects-across-config-changes.html
http://www.vogella.com/tutorials/AndroidBackgroundProcessing/article.html#concurrency_asynchtask_parallel
jan
18
Posted by : 18 janvier 2014
| On :
http://android-developers.blogspot.in/2009/03/android-layout-tricks-3-optimize-with.html
http://www.androidhive.info/2013/11/android-working-with-action-bar/
nov
24
Posted by : 24 novembre 2013
| On :Rom name : TIGRA XXUEMJ5]TigraRom_V4 <<<<Updated 19/11>>>>
It’s an amazing ROM , the only thnig that did’nt work is the wifi , but there is a fix (follow the second link bellow ).
The air gesture didn’t work also , but air view is working perfetcly:)
Bellow the two article I’ve found the first one is the Rom desciption and some screenshot
the second link is how to apply the fix on Odin .
It’s very simple , the only thing you need to do is to press the button AP and select the correct patch.tar.md5 and apply 2 times .
Then just reboot your phone and everything work on !
Thanks for the developper team for all the workon this ROM .
http://forum.xda-developers.com/showthread.php?t=2479698
http://www.theandroidsoul.com/root-galaxy-note-2-on-android-4-3-firmware-and-removes-knox-too/
video youtube :
http://www.youtube.com/watch?feature=player_embedded&v=3i5Hgp4IYTQ
Other ROM
All tested rom : http://www.android.gs/update/samsung-galaxy-note-2-n7100/
http://www.ibtimes.co.uk/articles/522695/20131116/galaxynote2-n7100-android44-kitkat-paranoid-android-rom.htm
http://www.theandroidsoul.com/update-samsung-galaxy-note-2-n7100-android-4-4-kitkat-cm11-aosp-rom/
juil
26
Posted by : 26 juillet 2013
| On :source : http://dottech.org/105407/how-to-root-lg-optimus-3d-p920-on-ice-cream-sandwich-or-gingerbread-guide/
Disclaimer: This guide is intended as a helpful “how to”. dotTech and its writers are not responsible for any gain or loss (including but not limited to bricked devices) incurred as a result of following this guide. Root your device at your own risk. Rooting may void your warranty.
This root guide is for LG Optimus 3D running either Android 2.2 Froyo, Android 2.3 Gingerbread or Android 4.04 Ice Cream Sandwich. It is specifically for the P920.
Enjoy a rooted LG Optimus 3D P920.
jan
10
Posted by : 10 janvier 2012
| On :Rss Reader
Bellow a Simple code about how to make a simple Rss Reader handle by SAX handler.
package mapping.rss; public class Item { private String title ; private String description; private String link; private String pubDate; private String source; private String mediaContent; private String mediaText; /** * @return the title */ public String getTitle() { return title; } /** * @param title the title to set */ public void setTitle(String title) { this.title = title; } /** * @return the description */ public String getDescription() { return description; } /** * @param description the description to set */ public void setDescription(String description) { this.description = description; } /** * @return the link */ public String getLink() { return link; } /** * @param link the link to set */ public void setLink(String link) { this.link = link; } /** * @return the pubDate */ public String getPubDate() { return pubDate; } /** * @param pubDate the pubDate to set */ public void setPubDate(String pubDate) { this.pubDate = pubDate; } /** * @return the source */ public String getSource() { return source; } /** * @param source the source to set */ public void setSource(String source) { this.source = source; } /** * @return the mediaContent */ public String getMediaContent() { return mediaContent; } /** * @param mediaContent the mediaContent to set */ public void setMediaContent(String mediaContent) { this.mediaContent = mediaContent; } /** * @return the mediaText */ public String getMediaText() { return mediaText; } /** * @param mediaText the mediaText to set */ public void setMediaText(String mediaText) { this.mediaText = mediaText; } /* (non-Javadoc) * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("Item [title="); builder.append(title); builder.append(", description="); builder.append(description); builder.append(", link="); builder.append(link); builder.append(", pubDate="); builder.append(pubDate); builder.append(", source="); builder.append(source); builder.append(", mediaContent="); builder.append(mediaContent); builder.append(", mediaText="); builder.append(mediaText); builder.append("]"); return builder.toString(); } } package xml; import java.util.ArrayList; import java.util.List; import mapping.rss.Item; import org.xml.sax.Attributes; import org.xml.sax.SAXException; import org.xml.sax.helpers.DefaultHandler; public class SearchItemRssHandler extends DefaultHandler { private final static String CHANNEL="channel"; private final static String ITEM="item"; private final static String TITLE="title"; private final static String LINK="link"; private final static String DESCRIPTION="description"; private final static String SOURCE="source"; private final static String PUBDATE="PUBDATE"; private boolean bfChannel = false; private boolean bfItem = false; private boolean bfTitle = false; private boolean bflink = false ; private boolean bfDescription = false ; private boolean bfSource = false ; private boolean bfPubdate = false; private Item item ; private List<Item> items ; public void startElement(String uri, String localName,String qName, Attributes attributes) throws SAXException { if(qName.equalsIgnoreCase(CHANNEL)){ items = new ArrayList<Item>(); bfChannel = true; } if(qName.equalsIgnoreCase(ITEM)){ item = new Item(); bfItem = true ; } if(qName.equalsIgnoreCase(TITLE)){ bfTitle = true ; } if(qName.equalsIgnoreCase(LINK)){ bflink = true ; } if(qName.equalsIgnoreCase(PUBDATE)){ bfPubdate = true ; } if(qName.equalsIgnoreCase(SOURCE)){ bfSource = true ; } if(qName.equalsIgnoreCase(DESCRIPTION)){ bfDescription = true ; } } public void endElement(String uri, String localName, String qName) throws SAXException { if(qName.equalsIgnoreCase(ITEM)){ items.add(item); bfItem = false; } if(qName.equalsIgnoreCase(CHANNEL)){ setItems(items); bfChannel = false ; } } public void characters(char ch[], int start, int length) throws SAXException { String resu= new String(ch, start, length); if(bfItem){ bfItem = false; } if(bfDescription){ if(item!=null) item.setDescription(resu); bfDescription = false; } if(bfTitle){ if(item!=null) item.setTitle(resu); bfTitle = false; } if(bflink){ if(item!=null) item.setLink(resu); bflink = false ; } if(bfPubdate){ if(item!=null) item.setPubDate(resu); bfPubdate = false; } if(bfSource){ if(item!=null) item.setSource(resu); } } /** * @return the items */ public List<Item> getItems() { return items; } /** * @param items the items to set */ public void setItems(List<Item> items) { this.items = items; } } ///TEST Main package xml.test; import java.io.File; import java.io.FileInputStream; import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; import java.util.List; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import mapping.rss.Item; import org.xml.sax.InputSource; import xml.SearchItemRssHandler; public class ReadRssXmlFile { public static void main(String argv[]) { try { SAXParserFactory factory = SAXParserFactory.newInstance(); SAXParser saxParser = factory.newSAXParser(); File file = new File("C:\\workspace\src\\rss-test-fr.xml"); InputStream inputStream= new FileInputStream(file); Reader reader = new InputStreamReader(inputStream,"UTF-8"); InputSource is = new InputSource(reader); is.setEncoding("UTF-8"); SearchItemRssHandler handler = new SearchItemRssHandler(); saxParser.parse(is, handler); List<Item> items = handler.getItems(); for (Item item : items) { System.out.println(item); } } catch (Exception e) { e.printStackTrace(); } } }
jan
09
Posted by : 9 janvier 2012
| On :Android developper doc :
http://developer.android.com/reference/android/widget/AutoCompleteTextView.html
Simple example :
http://www.botskool.com/geeks/how-create-auto-complete-textbox-android
Cook Book
http://androidcookbook.com/ViewTOC.seam
Run autocomplete android
http://stackoverflow.com/questions/7596508/autocomplete-data-retrived-via-http-request-not-hardcded-when-user-type-in-tex
with filter interface
http://stackoverflow.com/questions/8653260/autocomplete-in-android-not-working-with-dynamic-data
http://www.vingtseptpointsept.fr/2011/08/20/bricolons-un-peu-avec-idref/
1) Create below class in your activity
private class CostomTextWatcher implements TextWatcher { @Override public void afterTextChanged(Editable s) { } @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { } @Override public void onTextChanged(CharSequence s, int start, int before, int count) { if(s.length() > 0) { //Make HTTP connection and retrives autocomplete strings from webservice } } }
2) set this above class to edittext using below way
etSearch.addTextChangedListener(new CostomTextWatcher());
You have to make http connection using Background Thread best is AsyncTask
Edit Text recherche dynamique
http://code.google.com/p/android-threshold-edittext/
Autre exemple
http://code.google.com/p/androidsearchexample/downloads/list
Search Suggestion On android
Exemple synthétique :
http://matthias.jimdo.com/blog/
Exemple pratique complet:
http://weblog.plexobject.com/?p=1689
explication globale
http://developer.android.com/guide/topics/search/search-dialog.html
Exemple de recherche Edit Text dynamique
package com.MobileAnarchy.Android.ThresholdEditText;
import android.app.Activity;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.widget.TextView;
public class ThresholdEditTextActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
final TextView standardInput = (TextView)findViewById(R.id.TextViewStandardTextChange);
final TextView threasholdInput = (TextView)findViewById(R.id.TextViewThreasholdTextChange);
// Get the EditText reference
ThresholdEditText editText = (ThresholdEditText)findViewById(R.id.EditTextInput);
// Subscribe to the standard TextChanged events
editText.addTextChangedListener(new TextWatcher() {
@Override
public void afterTextChanged(Editable arg0) {
}
@Override
public void beforeTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) {
}
@Override
public void onTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) {
standardInput.setText(arg0);
}
});
// You can manually set the threshold value (default is 500ms)
editText.setThreshold(1000);
// Subscribe to the OnTresholdTextChanged event
editText.setOnThresholdTextChanged(new ThresholdTextChanged() {
@Override
public void onThersholdTextChanged(Editable text) {
Log.d(« Test », « Threshold text changed event was called – » + text.toString());
threasholdInput.setText(text);
}
});
}
}
package com.MobileAnarchy.Android.ThresholdEditText;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.os.Handler;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.AttributeSet;
import android.widget.EditText;
public class ThresholdEditText extends EditText {
// =========================================
// Private members
// =========================================
private int threshold;
private ThresholdTextChanged thresholdTextChanged;
private Handler handler;
private Runnable invoker;
private boolean disableThresholdOnEmptyInput;
// =========================================
// Constructors
// =========================================
public ThresholdEditText(Context context) {
super(context);
initAttributes(null);
init();
}
public ThresholdEditText (Context context, AttributeSet attrs) {
super(context, attrs);
initAttributes(attrs);
init();
}
// =========================================
// Public properties
// =========================================
/**
* Get the current threshold value
*/
public int getThreshold() {
return threshold;
}
/**
* Set the threshold value (in milliseconds)
* @param threshold Threshold value
*/
public void setThreshold(int threshold) {
this.threshold = threshold;
}
/**
* @return True = the callback will fire immediately when the content of the EditText is emptied
* False = The threshold will be used even on empty input
*/
public boolean isDisableThresholdOnEmptyInput() {
return disableThresholdOnEmptyInput;
}
/**
* @param disableThresholdOnEmptyInput Set to true if you want the callback to fire immediately when the content of the EditText is emptied
*/
public void setDisableThresholdOnEmptyInput(boolean disableThresholdOnEmptyInput) {
this.disableThresholdOnEmptyInput = disableThresholdOnEmptyInput;
}
/**
* Set the callback to the OnThresholdTextChanged event
* @param listener
*/
public void setOnThresholdTextChanged(ThresholdTextChanged listener) {
this.thresholdTextChanged = listener;
}
// =========================================
// Private / Protected methods
// =========================================
/**
* Load properties values from xml layout
*/
private void initAttributes(AttributeSet attrs) {
if (attrs != null) {
String namespace= »http://schemas.android.com/apk/res/com.MobileAnarchy.ThresholdEditText »;
// Load values to local members
this.threshold = attrs.getAttributeIntValue(namespace, « threshold », 500);;
this.disableThresholdOnEmptyInput = attrs.getAttributeBooleanValue(namespace, « disableThresholdOnEmptyInput », true);;
}
else {
// Default threshold value is 0.5 seconds
threshold = 500;
// Default behaviour on emptied text – no threshold
disableThresholdOnEmptyInput = true;
}
}
/**
* Initialize the private members with default values
*/
private void init() {
handler = new Handler();
invoker = new Runnable() {
@Override
public void run() {
invokeCallback();
}
};
this.addTextChangedListener(new TextWatcher() {
@Override
public void afterTextChanged(Editable s) { }
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) { }
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
// Remove any existing pending callbacks
handler.removeCallbacks(invoker);
if (s.length() == 0 && disableThresholdOnEmptyInput)
{
// The text is empty, so invoke the callback immediately
invoker.run();
}
else {
// Post a new delayed callback
handler.postDelayed(invoker, threshold);
}
}
});
}
/**
* Invoking the callback on the listener provided (if provided)
*/
private void invokeCallback() {
if (thresholdTextChanged != null) {
thresholdTextChanged.onThersholdTextChanged(this.getText());
}
}
}
package com.MobileAnarchy.Android.ThresholdEditText;
import android.text.Editable;
public interface ThresholdTextChanged {
void onThersholdTextChanged(Editable text);
}