Code Monkey home page Code Monkey logo

draglayout-1's Introduction

#DragLayout 基于BlueMorDragLayout二次开发, 简化其使用过程. 在原来的基础上支持代码生成 由于实现的效果没有变化,So.图我也就没有换了.

#Import

  • supportV4
  • nineoldandroids

#Change Log

  • 修改其滑动范围可控
  • 在原来的基础上支持代码生成
  • 修改将其主布局控制放入DragLayout,不再限制于原来的MyRelativeLayout
  • 移除了原来的shadowImageView

#Usage

  • 在代码中使用
setContentView(R.id.xx)
DragLayout layout = new DragLayout(this);
final SlideMenu menu = new SlideMenu(this);//侧滑菜单
layout.updateRangeRatio(0.5f);//滑动范围
layout.setBackgroundResource(R.drawable.icon_bg_slide);//主背景
layout.attachToActivity(this, menu);//after setBackground
layout.setOnDragStateListener(new OnDragStateListener() {

      @Override
      public void onOpen() {
      }
      
      @Override
      public void onDrag(float percent) {
      }
      
      @Override
      public void onClose() {
      }
});
  • 在XML中使用
  <DragLayout>
  
    <!--SlideMenu Layout -->
    <ViewGroup>
    </ViewGroup>
    
    <!-- Main Layout -->
    <ViewGroup>
    </Viewgroup>
    
  </DragLayout>

#Thanks Developers @BlueMor DragLayout

#About me 黎稀

#Contact me [email protected]

#License

Copyright (c) 2015 lixi

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.
Come on, don't tell me you read that.

draglayout-1's People

Contributors

lixi0912 avatar

Watchers

James Cloos avatar xzhelp.net avatar

Forkers

bluesdragon

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.