mirror of
https://github.com/dgis/emu48android
synced 2024-12-26 09:58:49 +01:00
- Fix issues with back button in the Settings, Help and About.
- Build with Android 4.4 support.
This commit is contained in:
parent
5e0c56d44c
commit
abf9e905cc
8 changed files with 40 additions and 77 deletions
|
@ -41,6 +41,8 @@ Version 1.2alpha (2019-03-XX)
|
|||
- Improve the scrolling issue found in Emu48 1.59+.
|
||||
- Rewrite the StretchBlt() function to improve the pixel rendering.
|
||||
- Allow to build the project with "gradlew build".
|
||||
- Fix issues with back button in the Settings, Help and About.
|
||||
- Build with Android 4.4 support.
|
||||
|
||||
|
||||
Version 1.1 (2019-03-01)
|
||||
|
@ -68,7 +70,7 @@ Note: some included files are not covered by the GPL; these include ROM image fi
|
|||
The Eric's Real scripts ("real*.kml" and "real*.bmp") are embedded in this application with the kind permission of Eric Rechlin.
|
||||
|
||||
TODO
|
||||
- Build with Android 4.0
|
||||
- Issue with random settings in Android 4.4
|
||||
- Add a separation between the pixels (Suggestion from Jaime Meza)
|
||||
- Sometimes the "busy" annunciator gets stuck
|
||||
- Add KML script loading dependencies fallback to the inner ROM (and may be KML include?)
|
||||
|
@ -117,3 +119,4 @@ DONE
|
|||
- Open Emu48 with a state (content://) file shared with it
|
||||
- Add sound switch settings
|
||||
- Pixel alignment (pixel squeeze?) issue
|
||||
- Build with Android 4.4
|
||||
|
|
|
@ -4,14 +4,13 @@ android {
|
|||
compileSdkVersion 28
|
||||
defaultConfig {
|
||||
applicationId "org.emulator.forty.eight"
|
||||
minSdkVersion 21
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 28
|
||||
versionCode 2
|
||||
versionName "1.1"
|
||||
versionCode 3
|
||||
versionName "1.2"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
//cppFlags ""
|
||||
//abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86', 'x86_64'
|
||||
//abiFilters 'x86_64'
|
||||
version "3.10.2"
|
||||
|
@ -33,11 +32,11 @@ android {
|
|||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0-alpha01'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha2'
|
||||
implementation 'com.google.android.material:material:1.1.0-alpha01'
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0-alpha02'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
|
||||
implementation 'com.google.android.material:material:1.1.0-alpha04'
|
||||
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
|
||||
androidTestImplementation 'androidx.test:runner:1.1.2-alpha01'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.2-alpha01'
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<!--android:icon="@mipmap/ic_launcher"-->
|
||||
<!--android:roundIcon="@mipmap/ic_launcher_round"-->
|
||||
<activity
|
||||
android:name="org.emulator.forty.eight.MainActivity"
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/app_name"
|
||||
android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout"
|
||||
android:launchMode="singleTop"
|
||||
|
@ -43,36 +43,19 @@
|
|||
android:mimeType="*/*"
|
||||
android:pathPattern=".*\\.e49"
|
||||
android:host="*"/>
|
||||
|
||||
<!--<data android:scheme="file"-->
|
||||
<!--android:mimeType="*/*"-->
|
||||
<!--android:pathPattern=".*\\.e38"-->
|
||||
<!--android:host="*"/>-->
|
||||
<!--<data android:scheme="file"-->
|
||||
<!--android:mimeType="*/*"-->
|
||||
<!--android:pathPattern=".*\\.e39"-->
|
||||
<!--android:host="*"/>-->
|
||||
<!--<data android:scheme="file"-->
|
||||
<!--android:mimeType="*/*"-->
|
||||
<!--android:pathPattern=".*\\.e48"-->
|
||||
<!--android:host="*"/>-->
|
||||
<!--<data android:scheme="file"-->
|
||||
<!--android:mimeType="*/*"-->
|
||||
<!--android:pathPattern=".*\\.e49"-->
|
||||
<!--android:host="*"/>-->
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name="org.emulator.forty.eight.SettingsActivity"
|
||||
android:name=".SettingsActivity"
|
||||
android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout"
|
||||
android:label="@string/title_activity_settings"
|
||||
android:parentActivityName="org.emulator.forty.eight.MainActivity">
|
||||
android:parentActivityName=".MainActivity">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value="org.emulator.forty.eight.MainActivity"/>
|
||||
</activity>
|
||||
<activity
|
||||
android:name="org.emulator.forty.eight.InfoWebActivity"
|
||||
android:name=".InfoWebActivity"
|
||||
android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout"
|
||||
android:label="@string/title_web_activity_info">
|
||||
<meta-data
|
||||
|
@ -80,7 +63,7 @@
|
|||
android:value="org.emulator.forty.eight.MainActivity" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name="org.emulator.forty.eight.InfoActivity"
|
||||
android:name=".InfoActivity"
|
||||
android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout"
|
||||
android:label="@string/title_activity_info">
|
||||
<meta-data
|
||||
|
|
|
@ -41,6 +41,8 @@ Version 1.2alpha (2019-03-XX)
|
|||
- Improve the scrolling issue found in Emu48 1.59+.
|
||||
- Rewrite the StretchBlt() function to improve the pixel rendering.
|
||||
- Allow to build the project with "gradlew build".
|
||||
- Fix issues with back button in the Settings, Help and About.
|
||||
- Build with Android 4.4 support.
|
||||
|
||||
|
||||
Version 1.1 (2019-03-01)
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package org.emulator.forty.eight;
|
||||
|
||||
import android.app.ActionBar;
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.text.method.ScrollingMovementMethod;
|
||||
import android.text.util.Linkify;
|
||||
|
@ -12,21 +10,15 @@ import android.widget.TextView;
|
|||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
public class InfoActivity extends Activity {
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class InfoActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_info);
|
||||
|
||||
// Show the Up button in the action bar.
|
||||
ActionBar actionBar = getActionBar();
|
||||
if(actionBar != null) {
|
||||
actionBar.setDisplayShowHomeEnabled(true);
|
||||
actionBar.setDisplayShowTitleEnabled(true);
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
|
||||
String filepath = getString(R.string.info_readme);
|
||||
|
||||
// Programmatically load text from an asset and place it into the
|
||||
|
@ -50,7 +42,7 @@ public class InfoActivity extends Activity {
|
|||
String text = new String(buffer);
|
||||
|
||||
// Finally stick the string into the text view.
|
||||
TextView textViewInfo = (TextView)findViewById(R.id.textViewInfo);
|
||||
TextView textViewInfo = findViewById(R.id.textViewInfo);
|
||||
textViewInfo.setMovementMethod(new ScrollingMovementMethod());
|
||||
textViewInfo.setText(text);
|
||||
Linkify.addLinks(textViewInfo, Linkify.ALL);
|
||||
|
@ -71,14 +63,6 @@ public class InfoActivity extends Activity {
|
|||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
// This ID represents the Home or Up button. In the case of this
|
||||
// activity, the Up button is shown. Use NavUtils to allow users
|
||||
// to navigate up one level in the application structure. For
|
||||
// more details, see the Navigation pattern on Android Design:
|
||||
//
|
||||
// http://developer.android.com/design/patterns/navigation.html#up-vs-back
|
||||
//
|
||||
//NavUtils.navigateUpFromSameTask(this);
|
||||
finish();
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,21 +1,20 @@
|
|||
package org.emulator.forty.eight;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.webkit.WebView;
|
||||
|
||||
public class InfoWebActivity extends Activity {
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class InfoWebActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_web_info);
|
||||
// Show the Up button in the action bar.
|
||||
//getActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
WebView webView = (WebView)findViewById(R.id.webViewInfo);
|
||||
WebView webView = findViewById(R.id.webViewInfo);
|
||||
// webView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
|
||||
// webView.setBackgroundColor(Color.LTGRAY);
|
||||
String url = getString(R.string.help_url);
|
||||
|
@ -34,14 +33,6 @@ public class InfoWebActivity extends Activity {
|
|||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
// This ID represents the Home or Up button. In the case of this
|
||||
// activity, the Up button is shown. Use NavUtils to allow users
|
||||
// to navigate up one level in the application structure. For
|
||||
// more details, see the Navigation pattern on Android Design:
|
||||
//
|
||||
// http://developer.android.com/design/patterns/navigation.html#up-vs-back
|
||||
//
|
||||
//NavUtils.navigateUpFromSameTask(this);
|
||||
finish();
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ public class SettingsActivity extends AppCompatPreferenceActivity implements Sha
|
|||
resultIntent.putExtra("changedKeys", settingsKeyChanged.toArray(new String[0]));
|
||||
setResult(Activity.RESULT_OK, resultIntent);
|
||||
finish();
|
||||
super.onBackPressed();
|
||||
//super.onBackPressed();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -126,7 +126,7 @@ public class SettingsActivity extends AppCompatPreferenceActivity implements Sha
|
|||
if(requestCode == MainActivity.INTENT_PORT2LOAD) {
|
||||
Uri uri = data.getData();
|
||||
//Log.d(TAG, "onActivityResult INTENT_PORT2LOAD " + uri.toString());
|
||||
String url = null;
|
||||
String url;
|
||||
if (uri != null) {
|
||||
url = uri.toString();
|
||||
SharedPreferences.Editor editor = sharedPreferences.edit();
|
||||
|
@ -302,15 +302,15 @@ public class SettingsActivity extends AppCompatPreferenceActivity implements Sha
|
|||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
int id = item.getItemId();
|
||||
if (id == android.R.id.home) {
|
||||
startActivity(new Intent(getActivity(), SettingsActivity.class));
|
||||
return true;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
// @Override
|
||||
// public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// int id = item.getItemId();
|
||||
// if (id == android.R.id.home) {
|
||||
// startActivity(new Intent(getActivity(), SettingsActivity.class));
|
||||
// return true;
|
||||
// }
|
||||
// return super.onOptionsItemSelected(item);
|
||||
// }
|
||||
|
||||
public void updatePort2LoadFilename(String port2Filename) {
|
||||
if(preferencePort2load != null) {
|
||||
|
@ -318,6 +318,7 @@ public class SettingsActivity extends AppCompatPreferenceActivity implements Sha
|
|||
try {
|
||||
displayName = Utils.getFileName(getActivity(), port2Filename);
|
||||
} catch (Exception e) {
|
||||
// Do nothing
|
||||
}
|
||||
preferencePort2load.setSummary(displayName);
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ buildscript {
|
|||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.3.1'
|
||||
classpath 'com.android.tools.build:gradle:3.3.2'
|
||||
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
|
|
Loading…
Reference in a new issue