Skip to content

Instantly share code, notes, and snippets.

@seongchan
seongchan / WebPageLoadActivity.java
Last active July 30, 2020 01:06
WebView 에서 임의 페이지가 계속 로딩되는 현상 피하기.
package com.clipandbooks.test.myapplication;
import android.app.Activity;
import android.content.Intent;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.webkit.WebResourceError;
@seongchan
seongchan / sample_layout.xml
Created September 19, 2016 08:26
Android ImageView Brightness using xml file
<!--
See android:tint and android:tintMode
-->
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/sample_img"
android:tint="#CCCCCC"
android:tintMode="add"/>
@seongchan
seongchan / EditTextPhoneNumberActivity.java
Last active September 30, 2022 23:08
(Android) EditText for Phone number style (XXX-XXXX-XXXX)
// impport, package name skipped...
public class EditTextPhoneNumberActivity extends Activity implements View.OnClickListener{
private EditText mPhoneNumber;
private TextView mOutputNumber;
private TextView mOutputNumber_refined;
private Button mBtn;
@seongchan
seongchan / ExecuteAppOrGoStore.html
Last active June 20, 2019 11:13
Execute App at Mobile WebPage
<!--
2015.10.29
Hong SeongChan (seongchan116@gmail.com)
-------------------------------------------
모바일 웹 페이에서 개발하고 있는 앱이 실행이 안되길래 샘플코드를 작성해 봄.
이 소스의 전제 조건은 uri scheme 방식이 적용된 앱을 기준으로 한다.
Android 앱의 경우 intent를 이용한 방식을 주로 사용했겠지만, 모바일 웹을 고려한다면 uri scheme을 적용하는게 유리하다.
(웹쪽 코드가 단순해 진다.)
아래 코드는 이러한 전제로 작성되었다.
-->