BVB Source Codes

android-viewflow Show CircleViewFlowExample.java Source code

Return Download android-viewflow: download CircleViewFlowExample.java Source code - Download android-viewflow Source code - Type:.java
  1. /*
  2.  * Copyright (C) 2011 Patrik 乲erfeldt
  3.  *
  4.  * Licensed under the Apache License, Version 2.0 (the "License");
  5.  * you may not use this file except in compliance with the License.
  6.  * You may obtain a copy of the License at
  7.  *
  8.  *      http://www.apache.org/licenses/LICENSE-2.0
  9.  *
  10.  * Unless required by applicable law or agreed to in writing, software
  11.  * distributed under the License is distributed on an "AS IS" BASIS,
  12.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13.  * See the License for the specific language governing permissions and
  14.  * limitations under the License.
  15.  */
  16. package org.taptwo.android.widget.viewflow.example;
  17.  
  18. import org.taptwo.android.widget.CircleFlowIndicator;
  19. import org.taptwo.android.widget.ViewFlow;
  20.  
  21. import android.app.Activity;
  22. import android.content.res.Configuration;
  23. import android.os.Bundle;
  24.  
  25. public class CircleViewFlowExample extends Activity {
  26.  
  27.         private ViewFlow viewFlow;
  28.  
  29.         /** Called when the activity is first created. */
  30.         @Override
  31.         public void onCreate(Bundle savedInstanceState) {
  32.                 super.onCreate(savedInstanceState);
  33.                 setTitle(R.string.circle_title);
  34.                 setContentView(R.layout.circle_layout);
  35.  
  36.                 viewFlow = (ViewFlow) findViewById(R.id.viewflow);
  37.                 viewFlow.setAdapter(new ImageAdapter(this), 5);
  38.                 CircleFlowIndicator indic = (CircleFlowIndicator) findViewById(R.id.viewflowindic);
  39.                 viewFlow.setFlowIndicator(indic);
  40.         }
  41.         /* If your min SDK version is < 8 you need to trigger the onConfigurationChanged in ViewFlow manually, like this */    
  42.         @Override
  43.         public void onConfigurationChanged(Configuration newConfig) {
  44.                 super.onConfigurationChanged(newConfig);
  45.                 viewFlow.onConfigurationChanged(newConfig);
  46.         }
  47. }
downloadCircleViewFlowExample.java Source code - Download android-viewflow Source code
Related Source Codes/Software:
onionshare - Securely and anonymously share a file of any size ... 2017-04-16
Android-ItemTouchHelper-Demo - Basic example of using ItemTouchHelper to add drag... 2017-04-16
later - A javascript library for defining recurring schedu... 2017-04-16
x64dbg - An open-source x64/x32 debugger for windows. ... 2017-04-16
pencil - Multiplatform GUI Prototyping/Wireframing 2017-04-16
css-in-js - React: CSS in JS techniques comparison. 2017-04-16
st2 - StackStorm (aka IFTTT for Ops) is event-driven aut... 2017-04-16
WNXHuntForCity - City find By Objective - C 2017-04-16
tmate - Instant Terminal Sharing ht... 2017-04-16
dat.gui - dat.gui is a lightweight controller library for Ja... 2017-04-16
EventStore - The open-source, functional database with Complex ... 2017-04-23
screencat - 2017-04-23
viz.js - A hack to put Graphviz on the web. ... 2017-04-23
JKeyboardPanelSwitch - For resolve the layout conflict when keybord & amp... 2017-04-23
mama2 - Mother plan - all firewood high flame 2017-04-23
BlurEffectForAndroidDesign - Sample to show how to implement blur graphical tri... 2017-04-23
sphinx_rtd_theme - Sphinx theme for readthedocs.org 2017-04-23
rouge - A pure-ruby code highlighter that is compatible wi... 2017-04-23
spring-security-oauth - Support for adding OAuth1(a) and OAuth2 features (... 2017-04-23
Toucan - Fabulous Image Processing in Swift 2017-04-23

 Back to top