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 onStop() { | |
super.onStop(); | |
//params listAdapter, name of ExpandableListAdapter | |
for (int i =0;i<listAdapter.getGroupCount();i++){ | |
//params expListView, name of ExpandableListView | |
expListView.collapseGroup(i); | |
} | |
} |
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
cd android-sdks/platform-tools/ | |
./adb connect [ip android device] | |
./adb devices |
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
<android.support.design.widget.TextInputLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content"> | |
<EditText | |
android:id="@+id/etThink" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:hint="what do you think?" | |
/> |
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 getDataRequest() { | |
String url= ""; | |
RequestQueue queue = Volley.newRequestQueue(getActivity()); | |
StringRequest postRequest = new StringRequest(Request.Method.GET, url, | |
new Response.Listener<String>() | |
{ | |
@Override | |
public void onResponse(String response) { | |
progress.dismiss(); | |
Log.d("response", response); |
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
Timer timer = new Timer(); | |
@Override | |
public void onCreate() | |
{ | |
timer.scheduleAtFixedRate(new TimerTask() { | |
@Override | |
public void run() { | |
CallMethod(); | |
} |
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 fungsi; | |
public class Fungsi { | |
public static void main(String[] args){ | |
double a=50.51; | |
int b= -234; | |
String aca=" contoh String"; | |
String tes="uji.coba"; | |
System.out.println("double a=50.51;"); |
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
//on first activity | |
Intent intent = new Intent(First.this,Second.class); | |
intent.putExtra("string_id",str_id); | |
startActivity(intent); | |
//on second activity | |
Bundle bundle = getIntent().getExtras(); | |
if (bundle!=null){ | |
str_nama = bundle.getString("string_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
GlideUrl glideUrl = new GlideUrl(url, new LazyHeaders.Builder() | |
.addHeader("key","value").build()); | |
Glide.with(getApplicationContext()) | |
.load(glideUrl) | |
.into(imageView); |
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 com.afollestad.materialdialogs.MaterialDialog.Builder; | |
new MaterialDialog.Builder(this) | |
.content("Enter your name") | |
.inputRange(5,20) | |
.cancelable(false) | |
.inputType(InputType.TYPE_TEXT_FLAG_CAP_WORDS) | |
.input("your name", null, new MaterialDialog.InputCallback() { | |
@Override | |
public void onInput(MaterialDialog dialog, CharSequence input) { |
OlderNewer