랭킹으로 돌아가기

yydcdut/PhotoNoter

Java

:notebook:Material Design风格的开源照片笔记。(MVP+Dagger2+RxJava+AspectJ+Dex处理)

androidrxjavamaterial-designcamera2-apianimationrxandroidmvp-architectureaspectjdexmvp-androidaop-aspects
스타 성장
스타
1.6k
포크
329
주간 성장
이슈
1
5001k1.5k
2015년 10월2019년 5월2022년 12월2026년 7월
아티팩트Mavengit clone https://github.com/yydcdut/PhotoNoter.git
README

照片笔记 PhotoNoter

Material Design风格的开源照片笔记。

GitHub release License Build Status

下载:

编译

'signingConfig.storeFile' does not exist

如果编译不过,错误日志是:

Error:A problem was found with the configuration of task ':app:packagexxxxDebug'.

File ‘/xxxxxxxxxx/debug.keystore' specified for property 'signingConfig.storeFile' does not exist.

将/app/build.gradle中的下面代码注释或者删除

signingConfigs {
	debug {
		//storeFile file("debug.keystore")
	}
}

release.properties (No such file or directory)

如果编译不过,错误日志是:

What went wrong:

A problem occurred evaluating project ':app'.

xxxxxxxx/app/release.properties (No such file or directory)

将/app/build.gradle中的下面代码注释或者删除

signingConfigs {
	release {
		//Properties p = new Properties()
		//p.load(new FileInputStream(project.file('release.properties')))
		//storeFile file(p.storeFile)
        //storePassword p.storePassword
		//keyAlias p.keyAlias
		//keyPassword p.keyPassword
	}
}

NDK

如果编译不过,错误日志是跟NDK有关的:

开发环境的ndk版本是android-ndk-r10e

Others

如果还是不行,请将错误日志issues,谢谢!

应用截图

动画gif

界面

Dribbble

有些界面是模仿Dribbble网站App效果图实现的:

Dribbble

技术点

  1. 整体项目MVP结构(1.2.0版本之前是 MVC )。
  2. Dagger2 。
  3. 相机部分,API >= 21使用 Camera2 ,API < 21使用 Camera 。
  4. 相机的状态机,聚焦状态机。
  5. 照片缓存分为两种,一个是大图,一个是小图,小图是相册界面缩略图的时候加载的,大图是查看图片的时候加载的。
  6. 图片处理。但是在 App 中,发现很多这方面的问题我还没有解决。比如红米1s后置摄像头800W,那么拍一张图是3M左右,但是 Camera 的照片的0度是我们正常手机视角的90度。那么我们需要把这个3M的图片给翻转过来,但是呢又不想失分辨率,就会导致OOM!那么现在的解决办法是设置EXIF信息,然后显示图片通过 Exif 信息去旋转角度。
  7. 沙盒。每次拍完照都是先把数据放到沙盒数据库中,然后再到服务中去作图,做完的话再从数据库中删除掉。作图的 Service 是和 Camera 那个 Activity 绑定的(bind方式),当不再拍照的时候就退出了 Service,然后回到相册界面的时候会去判断沙盒数据库中是否有没有做完的图,没有做完的话另外启一个进程的 Service 继续作图。
  8. Activity 退出和进入的动画。这块弄了很久,主要是想模仿 Android5.0 的那种,但是有些界面做出来超级卡。
  9. 一些 UI 的动画,比如 “ 意见反馈”、 “ 语音输入” 这里面的动画。
  10. 主题设置,沉浸式状态栏(Android 5.0)。
  11. 切换主题。
  12. 可以滑动 item 和可以拖放 item 的 ListView(SlideAndDragListView)。
  13. Android 原生平台的 Markdown,支持 EditText 编辑实时预览 (RxMarkdown)。
  14. RxJava + RxAndroid(RxCategory/ RxPhotoNote/ RxSandBox/ RxFeedBack/ RxUser)。
  15. dex分包处理。第一次开启App的时候 install dex + dexopt 时间很长,所以第一次开启的时候另启进程专门做这个事情,防止主线程因为时间长而发生ANR。以及自己去配置主dex是为了以防自动分包ClassNotFound异常。
  16. Dex自动分包脚本。
  17. 使用 AOP 进行 Android 6.0 权限适配。
  18. NDK && AIDL。

更新版本说明

ChangeLog

致谢

License

Copyright 2015 yydcdut

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

관련 저장소
flutter/flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond

DartBSD 3-Clause "New" or "Revised" Licensemobileandroid
flutter.dev
177.9k30.7k
Genymobile/scrcpy

Display and control your Android device

CApache License 2.0androidc
146.1k13.5k
react/react-native

A framework for building native applications using React

C++MIT Licenseandroidapp-framework
reactnative.dev
126.2k25.2k
facebook/react-native

A framework for building native applications using React

C++MIT Licenseandroidapp-framework
reactnative.dev
120.9k24.5k
rustdesk/rustdesk

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

Rustcrates.ioGNU Affero General Public License v3.0remote-controlremote-desktop
rustdesk.com
118.6k18.1k
justjavac/free-programming-books-zh_CN

:books: 免费的计算机编程类中文书籍,欢迎投稿

GNU General Public License v3.0pythonjavascript
weibo.com/justjavac
117.7k28.2k
Hack-with-Github/Awesome-Hacking

A collection of various awesome lists for hackers, pentesters and security researchers

Creative Commons Zero v1.0 Universalhackingsecurity
116.6k10.5k
tldr-pages/tldr

Collaborative cheatsheets for console commands 📚.

MarkdownOthershellman-page
tldr.sh
63.2k5.3k
Solido/awesome-flutter

An awesome list that curates the best Flutter libraries, tools, tutorials, articles and more.

Dartflutterawesome-list
60.7k6.9k
2dust/v2rayNG

A V2Ray client for Android, support Xray core and v2fly core

KotlinGNU General Public License v3.0androidproxy
v2rayng.2dust.link
59.9k7.8k
termux/termux-app

Termux - a terminal emulator application for Android OS extendible by variety of packages.

JavaMavenOtherandroidterminal
f-droid.org/en/packages/com.termux
57.9k7k
wasabeef/awesome-android-ui

A curated list of awesome Android UI/UX libraries

MIT Licenseandroidawesome
56.9k10.3k