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 initWebView(final String linkURL) { | |
pDialog.show(); | |
mWebView = (WebView) findViewById(R.id.content_webview); | |
mWebView.getSettings().setJavaScriptEnabled(true); | |
mWebView.loadUrl(linkURL); | |
mWebView.setWebChromeClient(new WebChromeClient() { | |
public boolean onShowFileChooser( | |
WebView webView, ValueCallback<Uri[]> filePathCallback, | |
WebChromeClient.FileChooserParams fileChooserParams) { |
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
// java file : | |
if (email.isEmpty() || !android.util.Patterns.EMAIL_ADDRESS.matcher(email).matches()) { | |
_emailText.setError("enter a valid email address"); | |
valid = false; | |
} | |
// xmlnya : | |
<!-- Email Label --> | |
<android.support.design.widget.TextInputLayout |
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
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="fill_parent" | |
android:layout_height="match_parent" | |
android:paddingLeft="@dimen/activity_horizontal_margin" | |
android:paddingRight="@dimen/activity_horizontal_margin" | |
android:paddingTop="@dimen/activity_vertical_margin" | |
android:background="@drawable/cover" | |
android:orientation="vertica"> <--! dibuat vertical, ini root layout --> |
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 orderCart(final String idCustomer, final String cartId, final String addressInvoice, final String addressDelivery, final String carrierId, final String paymentMethod) { | |
progressDialog.show(); | |
String urlOrderCart = StaticRegisterClass.urlOrder; | |
StringRequest postReq = new StringRequest(Request.Method.POST, | |
urlOrderCart, | |
createMyReqSuccessListenerOrder(), | |
createMyReqErrorListener()) { | |
protected Map<String, String> getParams() throws com.android.volley.AuthFailureError { | |
Map<String, String> params = new HashMap<String, String>(); |
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
[ | |
{ | |
"class_name" : "XI IPA 1", | |
"class_subject" : "Biologi" | |
}, | |
{ | |
"class_name" : "9 C", | |
"class_subject" : "Matematika" | |
} | |
] |
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 RelativeLayout drawInsideEditor; | |
@Bind(R.id.dp_main_layout) | |
RelativeLayout mainLayout; | |
// oncreate | |
drawInsideEditor = (RelativeLayout) View.inflate(this, R.layout.dp_text_editor_layout, null); | |
mainLayout.addView(drawInsideEditor); | |
RelativeLayout drawText = (RelativeLayout) View.inflate(this, R.layout.dp_item_textview_preview, null); |
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 MyApp extends Application { | |
@Override | |
public void onCreate() { | |
TypefaceUtil.overrideFont(getApplicationContext(), "SERIF", "fonts/Roboto-Regular.ttf"); // font from assets: "assets/fonts/Roboto-Regular.ttf | |
} | |
} |
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 unzip extends Activity { | |
/** Called when the activity is first created. */ | |
static final int BUFFER = 2048; | |
TextView textView; | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
textView = new TextView(this); |
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 dummy.protophonto.utilAndHelper; | |
/** | |
* Created on : January 20, 2016 | |
* Author : mnafian | |
* Name : M. Nafian | |
* Email : [email protected] | |
* GitHub : https://github.com/mnafian | |
* LinkedIn : https://id.linkedin.com/in/mnafian | |
* Company : Inagata Technosmith |
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 dummy.protophonto.utilAndHelper; | |
/** | |
* Created on : January 20, 2016 | |
* Author : mnafian | |
* Name : M. Nafian | |
* Email : [email protected] | |
* GitHub : https://github.com/mnafian | |
* LinkedIn : https://id.linkedin.com/in/mnafian | |
* Company : Inagata Technosmith |
OlderNewer