mirror of
https://github.com/fergalmoran/chrometophone.git
synced 2025-12-22 09:41:51 +00:00
Enable landscape
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.google.android.apps.chrometophone"
|
package="com.google.android.apps.chrometophone"
|
||||||
android:versionCode="11"
|
android:installLocation="auto"
|
||||||
android:versionName="2.2.0">
|
android:versionCode="12"
|
||||||
|
android:versionName="2.3.0">
|
||||||
<!-- Only this application can receive the messages and registration result -->
|
<!-- Only this application can receive the messages and registration result -->
|
||||||
<permission android:name="com.google.android.apps.chrometophone.permission.C2D_MESSAGE" android:protectionLevel="signature" />
|
<permission android:name="com.google.android.apps.chrometophone.permission.C2D_MESSAGE" android:protectionLevel="signature" />
|
||||||
<uses-permission android:name="com.google.android.apps.chrometophone.permission.C2D_MESSAGE" />
|
<uses-permission android:name="com.google.android.apps.chrometophone.permission.C2D_MESSAGE" />
|
||||||
@@ -20,8 +21,7 @@
|
|||||||
|
|
||||||
<application android:icon="@drawable/app_icon" android:label="@string/app_name">
|
<application android:icon="@drawable/app_icon" android:label="@string/app_name">
|
||||||
<activity android:name=".HistoryActivity"
|
<activity android:name=".HistoryActivity"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name">
|
||||||
android:screenOrientation="portrait">
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
@@ -30,13 +30,11 @@
|
|||||||
|
|
||||||
<activity android:name=".SetupActivity"
|
<activity android:name=".SetupActivity"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:launchMode="singleTop"
|
android:launchMode="singleTop">
|
||||||
android:screenOrientation="portrait">
|
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<activity android:name=".HelpActivity"
|
<activity android:name=".HelpActivity"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name">
|
||||||
android:screenOrientation="portrait">
|
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<activity android:name=".ShareLinkActivity">
|
<activity android:name=".ShareLinkActivity">
|
||||||
|
|||||||
@@ -60,11 +60,11 @@ public class SetupActivity extends Activity {
|
|||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
SharedPreferences prefs = Prefs.get(this);
|
SharedPreferences prefs = Prefs.get(this);
|
||||||
String deviceRegistrationID = prefs.getString("deviceRegistrationID", null);
|
int savedScreenId = prefs.getInt("savedScreenId", -1);
|
||||||
if (deviceRegistrationID != null) {
|
if (savedScreenId == -1) {
|
||||||
setScreenContent(R.layout.connected);
|
|
||||||
} else {
|
|
||||||
setScreenContent(R.layout.intro);
|
setScreenContent(R.layout.intro);
|
||||||
|
} else {
|
||||||
|
setScreenContent(savedScreenId);
|
||||||
}
|
}
|
||||||
|
|
||||||
registerReceiver(mUpdateUIReceiver, new IntentFilter(UPDATE_UI_ACTION));
|
registerReceiver(mUpdateUIReceiver, new IntentFilter(UPDATE_UI_ACTION));
|
||||||
@@ -139,6 +139,10 @@ public class SetupActivity extends Activity {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
SharedPreferences prefs = Prefs.get(this);
|
||||||
|
SharedPreferences.Editor editor = prefs.edit();
|
||||||
|
editor.putInt("savedScreenId", screenId);
|
||||||
|
editor.commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setIntroScreenContent() {
|
private void setIntroScreenContent() {
|
||||||
@@ -231,9 +235,14 @@ public class SetupActivity extends Activity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
final Context context = this;
|
||||||
Button finishButton = (Button) findViewById(R.id.finish);
|
Button finishButton = (Button) findViewById(R.id.finish);
|
||||||
finishButton.setOnClickListener(new OnClickListener() {
|
finishButton.setOnClickListener(new OnClickListener() {
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
SharedPreferences prefs = Prefs.get(context);
|
||||||
|
SharedPreferences.Editor editor = prefs.edit();
|
||||||
|
editor.putInt("savedScreenId", R.layout.connected);
|
||||||
|
editor.commit();
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user