mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 08:48:53 +02:00
Android GotoAcitivity is now HomeActivity (leaving the place for the upcoming 'Go To activity' itself
This commit is contained in:
parent
a7328f0934
commit
0f39ab0bb9
9 changed files with 24 additions and 18 deletions
|
@ -39,7 +39,7 @@
|
||||||
</activity>
|
</activity>
|
||||||
-->
|
-->
|
||||||
<activity
|
<activity
|
||||||
android:name=".GotoActivity"
|
android:name=".HomeActivity"
|
||||||
android:label="@string/go_to"
|
android:label="@string/go_to"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:theme="@style/AppTheme.NoActionBar">
|
android:theme="@style/AppTheme.NoActionBar">
|
||||||
|
|
|
@ -23,7 +23,7 @@ import android.widget.TextView;
|
||||||
import io.highfidelity.hifiinterface.QtPreloader.QtPreloader;
|
import io.highfidelity.hifiinterface.QtPreloader.QtPreloader;
|
||||||
import io.highfidelity.hifiinterface.view.DomainAdapter;
|
import io.highfidelity.hifiinterface.view.DomainAdapter;
|
||||||
|
|
||||||
public class GotoActivity extends AppCompatActivity {
|
public class HomeActivity extends AppCompatActivity {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set this intent extra param to NOT start a new InterfaceActivity after a domain is selected"
|
* Set this intent extra param to NOT start a new InterfaceActivity after a domain is selected"
|
||||||
|
@ -36,9 +36,9 @@ public class GotoActivity extends AppCompatActivity {
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_goto);
|
setContentView(R.layout.activity_home);
|
||||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||||
toolbar.setTitleTextAppearance(this, R.style.GotoActionBarTitleStyle);
|
toolbar.setTitleTextAppearance(this, R.style.HomeActionBarTitleStyle);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
|
|
||||||
ActionBar actionbar = getSupportActionBar();
|
ActionBar actionbar = getSupportActionBar();
|
||||||
|
@ -83,9 +83,9 @@ public class GotoActivity extends AppCompatActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onItemClick(View view, int position, DomainAdapter.Domain domain) {
|
public void onItemClick(View view, int position, DomainAdapter.Domain domain) {
|
||||||
Intent intent = new Intent(GotoActivity.this, InterfaceActivity.class);
|
Intent intent = new Intent(HomeActivity.this, InterfaceActivity.class);
|
||||||
intent.putExtra(InterfaceActivity.DOMAIN_URL, domain.url);
|
intent.putExtra(InterfaceActivity.DOMAIN_URL, domain.url);
|
||||||
GotoActivity.this.finish();
|
HomeActivity.this.finish();
|
||||||
if (getIntent() != null &&
|
if (getIntent() != null &&
|
||||||
getIntent().hasExtra(PARAM_NOT_START_INTERFACE_ACTIVITY) &&
|
getIntent().hasExtra(PARAM_NOT_START_INTERFACE_ACTIVITY) &&
|
||||||
getIntent().getBooleanExtra(PARAM_NOT_START_INTERFACE_ACTIVITY, false)) {
|
getIntent().getBooleanExtra(PARAM_NOT_START_INTERFACE_ACTIVITY, false)) {
|
||||||
|
@ -137,7 +137,7 @@ public class GotoActivity extends AppCompatActivity {
|
||||||
preloadTask = new AsyncTask() {
|
preloadTask = new AsyncTask() {
|
||||||
@Override
|
@Override
|
||||||
protected Object doInBackground(Object[] objects) {
|
protected Object doInBackground(Object[] objects) {
|
||||||
new QtPreloader(GotoActivity.this).initQt();
|
new QtPreloader(HomeActivity.this).initQt();
|
||||||
runOnUiThread(new Runnable() {
|
runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -154,7 +154,7 @@ public class GotoActivity extends AppCompatActivity {
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
// Inflate the menu; this adds items to the action bar if it is present.
|
// Inflate the menu; this adds items to the action bar if it is present.
|
||||||
//getMenuInflater().inflate(R.menu.menu_goto, menu);
|
//getMenuInflater().inflate(R.menu.menu_home, menu);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -200,8 +200,8 @@ public class InterfaceActivity extends QtActivity {
|
||||||
public void openGotoActivity(String activityName) {
|
public void openGotoActivity(String activityName) {
|
||||||
switch (activityName) {
|
switch (activityName) {
|
||||||
case "Goto": {
|
case "Goto": {
|
||||||
Intent intent = new Intent(this, GotoActivity.class);
|
Intent intent = new Intent(this, HomeActivity.class);
|
||||||
intent.putExtra(GotoActivity.PARAM_NOT_START_INTERFACE_ACTIVITY, true);
|
intent.putExtra(HomeActivity.PARAM_NOT_START_INTERFACE_ACTIVITY, true);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ import android.app.AlertDialog;
|
||||||
|
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
import android.util.Log;
|
|
||||||
import java.io.BufferedWriter;
|
import java.io.BufferedWriter;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileWriter;
|
import java.io.FileWriter;
|
||||||
|
@ -64,7 +64,7 @@ public class PermissionChecker extends Activity {
|
||||||
|
|
||||||
private void launchActivityWithPermissions(){
|
private void launchActivityWithPermissions(){
|
||||||
finish();
|
finish();
|
||||||
Intent i = new Intent(this, GotoActivity.class);
|
Intent i = new Intent(this, HomeActivity.class);
|
||||||
startActivity(i);
|
startActivity(i);
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
android:background="?attr/colorPrimary"
|
android:background="?attr/colorPrimary"
|
||||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" />
|
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||||
|
|
||||||
<include layout="@layout/content_goto" />
|
<include layout="@layout/content_home" />
|
||||||
|
|
||||||
</android.support.design.widget.AppBarLayout>
|
</android.support.design.widget.AppBarLayout>
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="start"
|
android:layout_gravity="start"
|
||||||
android:fitsSystemWindows="true"
|
android:fitsSystemWindows="true"
|
||||||
app:menu="@menu/menu_goto"
|
app:menu="@menu/menu_home"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</android.support.v4.widget.DrawerLayout>
|
</android.support.v4.widget.DrawerLayout>
|
|
@ -5,8 +5,8 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||||
tools:context="io.highfidelity.hifiinterface.GotoActivity"
|
tools:context="io.highfidelity.hifiinterface.HomeActivity"
|
||||||
tools:showIn="@layout/activity_goto">
|
tools:showIn="@layout/activity_home">
|
||||||
|
|
||||||
<TabHost
|
<TabHost
|
||||||
android:id="@+id/tabhost"
|
android:id="@+id/tabhost"
|
|
@ -1,7 +1,12 @@
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
tools:context="com.highfidelity.agoto.GotoActivity">
|
tools:context="io.highfidelity.hifiinterface.HomeActivity">
|
||||||
|
<item
|
||||||
|
android:id="@+id/action_goto"
|
||||||
|
android:orderInCategory="90"
|
||||||
|
android:title="@string/action_goto"
|
||||||
|
app:showAsAction="never" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_settings"
|
android:id="@+id/action_settings"
|
||||||
android:orderInCategory="100"
|
android:orderInCategory="100"
|
|
@ -9,5 +9,6 @@
|
||||||
<string name="popular">POPULAR</string>
|
<string name="popular">POPULAR</string>
|
||||||
<string name="bookmarks">BOOKMARKS</string>
|
<string name="bookmarks">BOOKMARKS</string>
|
||||||
<string name="action_settings">Settings</string>
|
<string name="action_settings">Settings</string>
|
||||||
|
<string name="action_goto">Go to</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
|
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||||
|
|
||||||
<!-- Customizing GoTo ActionBar -->
|
<!-- Customizing GoTo ActionBar -->
|
||||||
<style name="GotoActionBarTitleStyle"
|
<style name="HomeActionBarTitleStyle"
|
||||||
parent="@android:style/TextAppearance.Material.Widget.ActionBar.Title">
|
parent="@android:style/TextAppearance.Material.Widget.ActionBar.Title">
|
||||||
<item name="android:textSize">18dp</item>
|
<item name="android:textSize">18dp</item>
|
||||||
<item name="android:paddingLeft">0dp</item>
|
<item name="android:paddingLeft">0dp</item>
|
||||||
|
|
Loading…
Reference in a new issue