Eureka EngineeringLearn about Eurekaâs engineering efforts, product developments and more.
Eureka EngineeringLearn about Eurekaâs engineering efforts, product developments and more.
ä»æ¥ã¯ãNFCã¿ã°ã®åºæ¬ã®æ å ±ãèªã¿åãç°¡åãªãµã³ãã«ãç´¹ä»ãã¾ãã èªã¿åãæ å ±ã¯ã¿ã°ã®ãã¢ã¯ã·ã§ã³ãIDãTechListã§ãã NFCã®ãã¼ããã·ã§ã³ã追å ããã®ãå¿ããã« AndroidManifast.xml <uses-permission android:name="android.permission.NFC" /> MainActivity.java public class MainActivity extends Activity { private NfcAdapter mAdapter; private PendingIntent mPendingIntent; private IntentFilter[] mFilters; private String[][] mTechLists; TextView nfcActionView; TextView nfcId
ã¿ã¤ãã«ã¯èªå¼µã§ãã ã¿ããªå¤§å¥½ãpotatotipsã¨ããåå¼·ä¼ã§ä»¥ä¸ã®ãããªãã¼ã¯ããã£ãããã§ãã(ç¾å ´ã«ã¯è¡ã£ã¦ãã¾ãã) æ°ããActivityContextã§ä½ååããã£ããæ°åãªã¼ã¯ãæ¤åºãããã ãªãã¹ãApplicationContextã使ãããã¨ã®ãã¨ãããã§ãããééããªãæ»äººãåºã(èªå¼µ)ã¨æãã¾ãã®ã§ã注æãã ããã (追è¨20160527: ä¿®æ£ãããããã§ã ãªãããã¿ã¾ãã) speakerdeck.com çµè« Application Contextã¯ä½¿ããªãã§ãã ããã(èªå¼µ) (å®éã¯ä½¿ãã¨ãã¯ä½¿ã) ãªãApplication Contextãªã®ã Application Context使ããã!ã¨ããæ ¹æ ã®è¨äºã¨ãã¦ãã¡ãã®ãã§ã³ãªã«ã®Developer's Blogã® [追è¨ãã] Android éçºã§æ°ãã¤ãããã㨠ãå¤æ°å㨠Conte
[Android Tips] Pub / Sub ã©ã¤ãã©ãªãOttoãã使ã£ã¦ Fragment ãã Activity ã«ã¤ãã³ããéç¥ãã Pub / Sub ã¿ãªãããFragment ã§çºçããã¤ãã³ãã Activity ã«éç¥ããå ´åã¯ãã©ã®ããã«å®è£ ãã¦ãã¾ããï¼ Fragment ã® Listener ãä½ã£ã¦ã¿ãããActivity ã« Public ã¡ã½ãããä½ã£ã¦ã¿ããã¨ãã£ããããªæ¹æ³ãããã¾ãããä½ã ãã¹ãã¼ããããªãã§ãããã ãããªã¨ãã«å½¹ã«ç«ã¤ã®ã Otto ã¨ããã©ã¤ãã©ãªã§ããã¢ãã¤ã«æ±ºæ¸ãµã¼ãã¹ã§æå㪠Square 社ãå ¬éãã¦ãããGoogle ãå ¬éãã¦ãã Guava ã©ã¤ãã©ãªã Fork ãã¦ä½ããã¦ãã¾ãã ãã®ã©ã¤ãã©ãªã使ãã¨ãPub / Sub ã¢ãã«ã®ã¡ãã»ã¼ã¸ã³ã°ãé常ã«ç°¡åã«å®è£ ã§ãã¾ããPub / Sub ã¢ãã«ã¨ã¯ç°¡åã«
WebView ãé常ã®ãã©ã¦ã¶ã¨ãã¦ä½¿ãããã¨æã£ã¦å©ç¨ããã¨ãã«ãããã«ç´æã§æå¾ ããåä½ã¨ç°ãªãåãããããã¨ã«æ°ã¥ãã¾ãã 表示ããã HTML ãã¼ã¸ãã¯ãªãã¯ãã¦ã次ã®ãã¼ã¸ã¸ã¸ã£ã³ãããã¨ããæ°ãããã©ã¦ã¶ãéãã¦ãã¾ãã®ã§ãã åã WebView å ã«æ¬¡ã®æ°ãããã¼ã¸ã®ã³ã³ãã³ãããã¼ãããã«ã¯ã©ããããããã§ããããã WebView - æ¢å®ã§æ°ãããã©ã¦ã¶ãéã WebView ãé ç½®ã㦠http://www.google.com/ ããã¼ããã¾ããããã¦ãæ¤ç´¢é ç®ãå ¥åãã¦æ¤ç´¢ãã¾ãã 試ãã« "webview" ã¨å ¥åãã¦ã»ã»ã» æ¤ç´¢éå§ã ãã¾ãæ¤ç´¢ã§ããããã«ã¿ãã¾ããããããããã¿ãã¨ãããã¯å ã®ã¢ããªã±ã¼ã·ã§ã³ã§ã¯ãªããæ°ãããã©ã¦ã¶ãéãã¦ãã¾ãã ãã¨ã®ã¢ããªã±ã¼ã·ã§ã³ã«ç»é¢ãåãæ¿ããã¨ã次ã®ããã«å ã®æ¤ç´¢éå§åã®ç¶æ ã®ã¾ã¾ã§ãã å ã æ°ãããã©
Android Advent Calendar 2014 21æ¥ç®ã®è¨äºã§ãã Lollipopã§Activity Transitionsã追å ããã¾ããã(https://developer.android.com/training/material/animations.html#Transitions) Fragmentã«ãç¡ãã®ããªï¼ã¨æ¢ãã¦ã¿ãã¨ããæ®éã«ããã¾ããã®ã§,ãããã¦æ°ãã«è¿½å ãããTransitionã®ä½¿ãæ¹ãã¾ã¨ãã¾ãã #ã§ããããã«ãªã£ãã㨠ä»ã¾ã§ã¯Activity/Fragmentã®é·ç§»æã®ã¢ãã¡ã¼ã·ã§ã³ã«ã¤ãã¦ã¯ãããããã®æã¤View å ¨ä½ ã«å¯¾ãã¦å¹æãæå®ãã¦ãã¾ããã Lollipopããã¯Transitionãç¨ãããã¨ã«ãããActivity/Fragmentã® åView ã«ã¤ãã¦ã¢ãã¡ã¼ã·ã§ã³å¯è½ã«ãªãã¾ããã ä¾ãã°Viewãç»é¢å¤ã«çº
ãããã§ãªActivityãµã³ã㫠��/ƳU ��FƳU package net.yanzm.profileapplication; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Bitmap; impo
Fragmentã®ä½¿ãæ¹ã調ã¹ã¦ãã Fragmentãå©ç¨ãã¦ãç»é¢é·ç§»ããä¸çä¸ç°¡åãªAndroidã¢ããªãéçºãã ã®ããã°ãåèã«ãªã£ãã ãã ããã®ã¬ã¤ã¢ã¦ããã½ã¼ã¹ãæ¸ãã°OKã£ã¦æãã®è¨è¼ããã£ãããã£ã¨ããã£ãã®ã§ããããè¨è¼ã â»ä¸è¨ããã°ã ã¨ãMainãDetailã¨è¨è¼ãããã¾ãããããã§ã¯FirstãSecondã«å¤ãã¦ãã¾ãã æ¦è¦ 1ãã¼ã¸ç®ãFirstã2ãã¼ã¸ãSecondã¨ããã Firstãã¼ã¸ã§[Next]ãã¿ã³ãã¯ãªãã¯ããã¨Secondãã¼ã¸ã¸é·ç§»ããã¢ããªãä½ãã¾ãã AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_top); // ãã¤ã¢ãã°ã表示ãã DialogFragment newFragment = new TestDialogFragment(); newFragment.show(getFragmentManager(), "test"); } public static class TestDialogFragment extends DialogFragment { @Override public Dialog onCreateDialog(Bundle savedInstanceState) { // Use the
æ¦è¦ Lollipop ãçºè¡¨ããã¦ããæéãç«ã¡ãAndroid AutoãAndroid WearãAndroid TV ã¨ãå¤æ§æ§ãè¦ãå§ãã Android ã§ãããä»å¾ã¨ãå¤ç¨®å¤æ§ãªããã¤ã¹åãã«æ§ã ãªã¢ããªãä½ã£ã¦ããæµãããããªããæ°ããã¢ããªãä½ããªãæãã¦ããããè¦æãã¾ã¨ãã¾ããã TL;DR æããã¨ãã㯠3 ã¤ã ç»é¢ã¨ã©ã¤ããµã¤ã¯ã« éåæå¦ç äºææ§ ããªã端çã«ããã¨ãActivity ã Service ãªã©ã®ã©ã¤ããµã¤ã¯ã«ã¨ãã¾ãä»ãåããªãããã³ã¼ãã®æ§æã®ã¬ã¤ã¤ã¼åãè¡ããéåæå¦çãç°¡æ½ã«è¨è¿°ã§ããæºåããã¦ãããã¨ã¨ãéåæå¦çã¨ãããã¦ãã«ãã¹ã¬ããããã°ã©ãã³ã°ã®åºæ¬ãæãã¦ãããã¨ãäºææ§ã¸ã®æºåãæåã«ãã¦ããã¾ããããã¨ãã話ã§ãã ç»é¢ã¨ã©ã¤ããµã¤ã¯ã« MVC ãåºæ¬ã¨ãã¦ããã¼ã¿æ§é ãå®ç¾©ã㦠Activity ã Fragment
Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article? Honeycomb ããç»å ´ãã Fragment ã«ãã£ã¦ããã¹ã¦ã®ã³ã³ããã¼ã©ãã¸ãã¯ã Activity ã«éç´ããã¦ãã¾ãåªç¸ãã解ãæ¾ããã人é¡ã¯å¹³åãåãæ»ãã¾ãããFragment ã¯ã¾ããSupport Library ã®ã¡ã³ãã¨ãã¦ãGingerbread 以åã®éå»ä¸ã«ç©ã¿ä¸ãã罪æ¥ããæ¶ãå»ããã¨ãã¦ãã¾ãã ãã㪠Fragment ã§ããããã¾ãã¡ä½¿ãæ¹ãåãããªããã¨ãã声ãææè³ã«ãã¾ããæ¬ç¨¿ã§ã¯ãAndroid ã¢ããªã±ã¼ã·ã§ã³ã®éçºãå§ã㦠Activity 㨠Fragment ã«ã¤ãã¦å¦ã³ããã®ä¸¡è
以åã¢ããªãçµãã§ãæã¯Activityã ãã使ã£ã¦ããã©ãã©ãããä»ã¯Fragmentã使ã£ã¦ç»é¢å¶å¾¡ããããªãã®ã常èã«ãªã£ã¦ããã¿ããã§ããã 調ã¹ããã¨ãã¡ã¢ã #Fragmentã¨ã¯ï¼ cf.ä»ããèããªãActivityã¨Fragmentã®ä½¿ãåã ##Fragment以åã®åé¡ç¹ Activity ã¨ããå²ã¨å¤§ããªãªãã¸ã§ã¯ãããã¿ãã®ãã¹ãã¨ã¿ãã®ã³ã³ãã³ãã®æ°ã ãã¡ã¢ãªã«ä¹ããªãã¨ãããªã ããã¤ãã®å°ç¨ã®ã³ã³ãã¼ãã³ãã¨ã¬ãããªé£æºããªããã°å®ç¾ã§ããªããããæè»æ§ã«ä¹ãã ãªãã»ã©ã ##Fragmentã®ã¡ãªãã UI ãæã¡ããã® UI ã®æ¯ãèãã管çãããActivity ã®ä¸ã«çµã¿è¾¼ããã¨ãåºæ¥ãã³ã³ãã¼ãã³ãã Fragment ã§ããã¤ã¾ããããã«ãã£ã¦ãã¿ã°ã ãã§ã¯å®ç¾ã§ããªãã£ããã³ã³ããã¼ã©ã®ãã¸ãã¯ã使ãã¾ããäºãã§ããããã«ãªã£ãã®ã§ãã ã¾ã
Android ã¢ããªã±ã¼ã·ã§ã³ã®ã¿ã¤ãã«ãã¼ã®å 容ãå¤ããæ¹æ³ã«ã¤ãã¦ã 1. ããã©ã«ãã®ã¿ã¤ãã«ãå¤æ´ããå ´å AndroidManifest.xml ãç·¨éããã <activity android:name=".activity.SampleActivity" android:label="@string/app_name"> </activity> ãã® android:label="@string/app_name" ã®é¨åãæ¸ãæãããä»»æã®æååãªã½ã¼ã¹ãæå®å¯è½ã 2. å®è¡æã«åçã«å¤æ´ããå ´å ã¢ããªã±ã¼ã·ã§ã³ã®ç¶æ ã«ãã£ã¦ã¿ã¤ãã«ãå¤æ´ãããå ´åãªã©ã¯å®è¡æã«åçã«å¤æ´ããå¿ è¦ãããããã®å ´å㯠Activity ã¯ã©ã¹å ã§æ¬¡ã®ããã«è¨è¿°ããã setTitle("æ°ããã¿ã¤ãã«"); setTitle ã¡ã½ããã«æ¸¡ããå¼æ°ã¯ CharSequence ï¼Stri
Activity ã§ãã¬ã·ã¼ãã¼ãç»é²ãã¦ãã¤ã³ãã³ãã§ãµã¼ãã¹ãéå§ããã ãµã¼ãã¹ã§ã¯ãã·ã¹ãã ã®æéãåå¾ãã¦ãã¬ã·ã¼ãã¼ã«éãã ã¬ã·ã¼ãã¼ã§ã¯åã£ã¨ã£ãæéãç»é¢ã«è¡¨ç¤ºããã package com.example.servicetest; import android.app.Activity; import android.content.Intent; import android.content.IntentFilter; import android.os.Bundle; import android.util.Log; public class MainActivity extends Activity { IntentFilter intentFilter; MyService4Receiver receiver; Intent intent = null; /**
ä»æ´ãªããã©ã¤ããµã¤ã¯ã«ï¼onCreate()âonStart()âonResume()ï¼ã®ç解ã ææ§ãªã¾ã¾éçºãé²ãã¦ãã¾ã£ã¦ãããããæµãã確èªããããã« ãµã³ãã«ã½ã¼ã¹ãä½ã£ã¦ã¿ãã 説æ ããåèæ¸ãªã®ã§ç®ã«ãããã®ã©ã¤ããµã¤ã¯ã«ãåããã¦ç¢ºãããã cycletest.javaï¼ã¡ã¤ã³ã¢ã¯ãã£ããã£ï¼ main.xmlï¼ã¡ã¤ã³ã®ã¬ã¤ã¢ã¦ãï¼ cycletest.java public class cycletest extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Toast.makeText(this, "onCreate", Toast.LENGTH_SHORT).show(); } @Overr
Activityã®ã©ã¤ããµã¤ã¯ã«ã«ã¤ãã¦èãããã¨æãã¾ãã ã¢ã³ããã¤ãã¢ããªã¯extends Activityã¨ããæè¨ãclassã«ä»å ããããäºãããã©ã«ãã¨ãªã£ã¦ãã¾ãããåºæ¬çã«ã¯å ¨ã¦ã®ã¢ã³ããã¤ãã¢ããªã¯ãActivityã¯ã©ã¹ãç¶æ¿ãã¦ã©ã¤ããµã¤ã¯ã«ãè¡ãã¾ãã public class Activity extends ApplicationContext { protected void onCreate(Bundle savedInstanceState); protected void onStart(); protected void onRestart(); protected void onResume(); protected void onPause(); protected void onStop(); protected void onDestroy(
åºæ¬çãªã©ã¤ããµã¤ã¯ã«ã¡ã½ãããè£ããã®ããã«ããã¾ãã¾ãªã¿ã¤ãã³ã°ã§ãã³ããªã³ã°ã§ããã®ãåããã¨æãã¾ãããããã®ã¡ã½ããããã¾ã使ãã¨ãããããã¨ç´°ããå¶å¾¡ãã§ããããã«ãªãã¾ãã ç»é¢é·ç§»ãã¿ã¼ã³ã§å¼ã°ããã¡ã½ããã確èªãã ä¸è¨ãã¹ã¦ã®ã¡ã½ãããå¼ã°ããã¨ãã®ãã°ãã¨ããããã¤ãã®ç»é¢é·ç§»ã®ãã¿ã¼ã³ãæä½ããã¨ãã«å¼ã°ããã¡ã½ããã¨ãã®é çªã確èªãã¦ã¿ã¾ããã Activity ãèµ·åãã ã¢ããªèµ·åå¾ãåãã¦è¡¨ç¤ºãããã¨ãã®å ´åã§ãã onApplyThemeResource() 㯠onCreate() ããåã«å¼ã°ãã¦ãã¾ãã Activity ã®è¡¨ç¤ºä¸ã«ããã¯ãã¼ãæ¼ã Activity ã®è¡¨ç¤ºä¸ã«ããã¯ãã¼ãæ¼ã㦠Activity ãéãã¾ããã Activity ã«ã¯ããæ»ã£ã¦ããªãã®ã§ã onDestroy() ã¾ã§å¼ã°ãå®å ¨ã«ç ´æ£ããã¾ãã Activity ã®
æ¥æ¬Androidã®ä¼ã®ã¡ã¼ãªã³ã°ãªã¹ãã§ãç»é¢é·ç§»æã®ã¢ãã¡ã¼ã·ã§ã³ãã¨ããã¿ã¤ãã«ã®æ稿ãããã¾ããã 質åå 容㯠ããã¢ããªã«ã¦ç»é¢ã«è¨ç½®ãããã¿ã³ãæ¼ãã¨ç¾å¨è¡¨ç¤ºããã¦ããç»é¢ãå·¦ã¹ã©ã¤ã ããã¦å¥ã®ç»é¢ã«é·ç§»ããããã¨ãããã¨ãè¡ãªãããã®ã§ãããAndroidã§å®è£ 㯠å¯è½ã§ããããï¼ ãã®è³ªåã«å¯¾ãã ç»é¢é·ç§»æã®ã¢ãã¡ã¼ã·ã§ã³ã¯ã Activityã®Themeã®è¨å®ã§å¯è½ã§ãã ã¨ããã¡ã¼ã«ãåçããã¾ããã
ããã°ãã¯ã ä»åã¯ç»é¢é·ç§»ã®æã«ã¢ãã¡ã¼ã·ã§ã³ãè¨å®ããiPhoneã©ã¤ã¯ã®ããã«ãããã¨æãã¾ãã ã¹ã¿ã¤ã«ãè¨å®ããã¨ç°¡åã«ã¢ããªå å ¨ã¦ã®ç»é¢é·ç§»ã«é©ç¨ã§ããã®ã§ãããã§ããããã¨æãã¾ãã ã¾ããä¾ãã°ã²ã¨ã¤ã®ç»é¢é·ç§»ã§ã¯å·¦å³ã«ç»é¢ããã§ã¼ãã¤ã³ã»ã¢ã¦ãããã¢ãã¡ã¼ã·ã§ã³ãä½ãããã¦ãããä¸ã¤ã®ç»é¢é·ç§»ã§ã¯ä¸ä¸ã«ç»é¢ããã§ã¼ãã¤ã³ã»ã¢ã¦ãããã¢ãã¡ã¼ã·ã§ã³ãä½ãããå ´åã¯ãã¹ã¿ã¤ã«ã§ã¯ãªããStartActivityã®éã«æå®ãã¾ãã ä»åã¯ãã¡ãã®ã»ãã®ããæ¹ãè¼ãã¾ãã ã¾ãã端æ«ã®ã¢ãã¡ã¼ã·ã§ã³ãæå¹ã«ãã¾ãï¼Android4.0ã®ããæ¹ï¼ã ã¡ãã¥ã¼ > è¨å® > éçºè åããªãã·ã§ã³ > ãã©ã³ã¸ã·ã§ã³ã¢ãã¡ ã1åã«ããã ã¦ã£ã³ãã¦ã¢ãã¡ã1åã«ãã¨ãã¨è¯ãããããã¾ããã ã¢ãã¡ã¼ã·ã§ã³ã®Themeä½æ Themeã¨Style ã®å®ç¾© res/values/styl
Androidã¢ããªã§ã¯ãç¹ã«æå®ãããªãã¨ç«¯æ«ã横ã«ããã¨æ¨ªç»é¢ã«ã縦ã«ããã¨ç¸¦ç»é¢ã«ãªãã¾ãã ã¬ã¤ã¢ã¦ãããã¶ã¤ã³ä¸ã横åãã縦åãã®ç»é¢ã«å¯¾å¿ãã¦ããªãå ´åã¯ãã®å転ããããªãããã«æå®ãã¾ãã [åèè¨äº] ç»é¢ã®åãã«ãã£ã¦ã¬ã¤ã¢ã¦ããå¤æ´ããæ¹æ³ æå®ã®æ¹æ³ã¯ AndroidManifest.xml ã® manifest â application â activity ã« screenOrientationãè¨è¿°ãã¾ãã 横ç»é¢ã«åºå®ããã«ã¯ <activity android:screenOrientation="landscape"> 縦ç»é¢ã«åºå®ããã«ã¯ <activity android:screenOrientation="portrait"> SDK(ã¨ãã¥ã¬ã¼ã¿)ã§ç»é¢ã®åããå¤æ´ãã(縦ãã横ã横ãã縦)ã«ã¯ãCtrl+F11ã§ãã screenOrient
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}