mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-07 03:22:27 +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
|
||||
android:name=".GotoActivity"
|
||||
android:name=".HomeActivity"
|
||||
android:label="@string/go_to"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/AppTheme.NoActionBar">
|
||||
|
|
|
@ -23,7 +23,7 @@ import android.widget.TextView;
|
|||
import io.highfidelity.hifiinterface.QtPreloader.QtPreloader;
|
||||
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"
|
||||
|
@ -36,9 +36,9 @@ public class GotoActivity extends AppCompatActivity {
|
|||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_goto);
|
||||
setContentView(R.layout.activity_home);
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
toolbar.setTitleTextAppearance(this, R.style.GotoActionBarTitleStyle);
|
||||
toolbar.setTitleTextAppearance(this, R.style.HomeActionBarTitleStyle);
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
ActionBar actionbar = getSupportActionBar();
|
||||
|
@ -83,9 +83,9 @@ public class GotoActivity extends AppCompatActivity {
|
|||
|
||||
@Override
|
||||
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);
|
||||
GotoActivity.this.finish();
|
||||
HomeActivity.this.finish();
|
||||
if (getIntent() != null &&
|
||||
getIntent().hasExtra(PARAM_NOT_START_INTERFACE_ACTIVITY) &&
|
||||
getIntent().getBooleanExtra(PARAM_NOT_START_INTERFACE_ACTIVITY, false)) {
|
||||
|
@ -137,7 +137,7 @@ public class GotoActivity extends AppCompatActivity {
|
|||
preloadTask = new AsyncTask() {
|
||||
@Override
|
||||
protected Object doInBackground(Object[] objects) {
|
||||
new QtPreloader(GotoActivity.this).initQt();
|
||||
new QtPreloader(HomeActivity.this).initQt();
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
@ -154,7 +154,7 @@ public class GotoActivity extends AppCompatActivity {
|
|||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
// 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;
|
||||
}
|
||||
|
|
@ -200,8 +200,8 @@ public class InterfaceActivity extends QtActivity {
|
|||
public void openGotoActivity(String activityName) {
|
||||
switch (activityName) {
|
||||
case "Goto": {
|
||||
Intent intent = new Intent(this, GotoActivity.class);
|
||||
intent.putExtra(GotoActivity.PARAM_NOT_START_INTERFACE_ACTIVITY, true);
|
||||
Intent intent = new Intent(this, HomeActivity.class);
|
||||
intent.putExtra(HomeActivity.PARAM_NOT_START_INTERFACE_ACTIVITY, true);
|
||||
startActivity(intent);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import android.app.AlertDialog;
|
|||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import android.util.Log;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
|
@ -64,7 +64,7 @@ public class PermissionChecker extends Activity {
|
|||
|
||||
private void launchActivityWithPermissions(){
|
||||
finish();
|
||||
Intent i = new Intent(this, GotoActivity.class);
|
||||
Intent i = new Intent(this, HomeActivity.class);
|
||||
startActivity(i);
|
||||
finish();
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
android:background="?attr/colorPrimary"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||
|
||||
<include layout="@layout/content_goto" />
|
||||
<include layout="@layout/content_home" />
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
|||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:fitsSystemWindows="true"
|
||||
app:menu="@menu/menu_goto"
|
||||
app:menu="@menu/menu_home"
|
||||
/>
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
|
@ -5,8 +5,8 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:context="io.highfidelity.hifiinterface.GotoActivity"
|
||||
tools:showIn="@layout/activity_goto">
|
||||
tools:context="io.highfidelity.hifiinterface.HomeActivity"
|
||||
tools:showIn="@layout/activity_home">
|
||||
|
||||
<TabHost
|
||||
android:id="@+id/tabhost"
|
|
@ -1,7 +1,12 @@
|
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
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
|
||||
android:id="@+id/action_settings"
|
||||
android:orderInCategory="100"
|
|
@ -9,5 +9,6 @@
|
|||
<string name="popular">POPULAR</string>
|
||||
<string name="bookmarks">BOOKMARKS</string>
|
||||
<string name="action_settings">Settings</string>
|
||||
<string name="action_goto">Go to</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||
|
||||
<!-- Customizing GoTo ActionBar -->
|
||||
<style name="GotoActionBarTitleStyle"
|
||||
<style name="HomeActionBarTitleStyle"
|
||||
parent="@android:style/TextAppearance.Material.Widget.ActionBar.Title">
|
||||
<item name="android:textSize">18dp</item>
|
||||
<item name="android:paddingLeft">0dp</item>
|
||||
|
|
Loading…
Reference in a new issue