본문 바로가기
[android] PDF file 읽는 방법 [android] PDF file 읽는 방법 https://commonsware.com/blog/2017/01/04/options-viewing-pdfs.html -ACTION_VIEW action Intent 를 통해 third-party app 으로 권한을 양도 -PdfRenderer 를 써서 직접 구현.https://developer.android.com/reference/android/graphics/pdf/PdfRenderer.html API Level 21 부터 사용할 수 있으나, Bitmap 으로 render 를 시키고, 사용하기가 어렵다.표준을 따른 일부 PDF 들만 rendering 가능하다는 약점이 있다. -pdf.jshttps://mozilla.github.io/pdf.js/ Mozi.. 2018. 3. 16.
[android] Linkify 를 이용하여 TextView 에 link 주기 android, Linkify 를 이용하여 TextView 에 link 주기 HashTag 예제 // Hash Tag 패턴Pattern tagMatcher = Pattern.compile("[#]+[A-Za-z0-9-_]+\\b"); // TextView 의 Link 를 눌렀을 때 연결할 uri 혹은 url base 주소String uri = "content://com.cklee.hashtags/"; // textview 에서 tagMatcher 에 matching 되는 녀석을 link 로 만들고, // 이녀석을 클릭하면 ACTION_VIEW 를 호출하면서 MIME type 을 uri + tag 로 생성된 scheme 으로부터 받아온다.Linkify.addLinks(textView, tagMatcher,.. 2014. 2. 20.
[android] Map intent. 참조 : 안드로이드 디벨로퍼 사이트 // with zoom level String geoInfo = "geo:" + latitude + "," + longitude + "?z=" + zoomLevel; or // with pin String geoInfo = "geo:0,0?q=" + latitude + "," + longitude + "(" + name + ")"; Intent intent = new Intent( Intent.ACTION_VIEW, Uri.parse( geoInfo ) ); startActivity(intent); 도움이 되셨다면 손가락 꾸욱~ ( 로그인 필요 x ) 2012. 12. 27.
반응형