Giter VIP home page Giter VIP logo

oschina-app's Introduction

OSChina Android 客户端

##写在前面的话 从2.3版本开始,项目已经完成了gradle化,完全迁移到了android studio,如果想使用eclipse进行该项目的学习,可以clone tag v2.2.1,不过需要注意的是,eclipse需要按照开发环境中提到的:进行butterknife注解设置

##开发环境 由于使用了较多的Eclipse项目Library,项目目前使用的是Eclipse。需要提示的是,由于butterknife注解特性,Eclipse需要开启注解功能,详细方法参考这里。对于使用Android Studio的开发者,可能你们需要等待一段时间,项目目前正在Gradle化。当然,我们也欢迎由你来转换项目并通过PullRequest提交给我们,充分发挥社区化协作的优势。

##项目简述

  1. 底部导航
    • 主界面的底部TAB导航采用FragmentTabHost点击底部按钮时切换Fragment。中间的快捷操作按钮使用的是自定义dialog,通过点击时加入动画效果实现。
  2. 一级界面
    • 包括资讯、动弹两个模块,采用ViewPagerFragment根据滑动到不同页面显示不同信息。
  3. 详情界面
    • 详情界面包括博客详情动弹详情新闻详情帖子详情活动详情等……是通过在Fragment中的WebView直接loadData()加载一段html数据并显示。
    • 而详情Fragment的显示则是通过一个外部DetailActivity,来根据传入的参数不同来加载不同的Fragment。
  4. 链接跳转
    • 整个应用打开链接的规则都定义在UIHelper.openBrowser()方法中,本方法会根据不同的url去解析,如果是www.oschina.net的链接,则会调用相应的界面去展示;如果是git.oschina.net我们目前会使用手机自带的浏览器打开(之后会改为使用OscGit客户端打开);如果不是oschina的站内链接,则使用内置浏览器打开。
  5. 侧滑菜单
    • 侧滑菜单采用系统的DrawerLayout实现。关于很多朋友好奇的左上角箭头,是采用的开源控件DrawerArrowDrawable(准确的说不应该是控件而是一个Drawable)

##依赖包介绍

  1. jar包依赖
  1. 源码依赖
  • PhotoView-library :用于图片预览界面展示
  • UmengShareLib :用于分享到第三方平台

##开源协议 Copyright (C) 2014, The OSChina Open Source Project

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

oschina-app's People

Contributors

hixing avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.