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 setCurrency(final EditText edt) { | |
edt.addTextChangedListener(new TextWatcher() { | |
private String current = ""; | |
@Override | |
public void onTextChanged(CharSequence s, int start, int before, | |
int count) { | |
} |
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 sendEmail(String string1){ | |
Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); | |
emailIntent.setType("application/image"); | |
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{string1}); | |
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,"Test Subject"); | |
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "From My App"); | |
emailIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file:///mnt/sdcard/Myimage.jpeg")); | |
startActivity(Intent.createChooser(emailIntent, "Send mail...")); |
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 Laxio { | |
public static ArrayList<String> arrayPermutasi; | |
public static void main(String[] args) { | |
arrayPermutasi = new ArrayList<String>(); | |
String Str = "1234"; | |
permutasiString(Str); |
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 CategoryDezerializer implements JsonDeserializer<ListCategory> { | |
@Override | |
public ListCategory deserialize(final JsonElement json, final Type typeOfT, final JsonDeserializationContext context) | |
throws JsonParseException { | |
final JsonObject jsonObject = json.getAsJsonObject(); | |
final JsonElement jsonID = jsonObject.get("ID"); |
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 static void setListViewHeightBasedOnChildren(ListView listView) { | |
ListAdapter listAdapter = listView.getAdapter(); | |
if (listAdapter == null) { | |
// pre-condition | |
return; | |
} | |
int totalHeight = 0; | |
for (int i = 0; i < listAdapter.getCount(); i++) { | |
View listItem = listAdapter.getView(i, null, listView); |
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
//Customizing Tab indicator | |
PagerTabStrip pagerTabStrip = (PagerTabStrip) findViewById(R.id.pager_header); | |
pagerTabStrip.setDrawFullUnderline(true); | |
pagerTabStrip.setTabIndicatorColor(getResources().getColor(R.color.icons)); | |
for (int i = 0; i < pagerTabStrip.getChildCount(); ++i) { | |
View nextChild = pagerTabStrip.getChildAt(i); | |
if (nextChild instanceof TextView) { | |
TextView tv = (TextView) nextChild; | |
tv.setTextColor(getResources().getColor(R.color.icons)); |
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
Upload Project on github | |
- Git config --global user.name "username anda" | |
- Git config --global user.email [email protected] | |
- Git init | |
- Git add * | |
- Git commit –m "versi 1.0.0" | |
- Git pull origin master | |
- Git push origin master |
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 id.ocit.aksimum.extendview; | |
import android.content.Context; | |
import android.graphics.Bitmap; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Paint; | |
import android.graphics.PorterDuff; | |
import android.graphics.PorterDuffXfermode; | |
import android.graphics.Rect; |
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
dependencies { | |
compile 'com.github.traex.rippleeffect:library:1.3' | |
} | |
<com.andexert.library.RippleView | |
android:id="@+id/rect" | |
rv_centered="true" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content"/> | |
h.rippleView = (RippleView) view.findViewById(R.id.rect); |
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
String str = "http://1.bp.blogspot.com/-huU2LE_jd64/VcWhPWiVlgI/AAAAAAAB3TY/rhEjlFqT3k4/s1600/01.jpg, http://4.bp.blogspot.com/-NQ69kOrdDR4/VcWhP_OnyRI/AAAAAAAB3Tg/qVK_gWB2Xtk/s1600/02.jpg, http://4.bp.blogspot.com/-N-YBUev9L4Q/VcWhP4eT7iI/AAAAAAAB3Tc/FURv3WXZ0gI/s1600/03.jpg, http://3.bp.blogspot.com/-sD0voY50m3o/VcWhQ2pSZnI/AAAAAAAB3Tw/k9Hy3J_EvdU/s1600/04.jpg, http://4.bp.blogspot.com/-oe8ggexHGUk/VcWhRjWZw_I/AAAAAAAB3T0/PoN9-UfaeCc/s1600/05.jpg,http://4.bp.blogspot.com/-ICqCe72dxNc/VcWhRhZTyDI/AAAAAAAB3T4"; | |
ArrayList aList= new ArrayList(Arrays.asList(str.split(","))); | |
for(int i=0;i<aList.size();i++) | |
{ | |
System.out.println(String.valueOf(i)+aList.get(i)); | |
} |