Вниз  Android-программирование (1-ые посты)
- 17.10.2016 / 09:53
DominaN
  Пользователь

DominaN 
Сейчас: Offline
ну такого-же эффекта можно и стандартными средствами добиться. Вон lwjgl вообще нативные dll грузит для каждой платформы. Понятно, что это JNI, но, например тот же сменный рендер можно чисто на интерфейсах сделать. Да чо там далеко ходить, взять тот же JECP.
- 17.10.2016 / 10:11
aNNiMON
  Супервизор

aNNiMON 
Сейчас: Offline
DominaN, DI это про:
  1. private AILogic aiLogic;
  2.  
  3. public GameLogic(AILogic aiLogic) {
  4.     this.aiLogic = aiLogic;
  5. }

вместо

  1. private AILogic aiLogic;
  2.  
  3. public GameLogic() {
  4.     this.aiLogic = new WiseAILogic();
  5. }

Всего-лишь. Но что-то людям так лень вручную это делать, что они на аннотации всё положили. Сейчас вроде норм, а вот в первых версиях даггера, зависимости динамически на андроиде подключались, а не на этапе компиляции. Сейчас там кодогенерация.
__________________
 let live
- 17.10.2016 / 11:16
aRiGaTo
  Пользователь

aRiGaTo 
Сейчас: Offline
Цитата DominaN:
тот же сменный рендер можно чисто на интерфейсах
Так это оно и есть. Вот только когда у тебя таких модулей несколько штук и большая иерархия компонентов, то инжектить зависимости через конструкторы утомительно и некрасиво (а через сеттеры ещё и не совсем безопасно). Поэтому и существуют всякие DI-фреймворки типа Dagger, Guice и прочие PicoContainer'ы.
__________________
 don't tread on me

Изменено aRiGaTo (17.10 / 11:16) (всего 1 раз)
- 19.10.2016 / 16:36
Naik
  Пользователь

Naik 
Сейчас: Offline
Если вы поместите внутрь CoordinatorLayout другой CoordinatorLayout, то внутренний перехватит все Behaviour's и внешний не будет работать. Этот класс не исправляет этот недостаток. Просто замените вложенный CoordinatorLayout на этот и все заработает. Источник
Открыть спойлер

В полезные коды не влазит никак :-(

Изменено Naik (19.10 / 16:37) (всего 1 раз)
- 21.10.2016 / 12:12
aNNiMON
  Супервизор

aNNiMON 
Сейчас: Offline
Android 7.1 with 25 SDK is available now for Android Beta program devices and official emulatorsПоехавшие что ли? Хватит штамповать!
__________________
 let live

Изменено aNNiMON (21.10 / 12:12) (всего 1 раз)
- 21.10.2016 / 18:36
Naik
  Пользователь

Naik 
Сейчас: Offline
aNNiMON, Вообще-то давно обнрвился до 7.1.1 :gg:


Прикрепленные файлы:
Screenshot_2016(…).jpg (75.25 кб.) Скачано 106 раз
- 12.11.2016 / 14:02
Naik
  Пользователь

Naik 
Сейчас: Offline
Android Studio 2.3 Canary Available Below are highlights of some of the major changes in this release:

IDE: We've upgraded the base IDE from IntelliJ 2016.1 to 2016.2, which adds a number of new features -- ligatures, breadcrumbs, editor background images, revamped UI for inspections, notifications and the debugger, and more.
Layout Editor: The layout editor now supports chains and ratios for ConstraintLayout.
Lint now has "baseline support" which lets you check in a current set of warnings -- and from now on, only new issues are reported. This lets a project with a lot of technical debt set a baseline and then break the build only when new issues are introduced, without having to go and fix all existing issues first. In order not to forget about the technical debt though it creates an info-level issue which tells you that you've filtered out bugs:
WebP: Android Studio 2.3 now provides PNG to WebP Conversion. With the new conversion wizard, you can quickly generate WebP images and if you're using the lossy encoding, inspect the diffs of your images. Using WebP images in your app saves APK space and is more performant
Data Binding: In addition to a lot of bug fixes in the editing support for data binding, there is a new feature to help debug apps using data binding. Normally the IDE will automatically compute the data binding classes "on the fly" such that they are always correct and up to date with your edits in the XML files. However, when you are debugging your app, you may want to see and step into exactly the code that was compiled. You can now enable this under preferences.
Incremental SDK Updates: This version of Studio includes support for incremental patching of SDK components, such as system images. We can now provide patches for system images (which are often very large) and updating those with Studio 2.3 will allow a much smaller and faster download.
Build System: Support for the new Gradle plugin 2.3.0. There are some notable changes: The user cache for dex files is now enabled by default, which should speed up builds; Configuration times for very large projects should be significantly faster
Bug Fixes A notable & highly requested enhancement (b.android.com/220197) we also added is a search box to the Vector Asset Wizard You can now quickly filter through the vector icons based on the name of the asset. :raised_hands:


- 13.11.2016 / 22:28
vl@volk
  Пользователь

vl@volk 
Сейчас: Offline
Не успел 2.2.3 обновиться, уже 2.3 :-D
__________________
 знает толк
- 14.11.2016 / 20:23
Naik
  Пользователь

Naik 
Сейчас: Offline
Есть БД Realm в проекте. Ее инстанс можно получить через статический метод, т.е. это глобальный обьект.

Делаю запрос в методе или констректоре

  1. RealmResults results = myRealm.where(Friend.class).findAllAsync();
  2. results.addChangeListener(friends -> {
  3.     // Не вызывается или вызывается только 1 раз (рандомно)
  4. });

Так вот а если вынести realmResults в поле класса, то колбек нормально вызывается.

Как такое возможно что как только теряется областт видимости результатов, то оно перестает вызывать листенер? :gg:

Может realmResults хранится где-то внутри либы как WeakReference?

Изменено Naik (14.11 / 20:26) (всего 2 раза)
- 14.11.2016 / 20:42
aNNiMON
  Супервизор

aNNiMON 
Сейчас: Offline
Naik, да, похоже на WeakReference.
Как вообще Realm? Быстрее, чем SQLite? Много тянет?
__________________
 let live
Наверх  Всего сообщений: 4453
Фильтровать сообщения
Поиск по теме
Файлы топика (184)