1.2 Portrait mode added
This commit is contained in:
parent
fb570464c2
commit
08b06dfeb4
8 changed files with 106 additions and 5 deletions
|
|
@ -13,7 +13,6 @@
|
|||
android:theme="@style/AppTheme">
|
||||
|
||||
<activity android:name=".SplashScreen"
|
||||
android:screenOrientation="landscape"
|
||||
android:theme="@style/SplashTheme">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
|
@ -23,12 +22,10 @@
|
|||
</activity>
|
||||
|
||||
<activity android:name=".MainActivity"
|
||||
android:screenOrientation="landscape"
|
||||
android:theme="@style/AppTheme">
|
||||
</activity>
|
||||
|
||||
<activity android:name=".demo.Demo"
|
||||
android:screenOrientation="landscape"
|
||||
android:theme="@style/AppTheme">
|
||||
</activity>
|
||||
</application>
|
||||
|
|
|
|||
|
|
@ -17,13 +17,14 @@ public class MainActivity extends AppCompatActivity {
|
|||
private static final String TAG = "MainActivity";
|
||||
|
||||
private MainListViewAdapter mAdapter;
|
||||
private int mOrientation;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
|
||||
int orientation = getIntent().getIntExtra("orientation"
|
||||
mOrientation = getIntent().getIntExtra("orientation"
|
||||
, ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
||||
setRequestedOrientation(orientation);
|
||||
setRequestedOrientation(mOrientation);
|
||||
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
|
|
@ -77,6 +78,7 @@ public class MainActivity extends AppCompatActivity {
|
|||
private void startDemo() {
|
||||
|
||||
Intent intent = new Intent(this, Demo.class);
|
||||
intent.putExtra("orientation", mOrientation);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.voixtreme.voicepickingdemo.demo;
|
||||
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.util.Log;
|
||||
|
|
@ -40,6 +41,10 @@ public class Demo extends AppCompatActivity implements VoiXtremeEventListener {
|
|||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
|
||||
int orientation = getIntent().getIntExtra("orientation"
|
||||
, ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
||||
setRequestedOrientation(orientation);
|
||||
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_demo);
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 148 KiB After Width: | Height: | Size: 133 KiB |
58
voicepickingdemo/src/main/res/layout-port/activity_demo.xml
Normal file
58
voicepickingdemo/src/main/res/layout-port/activity_demo.xml
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout 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/mainBackground"
|
||||
android:keepScreenOn="true"
|
||||
android:padding="0dp"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<com.dixitmobile.common.customviews.ListViewClickVibrate
|
||||
android:id="@+id/listView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@+id/response"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_toStartOf="@+id/images"
|
||||
android:padding="8dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@id/response"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:gravity="center"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="20sp"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@id/images"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginStart="10dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/microphone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="25dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/ic_microphone_not_listening"
|
||||
android:visibility="visible"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/logo_voixtreme"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:adjustViewBounds="true"
|
||||
android:contentDescription="@null"
|
||||
android:padding="0dp"
|
||||
android:src="@drawable/logo_voixtreme"/>
|
||||
</RelativeLayout>
|
||||
39
voicepickingdemo/src/main/res/layout-port/activity_main.xml
Normal file
39
voicepickingdemo/src/main/res/layout-port/activity_main.xml
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout 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/mainBackground"
|
||||
android:keepScreenOn="true"
|
||||
android:padding="0dp"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/logo_voixtreme"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:adjustViewBounds="true"
|
||||
android:contentDescription="@null"
|
||||
android:padding="0dp"
|
||||
android:src="@drawable/logo_voixtreme"/>
|
||||
|
||||
<com.dixitmobile.common.customviews.ListViewClickVibrate
|
||||
android:id="@+id/listView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@+id/logo_hubone"
|
||||
android:layout_below="@id/logo_voixtreme"
|
||||
android:padding="8dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@id/logo_hubone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:adjustViewBounds="true"
|
||||
android:contentDescription="@null"
|
||||
android:padding="0dp"
|
||||
android:src="@drawable/logo_hubone"/>
|
||||
</RelativeLayout>
|
||||
Loading…
Add table
Add a link
Reference in a new issue