Перейти к содержанию
Fire Monkey от А до Я

Лидеры

Популярный контент

Показан контент с высокой репутацией 14.02.2020 во всех областях

  1. Рабочий код: procedure TForm1.HandleActivityMessage(const Sender: TObject; const M: TMessage); var RequestCode, ResultCode: Integer; Intent: JIntent; uri : Jnet_Uri; bitmap: JBitmap; surface: TBitmapSurface; begin if not(M is TMessageResultNotification) then exit; TMessageManager.DefaultManager.Unsubscribe(TMessageResultNotification, FMessageSubscriptionID); FMessageSubscriptionID := 0; RequestCode:=TMessageResultNotification(M).RequestCode; ResultCode:=TMessageResultNotification(M).ResultCode; Intent:=TMessageResultNotification(M).Value; if (ResultCode = TJActivity.JavaClass.RESULT_OK) and Assigned(Intent) then begin try uri:=Intent.getData; bitmap := TJImages_Media.JavaClass.getBitmap(SharedActivity.getContentResolver, uri); surface := TBitmapsurface.Create; JBitMapToSurface(bitmap,surface); Image1.Bitmap.Assign(surface); finally surface.Free; end; end;
    1 балл
Эта таблица лидеров рассчитана в Москва/GMT+03:00
×
×
  • Создать...