Skip to content

Commit

Permalink
+ Added sliding bar
Browse files Browse the repository at this point in the history
  • Loading branch information
fcdimitr committed Feb 12, 2014
1 parent 3e10b7d commit e7f7119
Show file tree
Hide file tree
Showing 31 changed files with 4,005 additions and 773 deletions.
27 changes: 12 additions & 15 deletions AppSpecificOrientation/build.gradle
Original file line number Diff line number Diff line change
@@ -1,31 +1,28 @@
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.7.+'
}
}
apply plugin: 'android'

repositories {
mavenCentral()
}

android {
compileSdkVersion 19
buildToolsVersion "19.0.1"

defaultConfig {
minSdkVersion 7
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}

dependencies {
compile 'com.android.support:appcompat-v7:+'
compile fileTree(dir: 'libs', include: '*.jar')
compile files('libs/wversionmanager-1.1.jar')
compile files('libs/GoogleAdMobAdsSdk-6.4.1.jar')
compile files('libs/adcolony.jar')
compile files('libs/appflood-2.1.jar')
compile files('libs/GoogleAdMobAdsSdk-6.4.1.jar')
compile files('libs/wversionmanager-1.1.jar')
compile project(':slidingbar')
}
2 changes: 1 addition & 1 deletion AppSpecificOrientation/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
android:label="@string/app_name"
android:theme="@style/AppTheme"
android:name=".AppSpecificOrientation"
android:debuggable="false">
android:debuggable="true">
<activity
android:name=".HelperActivity"
android:noHistory="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
import com.appflood.AFBannerView;
import com.appflood.AppFlood;
import com.appflood.AppFlood.AFRequestDelegate;
import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu;
import com.jeremyfeinstein.slidingmenu.lib.app.SlidingActivity;

import org.json.JSONObject;

Expand All @@ -54,6 +56,7 @@ public class MainActivity extends Activity implements View.OnClickListener {
private AppSpecificOrientation myapp;
private Vibrator vibe;
private ListView lv;
private SlidingMenu menu;
private Button buttonClearAll;
private ImageView orientationButton;
private ContentObserver rotationObserver = new ContentObserver(new Handler()) {
Expand Down Expand Up @@ -88,7 +91,7 @@ protected void onStop() {
}

@Override
protected void onCreate(Bundle savedInstanceState) {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
myapp = (AppSpecificOrientation) getApplication();
setContentView(R.layout.activity_main);
Expand Down Expand Up @@ -126,6 +129,15 @@ public void run() {
names = new ArrayList<String>();
// if (myapp.loadDonate("appflood2")) AppFlood.showFullScreen(this);
myapp.configureAdColony(this);
menu = new SlidingMenu(this);
menu.setMode(SlidingMenu.LEFT);
menu.setTouchModeAbove(SlidingMenu.TOUCHMODE_MARGIN);
menu.setShadowWidthRes(R.dimen.shadow_width);
menu.setShadowDrawable(R.drawable.shadow);
menu.setBehindOffsetRes(R.dimen.slidingmenu_offset);
menu.setFadeDegree(0.35f);
menu.attachToActivity(this,SlidingMenu.SLIDING_WINDOW);
menu.setMenu(R.layout.slidingmenu);
buttonClearAll = (Button) findViewById(R.id.button2);
vibe = (Vibrator) this.getSystemService(Context.VIBRATOR_SERVICE);
orientationButton = (ImageView) findViewById(R.id.orientationButton);
Expand Down Expand Up @@ -410,6 +422,9 @@ public boolean onOptionsItemSelected(MenuItem item) {
case R.id.license:
startActivity(new Intent(this, License.class));
break;
case android.R.id.home:
menu.toggle();
return true;
}
return true;
}
Expand Down
9 changes: 9 additions & 0 deletions AppSpecificOrientation/src/main/res/drawable/shadow.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >

<gradient
android:endColor="#33000000"
android:centerColor="#11000000"
android:startColor="#00000000" />

</shape>
62 changes: 62 additions & 0 deletions AppSpecificOrientation/src/main/res/layout/slidingmenu.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">


<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/setOnBoot"
android:textSize="16sp"
android:id="@+id/sliding_menu_1"
/>

<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/permNotification"
android:textSize="16sp"
android:id="@+id/sliding_menu_2"
android:layout_below="@id/sliding_menu_1"
/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/howTo"
android:textSize="16sp"
android:id="@+id/sliding_menu_3"
android:layout_below="@+id/sliding_menu_2"
android:layout_marginLeft="15dp"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/about"
android:textSize="16sp"
android:id="@+id/sliding_menu_4"
android:layout_below="@+id/sliding_menu_3"
android:layout_marginLeft="15dp"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/donate"
android:textSize="16sp"
android:id="@+id/sliding_menu_5"
android:layout_below="@+id/sliding_menu_4"
android:layout_marginLeft="15dp"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/titleLicense"
android:textSize="16sp"
android:id="@+id/sliding_menu_6"
android:layout_below="@+id/sliding_menu_5"
android:layout_marginLeft="15dp"/>

</RelativeLayout>
3 changes: 3 additions & 0 deletions AppSpecificOrientation/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="slidingmenu_offset">60dp</dimen>
<dimen name="list_padding">10dp</dimen>
<dimen name="shadow_width">15dp</dimen>
</resources>
Loading

0 comments on commit e7f7119

Please sign in to comment.