Skip to content

Instantly share code, notes, and snippets.

View thaiall's full-sized avatar

burin rujjanapan thaiall

View GitHub Profile
@thaiall
thaiall / MainActivity.java
Created August 7, 2017 10:40
Android Studio : แสดงการใช้ ImageGetter กับ HTML Tag ที่อยู่ภายใน MainActivity.java เอง
package com.thaiall.www.myapplication;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.Html;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.content.res.Resources;
import android.widget.TextView;
@thaiall
thaiall / layout_main.xml
Created August 6, 2017 12:51
Android Studio : imageintextview
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView android:layout_width="wrap_content" android:layout_height="wrap_content">
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
@thaiall
thaiall / strings.xml
Created August 6, 2017 12:48
Android Studio : imageintextview
<resources>
<string name="app_name">imageintextview</string>
<string name="action_settings">Settings</string>
<string name="data1">data1 : ok imglp01 imglp02 imglp03</string>
<string name="data2">data2 : error <img src='lp01' /> <img src="lp02" /></string>
<string name="myArticle">
&lt;h1&gt;ไอทีในชีวิตประจำวัน #611 เมื่อเพื่อนขอใช้โทรศัพท์เข้าสื่อสังคม&lt;/h1&gt;
&lt;br/&gt;&lt;a href=http://www.thaiall.com&gt;www.thaiall.com&lt;/a&gt; not open in browser, just text
&lt;p align=justify&gt;imglp01 &lt;font color=blue&gt;อาจมีสักครั้งที่เพื่อนสนิท หัวหน้า กิ๊ก หรือแฟนขอยืมสมาร์ทโฟนของเราเข้าสื่อสังคม&lt;/fontns&gt; ในกรณีที่โทรศัพท์ของผู้ที่เข้ามายืมมีปัญหาและมีเหตุผลจำเป็น คำตอบโดยปกติคือ ไม่ให้ยืม แต่ถ้าคำตอบต้องเป็นให้ยืม แล้วต้องทำอย่างไร บางครั้งอาจต้องมีการทำงานกลุ่ม ต้องการภาพ หรือคลิ๊ปที่มีคุณสมบัติเหมือนกันจากสมาร์ทโฟนเครื่องเดียวกันเพื่ออัพโหลด หรือในกลุ่มมีเพียงของเราที่เชื่อมต่อเครือข่าย 3G หรือ WiFi ได้ หรือในกลุ่มพร้อมใจกันไม่ได้พกอุปกรณ์ติดตัวไปด้วย นั่นมีเหตุผลมากมายที่ต้องใ
@thaiall
thaiall / MainActivity.java
Created August 6, 2017 12:46
Android Studio : imageintextview
package com.thaiall.www.imageintextview;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.view.Menu;
import android.view.MenuItem;
@thaiall
thaiall / strings.xml
Created August 6, 2017 02:08
Android Studio : imageinarticle
<resources>
<string name="app_name">imageinarticle</string>
<string name="action_settings">Settings</string>
<string name="section_format">Hello World from section: %1$d</string>
<string-array name="data">
<item><b>ไอทีในชีวิตประจำวัน #611 เมื่อเพื่อนขอใช้โทรศัพท์เข้าสื่อสังคม</b> www.thaiall.com
อาจมีสักครั้งที่เพื่อนสนิท หัวหน้า กิ๊ก หรือแฟนขอยืมสมาร์ทโฟนของเราเข้าสื่อสังคม ในกรณีที่โทรศัพท์ของผู้ที่เข้ามายืมมีปัญหาและมีเหตุผลจำเป็น คำตอบโดยปกติคือ ไม่ให้ยืม แต่ถ้าคำตอบต้องเป็นให้ยืม แล้วต้องทำอย่างไร บางครั้งอาจต้องมีการทำงานกลุ่ม ต้องการภาพ หรือคลิ๊ปที่มีคุณสมบัติเหมือนกันจากสมาร์ทโฟนเครื่องเดียวกันเพื่ออัพโหลด หรือในกลุ่มมีเพียงของเราที่เชื่อมต่อเครือข่าย 3G หรือ WiFi ได้ หรือในกลุ่มพร้อมใจกันไม่ได้พกอุปกรณ์ติดตัวไปด้วย นั่นมีเหตุผลมากมายที่ต้องให้ยืม แล้วผู้พัฒนาแอพพลิเคชั่นเข้าใจเงื่อนไขเหล่านี้ จึงพัฒนาโปรแกรมบราวเซอร์ให้สามารถเปลี่ยนเป็นโหมดส่วนตัวที่ไม่บันทึกข้อมูลขณะใช้งาน และหายไปเมื่อเลิกใช้ได้ ซึ่งรองรับการให้เพื่อนยืมสมาร์ทโฟนเพื่อเข้าสื่อสังคมได้
ในสมาร์
@thaiall
thaiall / layout_main.xml
Created August 6, 2017 02:06
Android Studio : imageinarticle
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:layout_width="64dp"
android:layout_height="match_parent">
<ImageView
android:id="@+id/imageView2"
@thaiall
thaiall / fragment_main.xml
Created August 6, 2017 02:04
Android Studio : imageinarticle
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.thaiall.www.imageinarticle.MainActivity$PlaceholderFragment">
@thaiall
thaiall / MainActivity.java
Created August 6, 2017 02:01
Android Studio : imageinarticle
package com.thaiall.www.imageinarticle;
import android.support.design.widget.FloatingActionButton;
//import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
@thaiall
thaiall / MainActivity.java
Created August 4, 2017 23:11
Android Studio : displayimage
package com.thaiall.www.displayimage;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.TextUtils;
import android.widget.ImageView;
import android.widget.TextView;
import android.view.View;
import android.widget.Toast;
import android.content.res.Resources;
@thaiall
thaiall / MainActivity.java
Created August 4, 2017 11:57
Android Studio : Bottom Navigation Activity (in project: controlbutton)
package com.thaiall.www.bottomnavigationactivity;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.design.widget.BottomNavigationView;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity {