mirror of
				https://github.com/SimpleMobileTools/Simple-Flashlight.git
				synced 2025-06-05 21:59:19 +02:00 
			
		
		
		
	fix #55, allow landscape mode
This commit is contained in:
		| @@ -43,6 +43,7 @@ android { | |||||||
| dependencies { | dependencies { | ||||||
|     implementation 'com.simplemobiletools:commons:3.18.6' |     implementation 'com.simplemobiletools:commons:3.18.6' | ||||||
|     implementation 'com.squareup:otto:1.3.8' |     implementation 'com.squareup:otto:1.3.8' | ||||||
|  |     implementation 'com.android.support.constraint:constraint-layout:1.0.2' | ||||||
| } | } | ||||||
|  |  | ||||||
| Properties props = new Properties() | Properties props = new Properties() | ||||||
|   | |||||||
| @@ -38,7 +38,6 @@ | |||||||
|  |  | ||||||
|         <activity |         <activity | ||||||
|             android:name=".activities.MainActivity" |             android:name=".activities.MainActivity" | ||||||
|             android:screenOrientation="portrait" |  | ||||||
|             android:theme="@style/AppTheme"/> |             android:theme="@style/AppTheme"/> | ||||||
|  |  | ||||||
|         <activity |         <activity | ||||||
| @@ -50,9 +49,7 @@ | |||||||
|             </intent-filter> |             </intent-filter> | ||||||
|         </activity> |         </activity> | ||||||
|  |  | ||||||
|         <activity |         <activity android:name=".activities.BrightDisplayActivity"/> | ||||||
|             android:name=".activities.BrightDisplayActivity" |  | ||||||
|             android:screenOrientation="portrait"/> |  | ||||||
|  |  | ||||||
|         <activity |         <activity | ||||||
|             android:name=".activities.SettingsActivity" |             android:name=".activities.SettingsActivity" | ||||||
|   | |||||||
| @@ -1,44 +1,70 @@ | |||||||
| <?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||||
| <LinearLayout | <ScrollView | ||||||
|     xmlns:android="http://schemas.android.com/apk/res/android" |     xmlns:android="http://schemas.android.com/apk/res/android" | ||||||
|     android:id="@+id/main_holder" |     xmlns:app="http://schemas.android.com/apk/res-auto" | ||||||
|  |     android:id="@+id/main_scrollview" | ||||||
|     android:layout_width="match_parent" |     android:layout_width="match_parent" | ||||||
|     android:layout_height="match_parent" |     android:layout_height="match_parent" | ||||||
|     android:gravity="center" |     android:fillViewport="true"> | ||||||
|     android:orientation="vertical" |  | ||||||
|     android:padding="@dimen/activity_margin"> |  | ||||||
|  |  | ||||||
|     <ImageView |     <android.support.constraint.ConstraintLayout | ||||||
|         android:id="@+id/toggle_btn" |         android:id="@+id/main_holder" | ||||||
|         android:layout_width="@dimen/main_button_size" |         android:layout_width="match_parent" | ||||||
|         android:layout_height="@dimen/main_button_size" |         android:layout_height="wrap_content"> | ||||||
|         android:layout_marginBottom="@dimen/activity_margin" |  | ||||||
|         android:background="@drawable/circles_big"/> |  | ||||||
|  |  | ||||||
|     <ImageView |         <ImageView | ||||||
|         android:id="@+id/bright_display_btn" |             android:id="@+id/toggle_btn" | ||||||
|         android:layout_width="wrap_content" |             android:layout_width="@dimen/main_button_size" | ||||||
|         android:layout_height="wrap_content" |             android:layout_height="@dimen/main_button_size" | ||||||
|         android:layout_marginBottom="@dimen/activity_margin" |             android:layout_marginBottom="@dimen/activity_margin" | ||||||
|         android:layout_marginTop="@dimen/buttons_margin" |             android:layout_marginTop="@dimen/activity_margin" | ||||||
|         android:background="@drawable/ic_bright_display" |             android:background="@drawable/circles_big" | ||||||
|         android:padding="@dimen/activity_margin"/> |             app:layout_constraintBottom_toTopOf="@+id/bright_display_btn" | ||||||
|  |             app:layout_constraintEnd_toEndOf="parent" | ||||||
|  |             app:layout_constraintHorizontal_bias="0.5" | ||||||
|  |             app:layout_constraintStart_toStartOf="parent" | ||||||
|  |             app:layout_constraintTop_toTopOf="parent"/> | ||||||
|  |  | ||||||
|     <ImageView |         <ImageView | ||||||
|         android:id="@+id/stroboscope_btn" |             android:id="@+id/bright_display_btn" | ||||||
|         android:layout_width="wrap_content" |             android:layout_width="wrap_content" | ||||||
|         android:layout_height="wrap_content" |             android:layout_height="wrap_content" | ||||||
|         android:layout_marginTop="@dimen/buttons_margin" |             android:layout_marginBottom="@dimen/activity_margin" | ||||||
|         android:background="@drawable/ic_stroboscope" |             android:layout_marginTop="@dimen/buttons_margin" | ||||||
|         android:padding="@dimen/activity_margin"/> |             android:background="@drawable/ic_bright_display" | ||||||
|  |             android:padding="@dimen/activity_margin" | ||||||
|  |             app:layout_constraintBottom_toTopOf="@+id/stroboscope_btn" | ||||||
|  |             app:layout_constraintEnd_toEndOf="parent" | ||||||
|  |             app:layout_constraintHorizontal_bias="0.5" | ||||||
|  |             app:layout_constraintStart_toStartOf="parent" | ||||||
|  |             app:layout_constraintTop_toBottomOf="@+id/toggle_btn"/> | ||||||
|  |  | ||||||
|     <com.simplemobiletools.commons.views.MySeekBar |         <ImageView | ||||||
|         android:id="@+id/stroboscope_bar" |             android:id="@+id/stroboscope_btn" | ||||||
|         android:layout_width="@dimen/seekbar_width" |             android:layout_width="wrap_content" | ||||||
|         android:layout_height="wrap_content" |             android:layout_height="wrap_content" | ||||||
|         android:layout_margin="@dimen/activity_margin" |             android:layout_marginTop="@dimen/buttons_margin" | ||||||
|         android:paddingBottom="@dimen/medium_margin" |             android:background="@drawable/ic_stroboscope" | ||||||
|         android:paddingTop="@dimen/medium_margin" |             android:padding="@dimen/activity_margin" | ||||||
|         android:visibility="invisible"/> |             app:layout_constraintBottom_toTopOf="@+id/stroboscope_bar" | ||||||
|  |             app:layout_constraintEnd_toEndOf="parent" | ||||||
|  |             app:layout_constraintHorizontal_bias="0.5" | ||||||
|  |             app:layout_constraintStart_toStartOf="parent" | ||||||
|  |             app:layout_constraintTop_toBottomOf="@+id/bright_display_btn"/> | ||||||
|  |  | ||||||
| </LinearLayout> |         <com.simplemobiletools.commons.views.MySeekBar | ||||||
|  |             android:id="@+id/stroboscope_bar" | ||||||
|  |             android:layout_width="@dimen/seekbar_width" | ||||||
|  |             android:layout_height="wrap_content" | ||||||
|  |             android:layout_margin="@dimen/activity_margin" | ||||||
|  |             android:paddingBottom="@dimen/medium_margin" | ||||||
|  |             android:paddingTop="@dimen/medium_margin" | ||||||
|  |             android:visibility="invisible" | ||||||
|  |             app:layout_constraintBottom_toBottomOf="parent" | ||||||
|  |             app:layout_constraintEnd_toEndOf="parent" | ||||||
|  |             app:layout_constraintHorizontal_bias="0.5" | ||||||
|  |             app:layout_constraintStart_toStartOf="parent" | ||||||
|  |             app:layout_constraintTop_toBottomOf="@+id/stroboscope_btn"/> | ||||||
|  |  | ||||||
|  |     </android.support.constraint.ConstraintLayout> | ||||||
|  | </ScrollView> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user