Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Android 5.0 Lollipop トリビア大全

cockscomb
November 25, 2014

Android 5.0 Lollipop トリビア大全

potatotips #11で発表しました

cockscomb

November 25, 2014
Tweet

More Decks by cockscomb

Other Decks in Technology

Transcript

  1. ςϨϏ τ Ϧ ϏΞ ʲ ͱ Γͼ͋ʳ USJWJB ੜ͖͍ͯ͘͏͑Ͱશ͘ඞཁͷͳ͍Ϝμͳ஌ࣝɻࡶֶɻ ςϨϏ൪૊ʮτϦϏΞͷઘʯͰຖि঺հ͞Ε͍ͯΔɻ

    ೔ຊͰ͸ɺಉςϨϏ൪૊͕͖͔͚ͬͰ࢖༻͞ΕΔΑ͏ ʹͳ͕ͬͨɺӳޠݍͰ͸ݹ͔͘Β࢖༻͞Ε͍ͯΔΑ ͏Ͱ͋Δɻ ͸ͯͳΩʔϫʔυ˜)BUFOB
  2. Intent intent = ShareCompat.IntentBuilder.from(this)
 .setSubject(title)
 .setText(url)
 .setType("text/plain")
 .getIntent();
 
 Intent

    chooserIntent = Intent.createChooser(intent, null);
 
 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
 
 Bundle replaceExtras = new Bundle();
 replaceExtras.putString(Intent.EXTRA_TEXT, title + " / " + url);
 
 Bundle bundle = new Bundle();
 bundle.putParcelable("com.twitter.android", replaceExtras);
 
 chooserIntent.putExtra(Intent.EXTRA_REPLACEMENT_EXTRAS, bundle);
 }
 
 startActivity(chooserIntent);
  3. Range<Integer> firstRange = Range.create(3, 11);
 Range<Integer> secondRange = Range.create(5, 7);


    if (firstRange.contains(secondRange)) {
 Log.i("Range", "firstRange contains secondRange"); 
 // I/Range﹕ firstRange contains secondRange
 }
 
 Size size = new Size(1920, 1080);
 Log.i("Size", size.toString()); // I/Size﹕ 1920x1080
 
 Rational rational = new Rational(1, 3);
 Log.i("Rational", rational.toString()); // I/Rational﹕ 1/3
  4. <LinearLayout
 xmlns:android="http://schemas.android.com/apk/res/android"
 xmlns:app="http://schemas.android.com/apk/res-auto"
 android:orientation="vertical"
 android:layout_width="match_parent"
 android:layout_height="match_parent">
 
 <android.support.v7.widget.Toolbar
 android:id="@+id/tool_bar"
 android:layout_width="match_parent"


    android:layout_height="wrap_content"
 app:theme="@style/ThemeOverlay.AppCompat.ActionBar"
 style="@style/ActionBarToolbar"/>
 
 <FrameLayout
 android:layout_width="match_parent"
 android:layout_height="0dp"
 android:layout_weight="1.0"
 android:foreground="?android:attr/windowContentOverlay">
 
 <SomethingWhatYouWant>
 
 </FrameLayout>
 </LinearLayout>