/developers/samples/android/notification/Bubbles/app/src/main/java/com/example/android/bubbles/ui/chat/ |
D | ChatViewModel.kt | 46 chatId.value?.let { id -> in <lambda>() method 48 repository.activateChat(id) in <lambda>() 50 repository.deactivateChat(id) in <lambda>() 58 val contact: LiveData<Contact?> = Transformations.switchMap(chatId) { id -> in <lambda>() method 59 repository.findContact(id) in <lambda>() 65 val messages: LiveData<List<Message>> = Transformations.switchMap(chatId) { id -> in <lambda>() method 66 repository.findMessages(id) in <lambda>() 79 fun setChatId(id: Long) { in <lambda>() 80 chatId.value = id in <lambda>() 82 repository.activateChat(id) in <lambda>() [all …]
|
/developers/build/templates/CardStream/_MODULE_/src/template/res/layout/ |
D | card.xml.ftl | 2 android:id="@+id/card_layout" 9 android:id="@+id/card_actionarea" 12 android:layout_below="@+id/card_contentarea" 23 android:id="@id/card_contentarea" 30 android:id="@+id/card_title" 36 android:id="@+id/card_content" 40 android:layout_below="@id/card_title"/> 45 android:id="@+id/card_overlay" 48 android:layout_alignBottom="@id/card_contentarea" 49 android:layout_alignLeft="@id/card_contentarea" [all …]
|
/developers/samples/android/notification/Bubbles/app/src/main/java/com/example/android/bubbles/data/ |
D | ChatRepository.kt | 27 fun findContact(id: Long): LiveData<Contact?> in <lambda>() 28 fun findMessages(id: Long): LiveData<List<Message>> in <lambda>() 29 fun sendMessage(id: Long, text: String) in <lambda>() 30 fun activateChat(id: Long) in <lambda>() 31 fun deactivateChat(id: Long) in <lambda>() 32 fun showAsBubble(id: Long) in <lambda>() 59 contact.id to Chat(contact) in contact() 74 override fun findContact(id: Long): LiveData<Contact?> { in findContact() 76 postValue(Contact.CONTACTS.find { it.id == id }) in findContact() 81 override fun findMessages(id: Long): LiveData<List<Message>> { in findMessages() [all …]
|
/developers/samples/android/deprecated/wearable/wear/Geofencing/Application/src/main/java/com/example/android/wearable/geofencing/ |
D | SimpleGeofenceStore.java | 54 public SimpleGeofence getGeofence(String id) { in getGeofence() argument 57 double lat = mPrefs.getFloat(getGeofenceFieldKey(id, KEY_LATITUDE), in getGeofence() 59 double lng = mPrefs.getFloat(getGeofenceFieldKey(id, KEY_LONGITUDE), in getGeofence() 61 float radius = mPrefs.getFloat(getGeofenceFieldKey(id, KEY_RADIUS), in getGeofence() 64 mPrefs.getLong(getGeofenceFieldKey(id, KEY_EXPIRATION_DURATION), in getGeofence() 66 int transitionType = mPrefs.getInt(getGeofenceFieldKey(id, KEY_TRANSITION_TYPE), in getGeofence() 74 return new SimpleGeofence(id, lat, lng, radius, expirationDuration, transitionType); in getGeofence() 84 public void setGeofence(String id, SimpleGeofence geofence) { in setGeofence() argument 89 prefs.putFloat(getGeofenceFieldKey(id, KEY_LATITUDE), (float) geofence.getLatitude()); in setGeofence() 90 prefs.putFloat(getGeofenceFieldKey(id, KEY_LONGITUDE), (float) geofence.getLongitude()); in setGeofence() [all …]
|
/developers/samples/android/notification/Bubbles/app/src/test/java/com/example/android/bubbles/data/ |
D | TestChatRepository.kt | 38 override fun findContact(id: Long): LiveData<Contact?> { in <lambda>() 40 value = Contact.CONTACTS.find { it.id == id } in <lambda>() 44 override fun findMessages(id: Long): LiveData<List<Message>> { in <lambda>() 45 val chat = chats.getValue(id) in <lambda>() 63 override fun sendMessage(id: Long, text: String) { in <lambda>() 64 val chat = chats.getValue(id) in <lambda>() 73 override fun activateChat(id: Long) { in <lambda>() 74 activatedId = id in <lambda>() 77 override fun deactivateChat(id: Long) { in <lambda>() 81 override fun showAsBubble(id: Long) { in <lambda>() [all …]
|
/developers/samples/android/notification/NotificationChannels/Application/src/main/java/com/example/android/notificationchannels/ |
D | MainActivity.java | 59 ui = new MainUi(findViewById(R.id.activity_main)); in onCreate() 68 public void sendNotification(int id, String title) { in sendNotification() argument 70 switch (id) { in sendNotification() 88 noti.notify(id, nb); in sendNotification() 122 titlePrimary = (TextView) root.findViewById(R.id.main_primary_title); in MainUi() 123 ((Button) root.findViewById(R.id.main_primary_send1)).setOnClickListener(this); in MainUi() 124 ((Button) root.findViewById(R.id.main_primary_send2)).setOnClickListener(this); in MainUi() 125 ((ImageButton) root.findViewById(R.id.main_primary_config)).setOnClickListener(this); in MainUi() 127 titleSecondary = (TextView) root.findViewById(R.id.main_secondary_title); in MainUi() 128 ((Button) root.findViewById(R.id.main_secondary_send1)).setOnClickListener(this); in MainUi() [all …]
|
/developers/samples/android/deprecated/wearable/wear/WearMessagingApp/Wearable/src/main/java/com/example/android/wearable/wear/messaging/model/ |
D | Profile.java | 26 private String id; field in Profile 36 this.id = account.getId(); in Profile() 44 public Profile(String id, String name, String imageUri) { in Profile() argument 45 this.id = id; in Profile() 52 setId(builder.id); in Profile() 60 return id; in getId() 63 public void setId(String id) { in setId() argument 64 this.id = id; in setId() 134 if (!id.equals(profile.id)) { in equals() 158 int result = id.hashCode(); in hashCode() [all …]
|
D | Message.java | 23 private String id; field in Message 38 id = builder.id; in Message() 44 return id; in getId() 47 public void setId(String id) { in setId() argument 48 this.id = id; in setId() 77 private String id; field in Message.Builder 83 public Builder id(String val) { in id() method in Message.Builder 84 id = val; in id() 123 if (id != null ? !id.equals(message.id) : message.id != null) { in equals() 142 int result = id != null ? id.hashCode() : 0; in hashCode()
|
D | Chat.java | 26 private String id; field in Chat 37 id = UUID.randomUUID().toString(); in Chat() 40 public Chat(String id) { in Chat() argument 41 this.id = id; in Chat() 114 return id; in getId() 117 public void setId(String id) { in setId() argument 118 this.id = id; in setId() 128 dest.writeString(this.id); in writeToParcel() 147 this.id = in.readString(); in Chat() 202 if (!id.equals(chat.id)) { in equals() [all …]
|
/developers/samples/android/notification/NotificationChannels/kotlinApp/Application/src/main/java/com/example/android/notificationchannels/ |
D | MainActivity.kt | 54 fun sendNotification(id: Int, title: String) { in sendNotification() 55 when (id) { in sendNotification() 57 id, helper.getNotification1(title, getString(R.string.primary1_body))) in sendNotification() 59 id, helper.getNotification1(title, getString(R.string.primary2_body))) in sendNotification() 61 id, helper.getNotification2(title, getString(R.string.secondary1_body))) in sendNotification() 63 id, helper.getNotification2(title, getString(R.string.secondary2_body))) in sendNotification() 103 (root.findViewById<View>(R.id.btnA) as Button).setOnClickListener(this) 123 when (view.id) { in onClick() 124 R.id.main_primary_send1 -> sendNotification(NOTI_PRIMARY1, titlePrimaryText) in onClick() 125 R.id.main_primary_send2 -> sendNotification(NOTI_PRIMARY2, titlePrimaryText) in onClick() [all …]
|
/developers/samples/android/media/MediaEffects/Application/src/main/java/com/example/android/mediaeffects/ |
D | MediaEffectsFragment.java | 69 mEffectView = (GLSurfaceView) view.findViewById(R.id.effectsview); in onViewCreated() 76 setCurrentEffect(R.id.none); in onViewCreated() 118 if (mCurrentEffect != R.id.none) { in onDrawFrame() 156 case R.id.none: in initEffect() 159 case R.id.autofix: in initEffect() 164 case R.id.bw: in initEffect() 170 case R.id.brightness: in initEffect() 175 case R.id.contrast: in initEffect() 180 case R.id.crossprocess: in initEffect() 184 case R.id.documentary: in initEffect() [all …]
|
/developers/samples/android/admin/NfcProvisioning/Application/src/main/java/com/example/android/nfcprovisioning/ |
D | NfcProvisioningFragment.java | 79 mEditPackageName = (EditText) view.findViewById(R.id.package_name); in onViewCreated() 80 mEditClassName = (EditText) view.findViewById(R.id.class_name); in onViewCreated() 81 mEditLocale = (EditText) view.findViewById(R.id.locale); in onViewCreated() 82 mEditTimezone = (EditText) view.findViewById(R.id.timezone); in onViewCreated() 83 mEditWifiSsid = (EditText) view.findViewById(R.id.wifi_ssid); in onViewCreated() 84 mEditWifiSecurityType = (EditText) view.findViewById(R.id.wifi_security_type); in onViewCreated() 85 mEditWifiPassword = (EditText) view.findViewById(R.id.wifi_password); in onViewCreated() 87 mEditPackageName.addTextChangedListener(new TextWatcherWrapper(R.id.package_name, this)); in onViewCreated() 88 mEditClassName.addTextChangedListener(new TextWatcherWrapper(R.id.class_name, this)); in onViewCreated() 89 mEditLocale.addTextChangedListener(new TextWatcherWrapper(R.id.locale, this)); in onViewCreated() [all …]
|
/developers/samples/android/ui/window/MultiWindowPlayground/Application/src/androidTest/java/ |
D | LaunchTests.java | 48 onView(withId(R.id.button_start_basic)).perform(scrollTo(), click()); in testLaunchBasicActivity() 51 onView(withId(R.id.description)) in testLaunchBasicActivity() 58 onView(withId(R.id.start_unresizable)).perform(scrollTo(), click()); in testLaunchUnresizableActivity() 61 onView(withId(R.id.description)) in testLaunchUnresizableActivity() 69 onView(withId(R.id.start_adjacent)).perform(scrollTo(), click()); in testLaunchAdjacentActivity() 72 onView(withId(R.id.description)) in testLaunchAdjacentActivity() 79 onView(withId(R.id.start_customconfiguration)).perform(scrollTo(), click()); in testLaunchCustomConfigurationActivity() 82 onView(withId(R.id.description)) in testLaunchCustomConfigurationActivity() 90 onView(withId(R.id.start_minimumsize)).perform(scrollTo(), click()); in testLaunchMinimumSizeActivity() 93 onView(withId(R.id.description)) in testLaunchMinimumSizeActivity() [all …]
|
/developers/samples/android/notification/Bubbles/app/src/main/java/com/example/android/bubbles/ |
D | MainActivity.kt | 52 setSupportActionBar(findViewById(R.id.toolbar)) in onCreate() 54 appBar = findViewById(R.id.app_bar) in onCreate() 55 name = findViewById(R.id.name) in onCreate() 56 icon = findViewById(R.id.icon) in onCreate() 59 replace(R.id.container, MainFragment()) in onCreate() 74 val id = intent.data.lastPathSegment.toLongOrNull() in handleIntent() constant 75 if (id != null) { in handleIntent() 76 openChat(id) in handleIntent() 100 override fun openChat(id: Long) { in openChat() 104 replace(R.id.container, ChatFragment.newInstance(id, true)) in openChat() [all …]
|
/developers/samples/android/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/settings/ |
D | SettingsActivity.java | 92 setupSettingsSwitch(R.id.settings_auth_responses_container, in onCreate() 93 R.id.settings_auth_responses_label, in onCreate() 94 R.id.settings_auth_responses_switch, in onCreate() 97 setupSettingsSwitch(R.id.settings_auth_datasets_container, in onCreate() 98 R.id.settings_auth_datasets_label, in onCreate() 99 R.id.settings_auth_datasets_switch, in onCreate() 102 setupSettingsButton(R.id.settings_add_data_container, in onCreate() 103 R.id.settings_add_data_label, in onCreate() 104 R.id.settings_add_data_icon, in onCreate() 106 setupSettingsButton(R.id.settings_clear_data_container, in onCreate() [all …]
|
/developers/samples/android/background/JobScheduler/kotlinApp/app/src/main/java/com/example/android/jobscheduler/ |
D | MainActivity.kt | 60 anyConnectivityRadioButton = findViewById(R.id.checkbox_any) in onCreate() 61 deadlineEditText = findViewById(R.id.deadline_time) in onCreate() 62 delayEditText = findViewById(R.id.delay_time) in onCreate() 63 durationTimeEditText = findViewById(R.id.duration_time) in onCreate() 64 requiresChargingCheckBox = findViewById(R.id.checkbox_charging) in onCreate() 65 requiresIdleCheckbox = findViewById(R.id.checkbox_idle) in onCreate() 66 wiFiConnectivityRadioButton = findViewById(R.id.checkbox_unmetered) in onCreate() 71 findViewById<Button>(R.id.cancel_button).setOnClickListener { cancelAllJobs() } in onCreate() 72 findViewById<Button>(R.id.finished_button).setOnClickListener { finishJob() } in onCreate() 73 findViewById<Button>(R.id.schedule_button).setOnClickListener { scheduleJob() } in onCreate() [all …]
|
/developers/samples/android/ui/DarkTheme/Application/src/main/java/com/example/android/darktheme/ |
D | MainActivity.java | 40 case R.id.navigation_home: 43 case R.id.navigation_preferences: 46 case R.id.navigation_settings: 59 setSupportActionBar((Toolbar) findViewById(R.id.toolbar)); in onCreate() 61 BottomNavigationView navigation = findViewById(R.id.navigation); in onCreate() 74 MenuItem item = menu.findItem(R.id.action_more); in onCreateOptionsMenu() 84 int id = item.getItemId(); in onOptionsItemSelected() local 85 if (id == R.id.action_more) { in onOptionsItemSelected() 118 .replace(R.id.fragment_layout, fragment, tag) in showFragment()
|
/developers/samples/android/security/DirectBoot/Application/src/main/java/com/example/android/directboot/alarms/ |
D | Alarm.java | 32 public int id; field in Alarm 43 public Alarm(int id, int month, int date, int hour, int minute) { in Alarm() argument 44 this.id = id; in Alarm() 62 jsonObject.put("id", id); in toJson() 84 alarm.id = jsonObject.getInt("id"); in fromJson() 99 "id=" + id + in toString() 116 return id == alarm.id && in equals() 125 return Objects.hash(id, month, date, hour, minute); in hashCode()
|
/developers/samples/android/ui/graphics/PdfRendererBasic/Application/src/androidTest/java/com/example/android/pdfrendererbasic/ |
D | PdfRendererBasicTest.java | 47 .findFragmentById(R.id.container); in integration() 50 onView(withId(R.id.image)).check(matches(isDisplayed())); in integration() 51 onView(withId(R.id.previous)).check(matches(allOf(isDisplayed(), not(isEnabled())))); in integration() 52 onView(withId(R.id.next)).check(matches(allOf(isDisplayed(), isEnabled()))); in integration() 54 onView(withId(R.id.next)).perform(click()); in integration() 56 onView(withId(R.id.previous)).check(matches(allOf(isDisplayed(), isEnabled()))); in integration() 57 onView(withId(R.id.next)).check(matches(allOf(isDisplayed(), isEnabled()))); in integration() 59 onView(withId(R.id.next)).perform(click()); in integration() 62 onView(withId(R.id.previous)).check(matches(allOf(isDisplayed(), isEnabled()))); in integration() 63 onView(withId(R.id.next)).check(matches(allOf(isDisplayed(), not(isEnabled())))); in integration()
|
/developers/samples/android/input/multitouch/BasicMultitouch/Application/src/main/java/com/example/android/basicmultitouch/ |
D | TouchDisplayView.java | 152 int id = event.getPointerId(0); in onTouchEvent() local 163 mTouches.put(id, data); in onTouchEvent() 182 int id = event.getPointerId(index); in onTouchEvent() local 186 data.label = "id: " + id; in onTouchEvent() 194 mTouches.put(id, data); in onTouchEvent() 210 int id = event.getPointerId(0); in onTouchEvent() local 211 TouchHistory data = mTouches.get(id); in onTouchEvent() 212 mTouches.remove(id); in onTouchEvent() 232 int id = event.getPointerId(index); in onTouchEvent() local 234 TouchHistory data = mTouches.get(id); in onTouchEvent() [all …]
|
/developers/samples/android/ui/transition/BasicTransition/Application/src/main/java/com/example/android/basictransition/ |
D | BasicTransitionFragment.java | 55 RadioGroup radioGroup = (RadioGroup) view.findViewById(R.id.select_scene); in onCreateView() 57 mSceneRoot = (ViewGroup) view.findViewById(R.id.scene_root); in onCreateView() 61 mScene1 = new Scene(mSceneRoot, (ViewGroup) mSceneRoot.findViewById(R.id.container)); in onCreateView() 85 case R.id.select_scene_1: { in onCheckedChanged() 92 case R.id.select_scene_2: { in onCheckedChanged() 96 case R.id.select_scene_3: { in onCheckedChanged() 103 case R.id.select_scene_4: { in onCheckedChanged() 109 View square = mSceneRoot.findViewById(R.id.transition_square); in onCheckedChanged()
|
/developers/samples/android/deprecated/wearable/wear/RecipeAssistant/Application/src/main/java/com/example/android/wearable/recipeassistant/ |
D | RecipeActivity.java | 62 mTitleTextView = (TextView) findViewById(R.id.recipeTextTitle); in onCreate() 63 mSummaryTextView = (TextView) findViewById(R.id.recipeTextSummary); in onCreate() 64 mImageView = (ImageView) findViewById(R.id.recipeImageView); in onCreate() 65 mIngredientsTextView = (TextView) findViewById(R.id.textIngredients); in onCreate() 66 mStepsLayout = (LinearLayout) findViewById(R.id.layoutSteps); in onCreate() 79 case R.id.action_cook: in onOptionsItemSelected() 108 findViewById(R.id.ingredientsHeader).setAnimation(fadeIn); in displayRecipe() 109 findViewById(R.id.ingredientsHeader).setVisibility(View.VISIBLE); in displayRecipe() 110 findViewById(R.id.stepsHeader).setAnimation(fadeIn); in displayRecipe() 112 findViewById(R.id.stepsHeader).setVisibility(View.VISIBLE); in displayRecipe() [all …]
|
/developers/samples/android/media/MediaBrowserService/Application/src/main/java/com/example/android/mediasession/ui/ |
D | MainActivity.java | 57 mTitleTextView = findViewById(R.id.song_title); in onCreate() 58 mArtistTextView = findViewById(R.id.song_artist); in onCreate() 59 mAlbumArt = findViewById(R.id.album_art); in onCreate() 60 mMediaControlsImage = findViewById(R.id.media_controls); in onCreate() 61 mSeekBarAudio = findViewById(R.id.seekbar_audio); in onCreate() 64 findViewById(R.id.button_previous).setOnClickListener(clickListener); in onCreate() 65 findViewById(R.id.button_play).setOnClickListener(clickListener); in onCreate() 66 findViewById(R.id.button_next).setOnClickListener(clickListener); in onCreate() 95 case R.id.button_previous: in onClick() 98 case R.id.button_play: in onClick() [all …]
|
/developers/samples/android/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofill/app/edgecases/ |
D | CreditCardActivity.java | 42 mCcExpDayView = findViewById(R.id.expirationDay); in onCreate() 43 mCcExpMonthView = findViewById(R.id.expirationMonth); in onCreate() 44 mCcExpYearView = findViewById(R.id.expirationYear); in onCreate() 45 mCcNumber = findViewById(R.id.creditCardNumberField); in onCreate() 46 mCcSecurityCode = findViewById(R.id.creditCardSecurityCode); in onCreate() 47 findViewById(R.id.submitButton).setOnClickListener(new View.OnClickListener() { in onCreate() 53 findViewById(R.id.clearButton).setOnClickListener(new View.OnClickListener() { in onCreate()
|
/developers/samples/android/tv/ChannelsPrograms/Application/src/main/java/com/example/android/tv/channelsprograms/model/ |
D | Movie.java | 24 private long id; field in Movie 55 return id; in getId() 58 public void setId(long id) { in setId() argument 59 this.id = id; in setId() 122 + id in toString()
|