Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layout updated, more similar of the expected view #5

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 40 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,41 @@
*.iml
.gradle
/local.properties
/.idea
# Custom
_site

# Ant
MANIFEST.MF
./*.jar
build.num
build

# ADT
.classpath
.project
.settings
local.properties
bin
gen
_layouts
proguard.cfg
-

# OSX
.DS_Store
/build
/captures

# Github
gh-pages

# Gradle
.gradle
build

# IDEA
*.iml
*.ipr
*.iws
out
.idea

# Maven
target
release.properties
pom.xml.*
1 change: 0 additions & 1 deletion .idea/.name

This file was deleted.

22 changes: 0 additions & 22 deletions .idea/compiler.xml

This file was deleted.

3 changes: 0 additions & 3 deletions .idea/copyright/profiles_settings.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/encodings.xml

This file was deleted.

25 changes: 0 additions & 25 deletions .idea/gradle.xml

This file was deleted.

69 changes: 0 additions & 69 deletions .idea/misc.xml

This file was deleted.

10 changes: 0 additions & 10 deletions .idea/modules.xml

This file was deleted.

12 changes: 0 additions & 12 deletions .idea/runConfigurations.xml

This file was deleted.

1 change: 0 additions & 1 deletion app/.gitignore

This file was deleted.

21 changes: 10 additions & 11 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
buildToolsVersion "23.0.3"

defaultConfig {
applicationId "com.yalantis.horizon"
Expand All @@ -17,19 +17,18 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
signingConfigs {
release {
storeFile file(RELEASE_STORE_FILE)
storePassword RELEASE_KEYSTORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS_NAME
keyPassword RELEASE_KEY_ALIAS_PASSWORD
}
}
// signingConfigs {
// release {
// storeFile file(RELEASE_STORE_FILE)
// storePassword RELEASE_KEYSTORE_PASSWORD
// keyAlias RELEASE_KEY_ALIAS_NAME
// keyPassword RELEASE_KEY_ALIAS_PASSWORD
// }
// }
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:appcompat-v7:24.0.0-alpha1'
compile project(':horizon')
}
1 change: 0 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<activity android:name="com.yalantis.horizon.DemoActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/yalantis/horizon/DemoActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_demo);
glSurfaceView = (GLSurfaceView) findViewById(R.id.gl_surface);
mHorizon = new Horizon(glSurfaceView, getResources().getColor(R.color.background),
mHorizon = new Horizon(glSurfaceView, getResources().getColor(R.color.background_color),
RECORDER_SAMPLE_RATE, RECORDER_CHANNELS, RECORDER_ENCODING_BIT);
mHorizon.setMaxVolumeDb(MAX_DECIBELS);
}
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/drawable/recording_icon.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval" >
<solid android:color="@color/accent_red"/>
</shape>
41 changes: 33 additions & 8 deletions app/src/main/res/layout/activity_demo.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/background"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.yalantis.horizon.DemoActivity">
android:background="@color/background_color">

<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?android:attr/actionBarSize"
android:background="@color/toolbar_color">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:gravity="center_horizontal">

<View
android:layout_width="20dp"
android:layout_height="20dp"
android:background="@drawable/recording_icon"
android:layout_gravity="center_vertical"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textColor="@android:color/white"
android:text="@string/recording"
android:padding="16dp"
android:gravity="center_vertical"/>

</LinearLayout>

</android.support.v7.widget.Toolbar>

<android.opengl.GLSurfaceView
android:id="@+id/gl_surface"
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_gravity="center" />
android:layout_gravity="center"/>

</FrameLayout>
9 changes: 5 additions & 4 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
<color name="background">#354852</color>
<color name="status_color">#2A3B3F</color>
<color name="background_color">#3D565D</color>
<color name="toolbar_color">#34494D</color>
<color name="accent">#4ACDB1</color>
<color name="accent_red">#EB7F79</color>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<resources>
<string name="app_name">Horizon</string>
<string name="recording">Recording…</string>
</resources>
12 changes: 4 additions & 8 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/toolbar_color</item>
<item name="colorPrimaryDark">@color/status_color</item>
<item name="colorAccent">@color/accent</item>
</style>

</resources>
1 change: 0 additions & 1 deletion horizon/.gitignore

This file was deleted.