66 lines
2.3 KiB
Java
66 lines
2.3 KiB
Java
package app.fedilab.nitterizeme;
|
|
/* Copyright 2020 Thomas Schneider
|
|
*
|
|
* This file is a part of NitterizeMe
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it under the terms of the
|
|
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
|
|
* License, or (at your option) any later version.
|
|
*
|
|
* NitterizeMe is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
|
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
|
* Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along with NitterizeMe; if not,
|
|
* see <http://www.gnu.org/licenses>. */
|
|
import android.os.Bundle;
|
|
|
|
|
|
import androidx.appcompat.app.AppCompatActivity;
|
|
import androidx.appcompat.widget.Toolbar;
|
|
|
|
import android.view.Menu;
|
|
import android.view.MenuItem;
|
|
|
|
public class MainActivity extends AppCompatActivity {
|
|
|
|
@SuppressWarnings("unused")
|
|
public static String TAG = "NitterizeMe";
|
|
public static String SET_NITTER_HOST = "set_nitter_host";
|
|
public static String DEFAULT_NITTER_HOST = "nitter.net";
|
|
public static String SET_INVIDIOUS_HOST = "set_invidious_host";
|
|
public static String DEFAULT_INVIDIOUS_HOST = "invidious.net";
|
|
public static final String APP_PREFS = "app_prefs";
|
|
|
|
@Override
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
super.onCreate(savedInstanceState);
|
|
setContentView(R.layout.activity_main);
|
|
Toolbar toolbar = findViewById(R.id.toolbar);
|
|
setSupportActionBar(toolbar);
|
|
|
|
}
|
|
|
|
@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_main, menu);
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public boolean onOptionsItemSelected(MenuItem item) {
|
|
// Handle action bar item clicks here. The action bar will
|
|
// automatically handle clicks on the Home/Up button, so long
|
|
// as you specify a parent activity in AndroidManifest.xml.
|
|
int id = item.getItemId();
|
|
|
|
//noinspection SimplifiableIfStatement
|
|
if (id == R.id.action_about) {
|
|
return true;
|
|
}
|
|
|
|
return super.onOptionsItemSelected(item);
|
|
}
|
|
}
|