마시멜로우 API 23 부터는
showOnLockScreen 대신 showForAllUsers 을 써야함
value는 true or false
Ref : https://developer.android.com/intl/ko/reference/android/R.attr.html#showOnLockScreen
// In parent
pageAdapter = new ViewPagerAdapter(getFragmentManager());
// In child
pageAdapter = new ViewPagerAdapter(getChildFragmentManager());
Intent intent=new Intent(getApplicationContext(),WebResults.class);Intent intent=new Intent();dependencies {
// ... other ommitted
compile 'com.viewpagerindicator:library:2.4.1'
// ...
}
repositories {
maven { url "http://dl.bintray.com/populov/maven" }
mavenCentral()
}
dependencies {
// ...
compile 'com.viewpagerindicator:library:2.4.1@aar'
// ...
}
를 설정한다.int resId = getResources().getIdentifier("key_name", "string", getPackageName());
/**
* Hides the soft keyboard
*/
public void hideSoftKeyboard() {
if(getCurrentFocus()!=null) {
InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
inputMethodManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
}
}
/**
* Shows the soft keyboard
*/
public void showSoftKeyboard(View view) {
InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
view.requestFocus();
inputMethodManager.showSoftInput(view, 0);
}
android:descendantFocusability="beforeDescendants"
<activity
android:name="mainActivity"
android:windowSoftInputMode="adjustPan"
android:label="@string/app_name" >
</activity>
String first = "This word is ";
String next = "<font color='#EE0000'>red</font>";
t.setText(Html.fromHtml(first + next));