Fix some layout & coding issues

- Split GalaxyActivity
 - Removed redundant codes
 - ReImplemented NavDrawer
 - Formated XMLs
 - Fix download images over wifi
 - Add NestedScrolling on AppList
 - Remove stray progressbar
This commit is contained in:
Mr. Dragon
2018-02-23 17:45:32 +05:30
parent d0e537f0e9
commit 6ff497c003
59 changed files with 1284 additions and 1685 deletions

View File

@@ -19,7 +19,7 @@
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:banner="@mipmap/ic_launcher"
android:theme="@style/AppTheme.Dark"
android:theme="@style/AppTheme"
android:supportsRtl="true">
<provider
android:name="in.dragons.galaxy.FileProvider"

View File

@@ -1,13 +1,12 @@
package in.dragons.galaxy;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
@@ -16,11 +15,9 @@ import com.squareup.picasso.Picasso;
public class AboutActivity extends GalaxyActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
setTheme(sharedPreferences.getBoolean("THEME", true) ? R.style.AppTheme : R.style.AppTheme_Dark);
super.onCreate(savedInstanceState);
setContentView(R.layout.about_activity_layout);
super.onCreateDrawer(savedInstanceState);
FrameLayout contentFrameLayout = (FrameLayout) findViewById(R.id.content_frame);
getLayoutInflater().inflate(R.layout.app_abt_inc, contentFrameLayout);
drawVersion();
drawActions();

View File

@@ -1,15 +1,14 @@
package in.dragons.galaxy;
import android.content.SharedPreferences;
import android.content.res.ColorStateList;
import android.os.Build;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.design.widget.FloatingActionButton;
import android.support.v4.widget.ImageViewCompat;
import android.view.Display;
import android.view.View;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
@@ -22,18 +21,17 @@ import java.util.TimeZone;
public class AccountsActivity extends GalaxyActivity {
AccountTypeDialogBuilder accountTypeDialogBuilder = new AccountTypeDialogBuilder(this);
SharedPreferences sharedPreferences;
String deviceName;
ImageView spoofed;
@Override
protected void onCreate(Bundle savedInstanceState) {
sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
setTheme(sharedPreferences.getBoolean("THEME", true) ? R.style.AppTheme : R.style.AppTheme_Dark);
super.onCreate(savedInstanceState);
setContentView(R.layout.accounts_layout);
onCreateDrawer(savedInstanceState);
FrameLayout contentFrameLayout = (FrameLayout) findViewById(R.id.content_frame);
getLayoutInflater().inflate(R.layout.app_acc_inc, contentFrameLayout);
notifyConnected(this);
deviceName = sharedPreferences.getString(PreferenceActivity.PREFERENCE_DEVICE_TO_PRETEND_TO_BE, "");
@@ -45,15 +43,10 @@ public class AccountsActivity extends GalaxyActivity {
drawDevice();
if (isValidEmail(Email) && isConnected()) {
new GoogleAccountInfo(Email) {
@Override
public void onPostExecute(String result) {
parseRAW(result);
}
}.execute();
drawGoogle();
} else if (isDummyEmail())
drawDummy();
setFab();
}
@@ -116,8 +109,13 @@ public class AccountsActivity extends GalaxyActivity {
((LinearLayout) findViewById(R.id.google_container)).setVisibility(View.VISIBLE);
((LinearLayout) findViewById(R.id.google_action)).setVisibility(View.VISIBLE);
((LinearLayout) findViewById(R.id.no_google)).setVisibility(View.GONE);
TextView googleName = (TextView) findViewById(R.id.google_name);
googleName.setText(sharedPreferences.getString("GOOGLE_NAME", ""));
TextView googleEmail = (TextView) findViewById(R.id.google_email);
googleEmail.setText(Email);
TextView gsfIdView = (TextView) findViewById(R.id.google_gsf);
gsfIdView.setText("GSF ID : " + sharedPreferences.getString(PlayStoreApiAuthenticator.PREFERENCE_GSF_ID, ""));
@@ -127,6 +125,8 @@ public class AccountsActivity extends GalaxyActivity {
showLogOutDialog();
}
});
loadAvatar(sharedPreferences.getString("GOOGLE_URL", ""));
}
}
@@ -147,11 +147,9 @@ public class AccountsActivity extends GalaxyActivity {
});
}
public void parseRAW(String rawData) {
TextView googleName = (TextView) findViewById(R.id.google_name);
googleName.setText(rawData.substring(rawData.indexOf("<name>") + 6, rawData.indexOf("</name>")));
public void loadAvatar(String Url) {
Picasso.with(this)
.load(rawData.substring(rawData.indexOf("<gphoto:thumbnail>") + 18, rawData.lastIndexOf("</gphoto:thumbnail>")))
.load(Url)
.placeholder(R.drawable.ic_user_placeholder)
.transform(new CircleTransform())
.into(((ImageView) findViewById(R.id.google_avatar)));

View File

@@ -2,14 +2,16 @@ package in.dragons.galaxy;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.NavigationView;
import android.util.Log;
import android.view.ContextMenu;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.FrameLayout;
import android.widget.ListView;
import com.percolate.caffeine.ViewUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -22,7 +24,7 @@ import in.dragons.galaxy.model.App;
import in.dragons.galaxy.view.AppBadge;
import in.dragons.galaxy.view.ListItem;
abstract public class AppListActivity extends GalaxyActivity implements NavigationView.OnNavigationItemSelectedListener {
abstract public class AppListActivity extends GalaxyActivity {
protected ListView listView;
protected Map<String, ListItem> listItems = new HashMap<>();
@@ -35,8 +37,8 @@ abstract public class AppListActivity extends GalaxyActivity implements Navigati
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
super.onCreateDrawer(savedInstanceState);
FrameLayout contentFrameLayout = (FrameLayout) findViewById(R.id.content_frame); //Remember this is the FrameLayout area within your activity_main.xml
getLayoutInflater().inflate(R.layout.applist_activity_layout, contentFrameLayout);
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@@ -47,6 +49,8 @@ abstract public class AppListActivity extends GalaxyActivity implements Navigati
}
});
onContentChange();
getListView().setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
@@ -98,11 +102,11 @@ abstract public class AppListActivity extends GalaxyActivity implements Navigati
}
}
@Override
public void onContentChanged() {
super.onContentChanged();
public void onContentChange() {
View emptyView = findViewById(android.R.id.empty);
listView = (ListView) findViewById(android.R.id.list);
listView = ViewUtils.findViewById(this, android.R.id.list);
listView.setNestedScrollingEnabled(true);
if (emptyView != null) {
listView.setEmptyView(emptyView);
}

View File

@@ -0,0 +1,150 @@
package in.dragons.galaxy;
import android.annotation.TargetApi;
import android.app.AlertDialog;
import android.app.SearchManager;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.design.widget.NavigationView;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.SearchView;
import com.percolate.caffeine.PhoneUtils;
import com.percolate.caffeine.ToastUtils;
import com.percolate.caffeine.ViewUtils;
import com.squareup.picasso.Picasso;
public abstract class BaseActivity extends AppCompatActivity {
static protected boolean logout = false;
protected String Email, Name, Url;
protected SharedPreferences sharedPreferences;
public static void cascadeFinish() {
BaseActivity.logout = true;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
setTheme(sharedPreferences.getBoolean("THEME", true) ? R.style.AppTheme : R.style.AppTheme_Dark);
super.onCreate(savedInstanceState);
logout = false;
Email = sharedPreferences.getString(PlayStoreApiAuthenticator.PREFERENCE_EMAIL, "");
}
protected boolean isConnected() {
return PhoneUtils.isNetworkAvailable(this);
}
protected boolean isValidEmail(String Email) {
return !(Email.isEmpty() || isDummyEmail());
}
protected boolean isDummyEmail() {
return (Email.contains("yalp.store.user"));
}
protected void notifyConnected(final Context context) {
if (!isConnected())
ToastUtils.quickToast(this, "No network").show();
}
protected void parseRAW(String rawData) {
Name = rawData.substring(rawData.indexOf("<name>") + 6, rawData.indexOf("</name>"));
Url = rawData.substring(rawData.indexOf("<gphoto:thumbnail>") + 18, rawData.lastIndexOf("</gphoto:thumbnail>"));
PreferenceManager.getDefaultSharedPreferences(this).edit().putString("GOOGLE_NAME", Name).apply();
PreferenceManager.getDefaultSharedPreferences(this).edit().putString("GOOGLE_URL", Url).apply();
setNavHeaderInfo((NavigationView) findViewById(R.id.nav_view), Name, Url);
}
protected void setNavHeaderInfo(NavigationView navigationView, String Name, String URL) {
ViewUtils.setText(this, R.id.usr_name, Name);
ViewUtils.setText(this, R.id.usr_email, Email);
Picasso.with(this)
.load(URL)
.placeholder(R.drawable.ic_user_placeholder)
.transform(new CircleTransform())
.into((ImageView) ViewUtils.findViewById(this, R.id.usr_img));
}
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
protected void addQueryTextListener(MenuItem searchItem) {
SearchView searchView = (SearchView) searchItem.getActionView();
SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);
if (null != searchManager) {
searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));
searchView.setQueryHint(getString(R.string.search_title));
}
searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
@Override
public boolean onQueryTextChange(String query) {
return true;
}
@Override
public boolean onQueryTextSubmit(String query) {
Intent i = new Intent(BaseActivity.this, SearchActivity.class);
i.setAction(Intent.ACTION_SEARCH);
i.putExtra(SearchManager.QUERY, query);
startActivity(i);
return false;
}
});
}
AlertDialog showLogOutDialog() {
return new AlertDialog.Builder(this)
.setMessage(R.string.dialog_message_logout)
.setTitle(R.string.dialog_title_logout)
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
new PlayStoreApiAuthenticator(getApplicationContext()).logout();
dialogInterface.dismiss();
finish();
}
})
.setNegativeButton(android.R.string.cancel, null)
.show();
}
AlertDialog showFallbackSearchDialog() {
final EditText textView = new EditText(this);
return new AlertDialog.Builder(this)
.setView(textView)
.setPositiveButton(android.R.string.search_go, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent i = new Intent(getApplicationContext(), SearchActivity.class);
i.setAction(Intent.ACTION_SEARCH);
i.putExtra(SearchManager.QUERY, textView.getText().toString());
startActivity(i);
}
})
.setNegativeButton(android.R.string.cancel, null)
.show();
}
protected void finishAll() {
logout = true;
finish();
}
}

View File

@@ -2,9 +2,7 @@ package in.dragons.galaxy;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.util.Log;
import in.dragons.galaxy.fragment.FilterMenu;
@@ -26,8 +24,6 @@ public class CategoryAppsActivity extends EndlessScrollActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
setTheme(sharedPreferences.getBoolean("THEME", true) ? R.style.AppTheme : R.style.AppTheme_Dark);
super.onCreate(savedInstanceState);
}

View File

@@ -1,12 +1,11 @@
package in.dragons.galaxy;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.TextView;
import in.dragons.galaxy.task.playstore.CategoryListTask;
@@ -18,11 +17,9 @@ public class CategoryListActivity extends GalaxyActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
setTheme(sharedPreferences.getBoolean("THEME", true) ? R.style.AppTheme : R.style.AppTheme_Dark);
super.onCreate(savedInstanceState);
setContentView(R.layout.categories_activity_layout);
super.onCreateDrawer(savedInstanceState);
FrameLayout contentFrameLayout = (FrameLayout) findViewById(R.id.content_frame);
getLayoutInflater().inflate(R.layout.categories_activity_layout, contentFrameLayout);
setTitle(getString(R.string.action_categories));
CategoryManager manager = new CategoryManager(this);

View File

@@ -51,7 +51,6 @@ abstract public class CredentialsDialogBuilder {
super.onPostExecute(result);
if (success()) {
new FirstLaunchChecker(context).setLoggedIn();
android.os.Process.killProcess(android.os.Process.myPid());
if (caller instanceof CloneableTask) {
Log.i(getClass().getSimpleName(), caller.getClass().getSimpleName() + " is cloneable. Retrying.");
((PlayStoreTask) ((CloneableTask) caller).clone()).execute(new String[]{});

View File

@@ -2,14 +2,13 @@ package in.dragons.galaxy;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.text.TextUtils;
import android.util.Log;
import android.view.ContextMenu;
import android.view.MenuItem;
import android.view.View;
import android.widget.FrameLayout;
import in.dragons.galaxy.fragment.details.AppLists;
import in.dragons.galaxy.fragment.details.BackToPlayStore;
@@ -89,12 +88,10 @@ public class DetailsActivity extends GalaxyActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
setTheme(sharedPreferences.getBoolean("THEME", true) ? R.style.AppTheme : R.style.AppTheme_Dark);
super.onCreate(savedInstanceState);
setContentView(R.layout.details_activity_layout);
FrameLayout contentFrameLayout = (FrameLayout) findViewById(R.id.content_frame);
getLayoutInflater().inflate(R.layout.details_activity_layout, contentFrameLayout);
onNewIntent(getIntent());
onCreateDrawer(savedInstanceState);
}
@Override

View File

@@ -68,7 +68,7 @@ abstract public class EndlessScrollActivity extends AppListActivity {
protected EndlessScrollTask prepareTask(EndlessScrollTask task) {
task.setContext(this);
task.setErrorView((TextView) getListView().getEmptyView());
if(listItems.isEmpty())
if (listItems.isEmpty())
task.setProgressIndicator(findViewById(R.id.progress));
return task;
}

View File

@@ -1,57 +1,41 @@
package in.dragons.galaxy;
import android.Manifest;
import android.annotation.TargetApi;
import android.app.AlertDialog;
import android.app.SearchManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.design.widget.NavigationView;
import android.support.v4.app.ActivityCompat;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.SearchView;
import com.percolate.caffeine.PhoneUtils;
import com.percolate.caffeine.ToastUtils;
import com.percolate.caffeine.ViewUtils;
import com.squareup.picasso.Picasso;
import in.dragons.galaxy.fragment.FilterMenu;
public abstract class GalaxyActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener {
public abstract class GalaxyActivity extends BaseActivity implements NavigationView.OnNavigationItemSelectedListener {
static protected boolean logout = false;
protected String Email;
private NavigationView navigationView;
Toolbar toolbar;
DrawerLayout drawer;
ActionBarDrawerToggle toggle;
public static void cascadeFinish() {
GalaxyActivity.logout = true;
}
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
protected void onCreateDrawer(Bundle savedInstanceState) {
logout = false;
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
toggle = new ActionBarDrawerToggle(
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
drawer.addDrawerListener(toggle);
toggle.syncState();
@@ -59,9 +43,6 @@ public abstract class GalaxyActivity extends AppCompatActivity implements Naviga
navigationView = (NavigationView) findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this);
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
Email = sharedPreferences.getString(PlayStoreApiAuthenticator.PREFERENCE_EMAIL, "");
getUser();
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 1);
@@ -80,40 +61,6 @@ public abstract class GalaxyActivity extends AppCompatActivity implements Naviga
ViewUtils.setText(header, R.id.usr_email, getResources().getString(R.string.header_usr_email));
}
public boolean isConnected() {
return PhoneUtils.isNetworkAvailable(this);
}
public boolean isValidEmail(String Email) {
return !(Email.isEmpty() || isDummyEmail());
}
public boolean isDummyEmail() {
return (Email.contains("yalp.store.user"));
}
public void notifyConnected() {
if (!isConnected())
ToastUtils.quickToast(this, getResources().getString(R.string.error_no_network), true);
}
public void parseRAW(String rawData) {
setNavHeaderInfo((NavigationView) findViewById(R.id.nav_view),
rawData.substring(rawData.indexOf("<name>") + 6, rawData.indexOf("</name>")),
rawData.substring(rawData.indexOf("<gphoto:thumbnail>") + 18, rawData.lastIndexOf("</gphoto:thumbnail>")));
}
public void setNavHeaderInfo(NavigationView navigationView, String Name, String URL) {
ViewUtils.setText(this, R.id.usr_name, Name);
ViewUtils.setText(this, R.id.usr_email, Email);
Picasso.with(this)
.load(URL)
.placeholder(R.drawable.ic_user_placeholder)
.transform(new CircleTransform())
.into((ImageView) ViewUtils.findViewById(this, R.id.usr_img));
}
@Override
protected void onResume() {
Log.v(getClass().getSimpleName(), "Resuming activity");
@@ -183,65 +130,6 @@ public abstract class GalaxyActivity extends AppCompatActivity implements Naviga
}
}
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private void addQueryTextListener(MenuItem searchItem) {
SearchView searchView = (SearchView) searchItem.getActionView();
SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);
if (null != searchManager) {
searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));
searchView.setQueryHint(getString(R.string.search_title));
}
searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
@Override
public boolean onQueryTextChange(String query) {
return true;
}
@Override
public boolean onQueryTextSubmit(String query) {
Intent i = new Intent(GalaxyActivity.this, SearchActivity.class);
i.setAction(Intent.ACTION_SEARCH);
i.putExtra(SearchManager.QUERY, query);
startActivity(i);
return false;
}
});
}
AlertDialog showLogOutDialog() {
return new AlertDialog.Builder(this)
.setMessage(R.string.dialog_message_logout)
.setTitle(R.string.dialog_title_logout)
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
new PlayStoreApiAuthenticator(getApplicationContext()).logout();
dialogInterface.dismiss();
finishAll();
}
})
.setNegativeButton(android.R.string.cancel, null)
.show();
}
AlertDialog showFallbackSearchDialog() {
final EditText textView = new EditText(this);
return new AlertDialog.Builder(this)
.setView(textView)
.setPositiveButton(android.R.string.search_go, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent i = new Intent(getApplicationContext(), SearchActivity.class);
i.setAction(Intent.ACTION_SEARCH);
i.putExtra(SearchManager.QUERY, textView.getText().toString());
startActivity(i);
}
})
.setNegativeButton(android.R.string.cancel, null)
.show();
}
protected void finishAll() {
logout = true;
finish();

View File

@@ -1,9 +1,6 @@
package in.dragons.galaxy;
import android.app.ActivityOptions;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.view.ContextMenu;
import android.view.Menu;
import android.view.View;
@@ -19,10 +16,7 @@ public class InstalledAppsActivity extends AppListActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
setTheme(sharedPreferences.getBoolean("THEME", true) ? R.style.AppTheme : R.style.AppTheme_Dark);
super.onCreate(savedInstanceState);
ActivityOptions.makeSceneTransitionAnimation(this).toBundle();
setTitle(R.string.activity_title_updates_and_other_apps);
}

View File

@@ -26,9 +26,7 @@ public class ManualDownloadActivity extends DetailsActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
setTheme(sharedPreferences.getBoolean("THEME", true) ? R.style.AppTheme : R.style.AppTheme_Dark);
super.onCreate(savedInstanceState);
onCreateDrawer(savedInstanceState);
}
@Override

View File

@@ -4,9 +4,7 @@ import android.app.AlertDialog;
import android.app.SearchManager;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.text.TextUtils;
import android.util.Log;
import android.view.Menu;
@@ -30,8 +28,6 @@ public class SearchActivity extends EndlessScrollActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
setTheme(sharedPreferences.getBoolean("THEME", true) ? R.style.AppTheme : R.style.AppTheme_Dark);
super.onCreate(savedInstanceState);
}

View File

@@ -24,14 +24,12 @@ public class TopCategoriesAdapter extends RecyclerView.Adapter<TopCategoriesAdap
R.drawable.ic_communication
};
private View view;
private ViewHolder viewHolder;
private SharedPreferencesTranslator translator;
public TopCategoriesAdapter(Context context, String[] topCategories) {
this.categories = topCategories;
this.context = context;
translator = new SharedPreferencesTranslator(PreferenceManager.getDefaultSharedPreferences(context));
this.translator = new SharedPreferencesTranslator(PreferenceManager.getDefaultSharedPreferences(context));
}
public static class ViewHolder extends RecyclerView.ViewHolder {
@@ -47,8 +45,8 @@ public class TopCategoriesAdapter extends RecyclerView.Adapter<TopCategoriesAdap
@Override
public TopCategoriesAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
view = LayoutInflater.from(context).inflate(R.layout.top_cat_item, parent, false);
viewHolder = new ViewHolder(view);
View view = LayoutInflater.from(context).inflate(R.layout.top_cat_item, parent, false);
ViewHolder viewHolder = new ViewHolder(view);
return viewHolder;
}

View File

@@ -24,7 +24,6 @@ public class UpdatableAppsActivity extends AppListActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
setTheme(sharedPreferences.getBoolean("THEME", true) ? R.style.AppTheme : R.style.AppTheme_Dark);
super.onCreate(savedInstanceState);
setTitle(getString(R.string.activity_title_updates_only));
onNewIntent(getIntent());

View File

@@ -14,7 +14,6 @@ import in.dragons.galaxy.BuildConfig;
import in.dragons.galaxy.ContextUtil;
import in.dragons.galaxy.DownloadProgressBarUpdater;
import in.dragons.galaxy.DownloadState;
import in.dragons.galaxy.Downloader;
import in.dragons.galaxy.GalaxyActivity;
import in.dragons.galaxy.GalaxyPermissionManager;
import in.dragons.galaxy.ManualDownloadActivity;
@@ -22,7 +21,6 @@ import in.dragons.galaxy.NumberProgressBar;
import in.dragons.galaxy.Paths;
import in.dragons.galaxy.R;
import in.dragons.galaxy.model.App;
import in.dragons.galaxy.selfupdate.UpdaterFactory;
import in.dragons.galaxy.task.playstore.PurchaseTask;
import static in.dragons.galaxy.DownloadState.TriggeredBy.DOWNLOAD_BUTTON;
@@ -63,7 +61,7 @@ public class ButtonDownload extends Button {
public void checkAndDownload() {
View buttonDownload = activity.findViewById(R.id.download);
if(null!=buttonDownload)buttonDownload.setVisibility(View.GONE);
if (null != buttonDownload) buttonDownload.setVisibility(View.GONE);
View buttonCancel = activity.findViewById(R.id.cancel);
GalaxyPermissionManager permissionManager = new GalaxyPermissionManager(activity);
if (app.getVersionCode() == 0 && !(activity instanceof ManualDownloadActivity)) {
@@ -96,21 +94,14 @@ public class ButtonDownload extends Button {
}
public void download() {
if (app.getPackageName().equals(BuildConfig.APPLICATION_ID)) {
new Downloader(activity).download(
app,
AndroidAppDeliveryData.newBuilder().setDownloadUrl(UpdaterFactory.get(activity).getUrlString(app.getVersionCode())).build()
);
boolean writePermission = new GalaxyPermissionManager(activity).checkPermission();
Log.i(getClass().getSimpleName(), "Write permission granted - " + writePermission);
if (writePermission && prepareDownloadsDir()) {
getPurchaseTask().execute();
} else {
boolean writePermission = new GalaxyPermissionManager(activity).checkPermission();
Log.i(getClass().getSimpleName(), "Write permission granted - " + writePermission);
if (writePermission && prepareDownloadsDir()) {
getPurchaseTask().execute();
} else {
File dir = Paths.getDownloadPath(activity);
Log.i(getClass().getSimpleName(), dir.getAbsolutePath() + " exists=" + dir.exists() + ", isDirectory=" + dir.isDirectory() + ", writable=" + dir.canWrite());
ContextUtil.toast(this.activity.getApplicationContext(), R.string.error_downloads_directory_not_writable);
}
File dir = Paths.getDownloadPath(activity);
Log.i(getClass().getSimpleName(), dir.getAbsolutePath() + " exists=" + dir.exists() + ", isDirectory=" + dir.isDirectory() + ", writable=" + dir.canWrite());
ContextUtil.toast(this.activity.getApplicationContext(), R.string.error_downloads_directory_not_writable);
}
}
@@ -132,7 +123,6 @@ public class ButtonDownload extends Button {
purchaseTask.setApp(app);
purchaseTask.setContext(activity);
purchaseTask.setTriggeredBy(activity instanceof ManualDownloadActivity ? MANUAL_DOWNLOAD_BUTTON : DOWNLOAD_BUTTON);
purchaseTask.setProgressIndicator(activity.findViewById(R.id.progress));
return purchaseTask;
}

View File

@@ -26,7 +26,6 @@ import in.dragons.galaxy.R;
import in.dragons.galaxy.Util;
import in.dragons.galaxy.model.App;
import in.dragons.galaxy.model.ImageSource;
import in.dragons.galaxy.task.LoadImageTask;
public class GeneralDetails extends Abstract {
@@ -111,7 +110,7 @@ public class GeneralDetails extends Abstract {
if (!sharedPreferences.getBoolean("THEME", true)) {
((TextView) activity.findViewById(R.id.changes_upper)).setTextColor(activity.getResources().getColor(R.color.white));
((TextView) activity.findViewById(R.id.changes_header)).setTextColor(activity.getResources().getColor(R.color.white));
activity.findViewById(R.id.changes_container).setBackgroundColor(activity.getResources().getColor(R.color.darkgray));
activity.findViewById(R.id.changes_container).setBackgroundColor(activity.getResources().getColor(R.color.darkGray));
}
}
}

View File

@@ -1,40 +0,0 @@
package in.dragons.galaxy.selfupdate;
import android.content.Context;
import android.content.pm.PackageManager;
import java.util.HashSet;
import java.util.Set;
import in.dragons.galaxy.BuildConfig;
public class Signature {
static private final String SIGNATURE_FDROID = "3082035f30820247a003020102020468ba885b300d06092a864886f70d01010b05003060310b300906035504061302554b310c300a060355040813034f5247310c300a060355040713034f524731133011060355040a130a6664726f69642e6f7267310f300d060355040b13064644726f6964310f300d060355040313064644726f6964301e170d3136313233303232303834325a170d3434303531373232303834325a3060310b300906035504061302554b310c300a060355040813034f5247310c300a060355040713034f524731133011060355040a130a6664726f69642e6f7267310f300d060355040b13064644726f6964310f300d060355040313064644726f696430820122300d06092a864886f70d01010105000382010f003082010a0282010100b10ec12303ee581f42f98fab7a31849c7fac9bd3e222b738c12b0fbfcb3d2b50589381da7c4ff42d8c412806188ea6806e0f54595afc651696d21053f89a4dae42ac02a469c8828a5ffc49954c60f9ccc66d60f0863928e0d2b17f8e9103a11d6056c53935abd64c984c3e48dc4611efa2bea89ac48bdb8e1257f23b193567262dea3b39bdc1fb4cf6852155f44920aee08d0dbc458cd43c24f4262ac6f293d88b51b7c7443c321ad77619e270f427fee8109772566aa998ba927c9ed2dc4c48b517c1b37fe1c65a8c1681a542fda60182cf3fb600f8584668815a4bceda81e708a2c815dd85abbabe88cc5719f8a5326284bafb5c4121596bd67f45ed7ec5630203010001a321301f301d0603551d0e04160414e3e2d2155bd13aba9aad5a851634f16e020abb64300d06092a864886f70d01010b05000382010100a431e1424afa29a50bb2ecdf710aa757f09835b7dcd484f2d7738ef58b1dc5928080c885a0082520b248e940b5c561b5bf7f49ea1436bd2d659f4eb432d2743a43bb0756ee236fa17bd4e77a00cd995d0f769d1ab9012382d960f04c8b920cb4c90bc14aa9a93de97387ef00abd86101b4b0be5b50670ff6d271d7719f044e541acaad219a8e02bf714ec5f27a1c2d81bc33a3feaa55cfa53a6488b3b057e97e66545741e41a5194f25f5837c639b190287c47feb6f6c88adcc222f7cdd3bd55d45f79d3f212c547ba9e2f24d286824af6eec7359adba5bf03e1e5b40e47dad059b799105c58a57a3142d7c7f270c9728a84f1992fb4a30da4cbe74803079221";
static private final String SIGNATURE_GITHUB = "308203453082022da0030201020204044417d8300d06092a864886f70d01010b05003053310b3009060355040613025255310f300d0603550408130652757373696131193017060355040713105361696e742d50657465727362757267311830160603550403130f53657267657920596572696f6d696e301e170d3137303931363230343833305a170d3432303931303230343833305a3053310b3009060355040613025255310f300d0603550408130652757373696131193017060355040713105361696e742d50657465727362757267311830160603550403130f53657267657920596572696f6d696e30820122300d06092a864886f70d01010105000382010f003082010a028201010087ff8de3ce6e89e55dd5a6bb2af95952f32e4bdce4c370e7744bba3d16aba4a737a0c77f95a0c1ee43b7ec4b37de29c5e163e751cdb6d17f1be9eee29e724a1e65df4de68c1dee9bf8220b3bdc87554994f2952bfea6cad53b7065168c9fe97c64ed5ad51b7831256cb9767b433827525c689df3826d3b65a6122c37f866d6c65d52471925cd962f3ef598186287059e70f89a6155e32e1a402f68e9a97170927999dbebed7b0738215614680108ddfc9834ad9a47fcade6f6359e044be00650f2435f90f05f1be68d7f61eddd469d57b40117a7fbfb774100f8fc1ca9d11266a0edfcc496191e230439933d2a14e57157e685ee0cc93075e9956280f91128cf0203010001a321301f301d0603551d0e0416041447ba1bad4480fa4af1730a992a2b7976aa019079300d06092a864886f70d01010b050003820101005291a0f5a7e090a42b1fc895f27db3785e9abc4e973718aa999c17ec372ab3f7b3e5aa74f1f15a82fff1313c7d2034f18a2918e661fba20fc61f3ce489675ddf80e8510fea7f323c3037ec9356aa15b231f9a8f911148e4c9471b9a5649942f8adc29bf0ddda418ddbd10aee9a384803e9c9cb23f17e05cd836cd65c7081cfa79109b8a7b106e1bbcd3ccf8c28b109842a745b2ea3d1aa177bd295087e40cdc7b765e981ea74b975650eff7886f8fec2d3a1e03b18be027abdd691257d4213a7f12a33dcd890db3aae4a5c9a1242ce2bc8be3706535ccf8d2fd93f5d38191c4acb118d3b9c2e342f8fc825ef316aff8484a5d6230b80f11314816ff4d9c03c5e";
static private Set<String> currentSignatures;
static public boolean isFdroid(Context context) {
return getSignatureSet(context).size() == 1 && getSignatureSet(context).contains(SIGNATURE_FDROID);
}
static public boolean isGithub(Context context) {
return getSignatureSet(context).size() == 1 && getSignatureSet(context).contains(SIGNATURE_GITHUB);
}
static private Set<String> getSignatureSet(Context context) {
if (null != currentSignatures) {
return currentSignatures;
}
currentSignatures = new HashSet<>();
try {
for (android.content.pm.Signature signature : context.getPackageManager().getPackageInfo(BuildConfig.APPLICATION_ID, PackageManager.GET_SIGNATURES).signatures) {
currentSignatures.add(signature.toCharsString());
}
} catch (PackageManager.NameNotFoundException e) {
// Unlikely
}
return currentSignatures;
}
}

View File

@@ -1,81 +0,0 @@
package in.dragons.galaxy.selfupdate;
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import in.dragons.galaxy.BuildConfig;
abstract public class Updater {
static private final String CACHED_VERSION_CODE = "CACHED_VERSION_CODE";
static private final String CACHED_VERSION_CODE_CHECKED_AT = "CACHED_VERSION_CODE_CHECKED_AT";
static private final long CACHED_VERSION_CODE_VALID_FOR = 60 * 60;
protected Context context;
public Updater(Context context) {
this.context = context;
}
abstract public String getUrlString(int versionCode);
public int getLatestVersionCode() {
int latestVersionCode = getCachedVersionCode();
if (latestVersionCode == 0) {
latestVersionCode = BuildConfig.VERSION_CODE;
while (isAvailable(latestVersionCode + 1)) {
latestVersionCode++;
}
cacheVersionCode(latestVersionCode);
}
return latestVersionCode;
}
private int getCachedVersionCode() {
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
return (System.currentTimeMillis() - preferences.getLong(CACHED_VERSION_CODE_CHECKED_AT, 0)) > CACHED_VERSION_CODE_VALID_FOR
? 0
: preferences.getInt(CACHED_VERSION_CODE, 0)
;
}
private void cacheVersionCode(int versionCode) {
SharedPreferences.Editor preferences = PreferenceManager.getDefaultSharedPreferences(context).edit();
preferences.putInt(CACHED_VERSION_CODE, versionCode);
preferences.putLong(CACHED_VERSION_CODE_CHECKED_AT, System.currentTimeMillis());
preferences.commit();
}
private URL getUrl(int versionCode) {
try {
return new URL(getUrlString(versionCode));
} catch (MalformedURLException e) {
// Unlikely
}
return null;
}
private boolean isAvailable(int versionCode) {
try {
URLConnection connection = getUrl(versionCode).openConnection();
if (connection instanceof HttpURLConnection) {
((HttpURLConnection) connection).setInstanceFollowRedirects(false);
((HttpURLConnection) connection).setRequestMethod("HEAD");
return ((HttpURLConnection) connection).getResponseCode() < HttpURLConnection.HTTP_BAD_REQUEST;
}
InputStream in = connection.getInputStream();
in.close();
return true;
} catch (IOException x) {
return false;
}
}
}

View File

@@ -1,10 +0,0 @@
package in.dragons.galaxy.selfupdate;
import android.content.Context;
public class UpdaterFactory {
static public Updater get(Context context) {
return Signature.isFdroid(context) ? new UpdaterFdroid(context) : new UpdaterGithub(context);
}
}

View File

@@ -1,15 +0,0 @@
package in.dragons.galaxy.selfupdate;
import android.content.Context;
class UpdaterFdroid extends Updater {
public UpdaterFdroid(Context context) {
super(context);
}
@Override
public String getUrlString(int versionCode) {
return "https://f-droid.org/repo/in.dragons.galaxy_" + versionCode + ".apk";
}
}

View File

@@ -1,15 +0,0 @@
package in.dragons.galaxy.selfupdate;
import android.content.Context;
class UpdaterGithub extends Updater {
public UpdaterGithub(Context context) {
super(context);
}
@Override
public String getUrlString(int versionCode) {
return "https://github.com/whyorean/Galaxy/releases/download/0." + versionCode + "/in.dragons.galaxy_" + versionCode + ".apk";
}
}

View File

@@ -8,13 +8,11 @@ import com.github.yeriomin.playstoreapi.GooglePlayException;
import java.io.IOException;
import in.dragons.galaxy.BuildConfig;
import in.dragons.galaxy.ContextUtil;
import in.dragons.galaxy.R;
import in.dragons.galaxy.model.App;
import in.dragons.galaxy.model.AppBuilder;
import in.dragons.galaxy.model.ReviewBuilder;
import in.dragons.galaxy.selfupdate.UpdaterFactory;
public class DetailsTask extends PlayStorePayloadTask<App> {
@@ -51,21 +49,6 @@ public class DetailsTask extends PlayStorePayloadTask<App> {
@Override
protected App doInBackground(String... arguments) {
return packageName.equals(BuildConfig.APPLICATION_ID) ? getSelf() : super.doInBackground(arguments);
}
private App getSelf() {
App app = new App();
PackageManager pm = context.getPackageManager();
try {
app = new App(pm.getPackageInfo(packageName, PackageManager.GET_META_DATA | PackageManager.GET_PERMISSIONS));
app.setDisplayName(pm.getApplicationLabel(app.getPackageInfo().applicationInfo).toString());
} catch (PackageManager.NameNotFoundException e) {
// App is not installed
}
int latestVersionCode = UpdaterFactory.get(context).getLatestVersionCode();
app.setVersionCode(latestVersionCode);
app.setVersionName("0." + latestVersionCode);
return app;
return super.doInBackground(arguments);
}
}

View File

@@ -17,8 +17,6 @@ import in.dragons.galaxy.GalaxyPermissionManager;
import in.dragons.galaxy.R;
import in.dragons.galaxy.UpdatableAppsActivity;
import in.dragons.galaxy.model.App;
import in.dragons.galaxy.selfupdate.UpdaterFactory;
import in.dragons.galaxy.task.InstalledAppsTask;
import static android.content.Context.DOWNLOAD_SERVICE;
@@ -49,16 +47,6 @@ public class ForegroundUpdatableAppsTask extends UpdatableAppsTask implements Cl
if (!new BlackWhiteListManager(context).isUpdatable(BuildConfig.APPLICATION_ID)) {
return updatableApps;
}
int latestVersionCode = UpdaterFactory.get(context).getLatestVersionCode();
if (latestVersionCode > BuildConfig.VERSION_CODE) {
App Galaxy = InstalledAppsTask.getInstalledApp(context.getPackageManager(), BuildConfig.APPLICATION_ID);
if (null == Galaxy) {
return updatableApps;
}
Galaxy.setVersionCode(latestVersionCode);
Galaxy.setVersionName("0." + latestVersionCode);
updatableApps.add(Galaxy);
}
return updatableApps;
}

View File

@@ -11,6 +11,8 @@ import java.util.ArrayList;
import java.util.List;
import java.util.WeakHashMap;
import in.dragons.galaxy.NetworkState;
import in.dragons.galaxy.PreferenceActivity;
import in.dragons.galaxy.R;
import in.dragons.galaxy.model.App;
import in.dragons.galaxy.model.ImageSource;
@@ -53,9 +55,9 @@ public abstract class AppBadge extends ListItem {
private void drawIcon(ImageView imageView) {
ImageSource imageSource = app.getIconInfo();
if (null != imageSource.getApplicationInfo()) {
if (null != imageSource.getApplicationInfo() && !noImages()) {
imageView.setImageDrawable(imageView.getContext().getPackageManager().getApplicationIcon(imageSource.getApplicationInfo()));
} else {
} else if(!noImages()) {
Picasso
.with(view.getContext())
.load(imageSource.getUrl())
@@ -73,4 +75,8 @@ public abstract class AppBadge extends ListItem {
textView.setVisibility(View.GONE);
}
}
private boolean noImages() {
return NetworkState.isMetered(view.getContext()) && PreferenceActivity.getBoolean(view.getContext(), PreferenceActivity.PREFERENCE_NO_IMAGES);
}
}

View File

@@ -1,36 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout 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"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="in.dragons.galaxy.AboutActivity"
tools:openDrawer="start">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
android:theme="@style/MyToolbarStyle" />
<include layout="@layout/app_abt_inc"/>
</LinearLayout>
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/nav_menu" />
</android.support.v4.widget.DrawerLayout>

View File

@@ -1,36 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout 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"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="in.dragons.galaxy.AboutActivity"
tools:openDrawer="start">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
android:theme="@style/MyToolbarStyle" />
<include layout="@layout/app_acc_inc"/>
</LinearLayout>
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/nav_menu" />
</android.support.v4.widget.DrawerLayout>

View File

@@ -1,19 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<android.support.v4.widget.DrawerLayout 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"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="in.dragons.galaxy.AppListActivity"
tools:context="in.dragons.galaxy.GalaxyActivity"
tools:openDrawer="start">
<include
layout="@layout/app_bar_main"
<android.support.design.widget.CoordinatorLayout
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
android:theme="@style/MyToolbarStyle"
app:layout_scrollFlags="scroll|enterAlways" />
</android.support.design.widget.AppBarLayout>
<FrameLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</android.support.design.widget.CoordinatorLayout>
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
@@ -22,5 +43,5 @@
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/nav_menu"/>
</android.support.v4.widget.DrawerLayout>
app:menu="@menu/nav_menu" />
</android.support.v4.widget.DrawerLayout>

View File

@@ -1,303 +1,284 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center">
android:layout_height="match_parent"
android:fadeScrollbars="true"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<ScrollView
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="5dp"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:orientation="vertical">
<LinearLayout
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:orientation="vertical">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="2dp"
app:cardElevation="2dp"
app:contentPadding="2dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:layout_width="@dimen/icon_size_big"
android:layout_height="@dimen/icon_size_big"
android:layout_gravity="center"
android:src="@mipmap/ic_launcher" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/app_name"
android:textSize="20dp" />
<TextView
android:id="@+id/app_version"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:gravity="center"
android:textSize="18dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:padding="10dp"
android:text="@string/about_app"
android:textSize="16dp" />
</LinearLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginBottom="5dp"
android:layout_marginTop="5dp"
app:cardCornerRadius="2dp"
app:cardElevation="2dp"
app:contentPadding="2dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="30dp"
android:padding="5dp"
android:weightSum="6">
<TextView
android:id="@+id/github"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:clickable="true"
android:drawableLeft="@drawable/ic_github"
android:drawablePadding="5dp"
android:drawableTint="?android:textColor"
android:text="Github" />
<TextView
android:id="@+id/xda"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:clickable="true"
android:drawableLeft="@drawable/ic_xda"
android:drawablePadding="5dp"
android:drawableTint="@color/colorOrange"
android:text="Dev Thread" />
<TextView
android:id="@+id/telegram"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:clickable="true"
android:drawableLeft="@drawable/ic_telegram"
android:drawablePadding="5dp"
android:drawableTint="@color/colorBlue"
android:text="Telegram Group" />
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp">
app:cardUseCompatPadding="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="2">
android:orientation="vertical">
<ImageView
android:layout_width="@dimen/icon_size_big"
android:layout_height="@dimen/icon_size_big"
android:layout_gravity="center"
android:src="@mipmap/ic_launcher" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:text="@string/about_devs"
android:textColor="@color/colorAccent" />
android:gravity="center"
android:text="@string/app_name"
android:textSize="20sp" />
<android.support.v7.widget.CardView
<TextView
android:id="@+id/app_version"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginBottom="5dp"
android:layout_weight="1"
app:cardCornerRadius="2dp"
app:cardElevation="2dp"
app:contentPadding="5dp">
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:gravity="center"
android:textSize="18sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/dev1_avatar"
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:src="@drawable/ic_user_placeholder" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/dev_name1"
android:textStyle="bold" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_email"
android:drawablePadding="5dp"
android:drawableTint="?android:textColor"
android:text="@string/dev_mail1" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_map_marker"
android:drawablePadding="5dp"
android:drawableTint="?android:textColor"
android:text="@string/dev_country1" />
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
<TextView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginBottom="5dp"
android:layout_weight="1"
app:cardCornerRadius="2dp"
app:cardElevation="2dp"
app:contentPadding="5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/dev2_avatar"
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:src="@drawable/ic_user_placeholder" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/dev_name2"
android:textStyle="bold" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_email"
android:drawablePadding="5dp"
android:drawableTint="?android:textColor"
android:text="@string/dev_mail2" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_map_marker"
android:drawablePadding="5dp"
android:drawableTint="?android:textColor"
android:text="@string/dev_country2" />
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
android:layout_height="match_parent"
android:gravity="center"
android:padding="10dp"
android:text="@string/about_app"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
<LinearLayout
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:layout_gravity="bottom"
app:cardUseCompatPadding="true">
<TextView
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:text="@string/about_contributors"
android:textColor="@color/colorAccent" />
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="5dp"
android:layout_weight="1"
app:cardCornerRadius="2dp"
app:cardElevation="2dp"
app:contentPadding="5dp">
android:layout_height="30dp"
android:layout_gravity="center"
android:padding="5dp"
android:weightSum="6">
<TextView
android:id="@+id/contributors"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textSize="16sp" />
</android.support.v7.widget.CardView>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:text="@string/about_opensource"
android:textColor="@color/colorAccent" />
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="5dp"
android:layout_weight="1"
app:cardCornerRadius="2dp"
app:cardElevation="2dp"
app:contentPadding="5dp">
android:id="@+id/github"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:clickable="true"
android:drawablePadding="5dp"
android:drawableStart="@drawable/ic_github"
android:drawableTint="?android:textColor"
android:focusable="true"
android:text="@string/about_github" />
<TextView
android:id="@+id/opensource"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textSize="16sp" />
</android.support.v7.widget.CardView>
</LinearLayout>
android:id="@+id/xda"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:clickable="true"
android:drawablePadding="5dp"
android:drawableStart="@drawable/ic_xda"
android:drawableTint="@color/colorOrange"
android:focusable="true"
android:text="@string/about_xda" />
<TextView
android:id="@+id/telegram"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:clickable="true"
android:drawablePadding="5dp"
android:drawableStart="@drawable/ic_telegram"
android:drawableTint="@color/colorBlue"
android:focusable="true"
android:text="@string/about_telegram" />
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
</ScrollView>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:text="@string/about_devs"
android:textColor="@color/colorAccent" />
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="@dimen/card_height_small"
app:cardUseCompatPadding="true"
app:contentPadding="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/dev1_avatar"
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:src="@drawable/ic_user_placeholder" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="25dp"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/dev_name1"
android:textStyle="bold" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawablePadding="5dp"
android:drawableStart="@drawable/ic_email"
android:drawableTint="?android:textColor"
android:text="@string/dev_mail1" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawablePadding="5dp"
android:drawableStart="@drawable/ic_map_marker"
android:drawableTint="?android:textColor"
android:text="@string/dev_country1" />
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="@dimen/card_height_small"
app:cardUseCompatPadding="true"
app:contentPadding="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/dev2_avatar"
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:src="@drawable/ic_user_placeholder" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="25dp"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/dev_name2"
android:textStyle="bold" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawablePadding="5dp"
android:drawableStart="@drawable/ic_email"
android:drawableTint="?android:textColor"
android:text="@string/dev_mail2" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawablePadding="5dp"
android:drawableStart="@drawable/ic_map_marker"
android:drawableTint="?android:textColor"
android:text="@string/dev_country2" />
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:text="@string/about_contributors"
android:textColor="@color/colorAccent" />
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginBottom="5dp"
android:layout_weight="1"
app:cardUseCompatPadding="true"
app:contentPadding="5dp">
<TextView
android:id="@+id/contributors"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textSize="16sp" />
</android.support.v7.widget.CardView>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:text="@string/about_opensource"
android:textColor="@color/colorAccent" />
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginBottom="5dp"
android:layout_weight="1"
app:cardUseCompatPadding="true"
app:contentPadding="5dp">
<TextView
android:id="@+id/opensource"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textSize="16sp" />
</android.support.v7.widget.CardView>
</LinearLayout>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>

View File

@@ -1,26 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center">
android:layout_height="match_parent"
android:fadeScrollbars="true"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_margin="5dp"
android:weightSum="8">
android:layout_height="wrap_content"
android:layout_marginEnd="2dp"
android:layout_marginStart="2dp"
android:orientation="vertical">
<android.support.v7.widget.CardView
android:id="@+id/device_card"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginBottom="5dp"
android:layout_weight="2"
app:cardCornerRadius="2dp"
app:cardElevation="2dp"
app:contentPadding="2dp">
android:layout_height="@dimen/card_height"
app:cardUseCompatPadding="true">
<LinearLayout
android:layout_width="match_parent"
@@ -40,7 +37,7 @@
android:id="@+id/device_detail_container"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginStart="20dp"
android:layout_weight="5.5"
android:orientation="vertical">
@@ -63,12 +60,14 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="14sp" />
<TextView
android:id="@+id/device_timezone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="14sp" />
</LinearLayout>
<ImageView
android:id="@+id/spoofed_indicator"
android:layout_width="0dp"
@@ -99,8 +98,8 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:drawableLeft="@drawable/ic_api"
android:drawablePadding="5dp"
android:drawableStart="@drawable/ic_api"
android:drawableTint="?android:textColor" />
<TextView
@@ -108,8 +107,8 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:drawableLeft="@drawable/ic_cpu"
android:drawablePadding="5dp"
android:drawableStart="@drawable/ic_cpu"
android:drawableTint="?android:textColor" />
</LinearLayout>
@@ -119,12 +118,8 @@
<android.support.v7.widget.CardView
android:id="@+id/user_dummy_card"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginBottom="5dp"
android:layout_weight="3"
app:cardCornerRadius="2dp"
app:cardElevation="2dp"
app:contentPadding="2dp">
android:layout_height="@dimen/card_height"
app:cardUseCompatPadding="true">
<LinearLayout
android:id="@+id/no_dummy"
@@ -144,7 +139,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center"
android:text="Login using Dummy Account" />
android:text="@string/acc_dummy" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/dummy_login"
@@ -176,7 +171,7 @@
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginStart="20dp"
android:layout_weight="5.5"
android:orientation="vertical">
@@ -247,11 +242,8 @@
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="3"
app:cardCornerRadius="2dp"
app:cardElevation="2dp"
app:contentPadding="2dp">
android:layout_height="@dimen/card_height"
app:cardUseCompatPadding="true">
<LinearLayout
android:id="@+id/no_google"
@@ -271,7 +263,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center"
android:text="Login using Google Account" />
android:text="@string/acc_google" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/google_login"
@@ -302,7 +294,7 @@
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginStart="20dp"
android:layout_weight="5.5"
android:orientation="vertical">
@@ -357,8 +349,6 @@
android:theme="@style/Widget.AppCompat.Button.Borderless.Colored" />
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
</RelativeLayout>
</android.support.v4.widget.NestedScrollView>

View File

@@ -1,32 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/colorPrimary"
android:theme="@style/MyToolbarStyle" />
</android.support.design.widget.AppBarLayout>
<include layout="@layout/applist_activity_layout" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
android:backgroundTint="@color/colorAccent"
android:tint="@color/white"
app:borderWidth="0dp"
app:srcCompat="@drawable/ic_search" />
</android.support.design.widget.CoordinatorLayout>

View File

@@ -15,30 +15,31 @@
app:cardElevation="2dp"
app:contentPadding="5dp">
<TextView
android:id="@+id/beta_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableEnd="@drawable/ic_expand_more"
android:visibility="gone"
android:gravity="center|start"
android:textSize="14sp"
android:textAllCaps="true"
android:textStyle="bold"/>
<TextView
android:id="@+id/beta_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableEnd="@drawable/ic_expand_more"
android:gravity="center|start"
android:textAllCaps="true"
android:textSize="14sp"
android:textStyle="bold"
android:visibility="gone" />
<LinearLayout
android:id="@+id/beta_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="32dp"
android:visibility="gone">
<LinearLayout
android:id="@+id/beta_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:orientation="vertical"
android:visibility="gone">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/beta_message"
android:layout_width="match_parent"
@@ -54,9 +55,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:theme="@style/Widget.AppCompat.Button.Borderless.Colored"
android:background="@drawable/button_bg"
android:textColor="@color/white"/>
android:textColor="@color/white"
android:theme="@style/Widget.AppCompat.Button.Borderless.Colored" />
<TextView
android:id="@+id/beta_email"
@@ -84,33 +85,33 @@
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_gravity="end">
android:layout_gravity="end"
android:orientation="horizontal">
<Button
android:id="@+id/beta_submit_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/submit"
android:theme="@style/Widget.AppCompat.Button.Borderless.Colored"
android:background="@drawable/button_bg"
android:textColor="@color/white"/>
android:text="@string/submit"
android:textColor="@color/white"
android:theme="@style/Widget.AppCompat.Button.Borderless.Colored" />
<Button
android:id="@+id/beta_delete_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/delete"
android:visibility="gone"
android:theme="@style/Widget.AppCompat.Button.Borderless.Colored"
android:background="@drawable/button_bg"
android:textColor="@color/white"/>
android:text="@string/delete"
android:textColor="@color/white"
android:theme="@style/Widget.AppCompat.Button.Borderless.Colored"
android:visibility="gone" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
</RelativeLayout>

View File

@@ -3,34 +3,34 @@
android:id="@+id/changes_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/changelog_bg"
android:orientation="vertical"
android:visibility="gone"
android:background="@color/changelog_bg">
android:visibility="gone">
<TextView
android:id="@+id/changes_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="25dp"
android:layout_marginTop="5dp"
android:layout_marginLeft="25dp"
android:text="@string/details_changelog"
android:textAllCaps="true"
android:textColor="@color/changelog_txt"
android:textSize="14sp"
android:textStyle="bold"
android:textColor="@color/changelog_txt"
android:visibility="gone" />
<TextView
android:id="@+id/changes_upper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autoLink="web|email"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:layout_marginLeft="25dp"
android:layout_marginRight="25dp"
android:textIsSelectable="true"
android:visibility="gone"
android:layout_marginTop="10dp"
android:autoLink="web|email"
android:lineSpacingExtra="5dp"
android:textColor="@color/changelog_txt"
android:lineSpacingExtra="5dp"/>
android:textIsSelectable="true"
android:visibility="gone" />
</LinearLayout>

View File

@@ -1,121 +1,119 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- App Details : Type, Size, Rating -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/app_detail"
android:layout_width="match_parent"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/app_detail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:visibility="gone">
<!-- Downloads -->
<LinearLayout
android:id="@+id/app_downloads"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:visibility="gone">
android:orientation="vertical">
<!-- Downloads -->
<LinearLayout
android:id="@+id/app_downloads"
<ImageButton
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:layout_margin="5dp"
android:background="@drawable/round_bg"
android:src="@drawable/app_downloads" />
<TextView
android:id="@+id/installs"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center">
android:gravity="clip_horizontal" />
</LinearLayout>
<ImageButton
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:layout_margin="5dp"
android:src="@drawable/app_downloads"
android:background="@drawable/round_bg"/>
<!-- Ratings -->
<LinearLayout
android:id="@+id/app_ratings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toEndOf="@id/app_downloads"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/installs"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:gravity="clip_horizontal"/>
</LinearLayout>
<ImageButton
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:layout_margin="5dp"
android:background="@drawable/round_bg"
android:src="@drawable/app_ratings" />
<!-- Ratings -->
<LinearLayout
android:id="@+id/app_ratings"
android:layout_toEndOf="@id/app_downloads"
<TextView
android:id="@+id/rating"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center">
android:layout_height="wrap_content" />
</LinearLayout>
<ImageButton
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:layout_margin="5dp"
android:src="@drawable/app_ratings"
android:background="@drawable/round_bg"/>
<!-- Size -->
<LinearLayout
android:id="@+id/app_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toEndOf="@id/app_ratings"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/rating"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<ImageButton
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:layout_margin="5dp"
android:background="@drawable/round_bg"
android:src="@drawable/app_size" />
<!-- Size -->
<LinearLayout
android:id="@+id/app_size"
android:layout_toEndOf="@id/app_ratings"
<TextView
android:id="@+id/size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center">
android:layout_height="wrap_content" />
</LinearLayout>
<ImageButton
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:layout_margin="5dp"
android:src="@drawable/app_size"
android:background="@drawable/round_bg"/>
<!-- Category -->
<LinearLayout
android:id="@+id/app_category"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toEndOf="@id/app_size"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<ImageButton
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:layout_margin="5dp"
android:background="@drawable/round_bg"
android:src="@drawable/app_category" />
<!-- Category -->
<LinearLayout
android:id="@+id/app_category"
android:layout_toEndOf="@id/app_size"
<TextView
android:id="@+id/category"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center">
android:layout_height="wrap_content" />
</LinearLayout>
<ImageButton
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:layout_margin="5dp"
android:src="@drawable/app_category"
android:background="@drawable/round_bg"/>
<!-- Price -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toEndOf="@id/app_category"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/category"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<ImageButton
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:layout_margin="5dp"
android:background="@drawable/round_bg"
android:src="@drawable/app_price" />
<!-- Price -->
<LinearLayout
android:layout_toEndOf="@id/app_category"
<TextView
android:id="@+id/price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center">
<ImageButton
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:layout_margin="5dp"
android:src="@drawable/app_price"
android:background="@drawable/round_bg"/>
<TextView
android:id="@+id/price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</RelativeLayout>
android:layout_height="wrap_content" />
</LinearLayout>
</RelativeLayout>

View File

@@ -15,38 +15,28 @@
app:cardElevation="2dp"
app:contentPadding="5dp">
<!--TextView
android:id="@+id/beta_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableEnd="@drawable/ic_expand_more"
android:visibility="gone"
android:textColor="@color/colorPrimary"
android:gravity="center|start"
android:textSize="14sp"
android:textAllCaps="true"
android:textStyle="bold"/-->
<LinearLayout
android:id="@+id/general_details"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="visible"
android:padding="5dp">
android:padding="5dp"
android:visibility="visible">
<TextView
android:id="@+id/developer"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
android:layout_height="wrap_content" />
<TextView
android:id="@+id/updated"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
android:layout_height="wrap_content" />
<TextView
android:id="@+id/google_dependencies"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
android:layout_height="wrap_content" />
</LinearLayout>
</android.support.v7.widget.CardView>
</RelativeLayout>

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical">
<android.support.v7.widget.CardView
@@ -21,106 +21,100 @@
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:drawableEnd="@drawable/ic_expand_more"
android:text="@string/details_reviews"
android:visibility="gone"
android:gravity="center|start"
android:textSize="14sp"
android:text="@string/details_reviews"
android:textAllCaps="true"
android:textStyle="bold"/>
android:textSize="14sp"
android:textStyle="bold"
android:visibility="gone" />
<LinearLayout
android:id="@+id/reviews_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="32dp"
android:visibility="gone">
<LinearLayout
android:id="@+id/reviews_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:orientation="vertical"
android:visibility="gone">
<FrameLayout
<FrameLayout
android:id="@+id/user_review_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:padding="6dip">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical">
<LinearLayout
<TextView
android:id="@+id/rate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical">
android:text="@string/details_rate_this_app"
android:textSize="18sp" />
<TextView
android:id="@+id/rate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/details_rate_this_app"
android:textSize="18sp" />
<RatingBar
android:id="@+id/user_stars"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:numStars="5"
android:stepSize="1" />
</LinearLayout>
<LinearLayout
android:id="@+id/user_review_edit_delete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:orientation="horizontal"
android:visibility="gone">
<ImageView
android:id="@+id/user_review_edit"
android:layout_width="@dimen/icon_size_small"
android:layout_height="@dimen/icon_size_small"
android:contentDescription="@string/content_description_review_edit"
android:src="@drawable/ic_edit"
android:tint="@color/darkgray"/>
<ImageView
android:id="@+id/user_review_delete"
android:layout_width="@dimen/icon_size_small"
android:layout_height="@dimen/icon_size_small"
android:contentDescription="@string/content_description_review_delete"
android:src="@drawable/ic_delete"
android:tint="@color/darkgray"/>
</LinearLayout>
<LinearLayout
android:id="@+id/user_review"
<RatingBar
android:id="@+id/user_stars"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical"
android:visibility="gone">
android:layout_marginTop="10dp"
android:numStars="5"
android:stepSize="1" />
</LinearLayout>
<TextView
android:id="@+id/user_title"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textStyle="bold" />
<LinearLayout
android:id="@+id/user_review_edit_delete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:orientation="horizontal"
android:visibility="gone">
<TextView
android:id="@+id/user_comment"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
</FrameLayout>
<ImageView
android:id="@+id/user_review_edit"
android:layout_width="@dimen/icon_size_small"
android:layout_height="@dimen/icon_size_small"
android:contentDescription="@string/content_description_review_edit"
android:src="@drawable/ic_edit"
android:tint="@color/darkGray" />
<LinearLayout
<ImageView
android:id="@+id/user_review_delete"
android:layout_width="@dimen/icon_size_small"
android:layout_height="@dimen/icon_size_small"
android:contentDescription="@string/content_description_review_delete"
android:src="@drawable/ic_delete"
android:tint="@color/darkGray" />
</LinearLayout>
<LinearLayout
android:id="@+id/user_review"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical"
android:visibility="gone">
<TextView
android:id="@+id/user_title"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/user_comment"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="12sp" />
</LinearLayout>
</FrameLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
@@ -133,40 +127,40 @@
android:padding="10dp"
android:textSize="40sp" />
<LinearLayout
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="10dp">
<TextView
android:id="@+id/average_stars5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="10dp">
android:layout_height="wrap_content" />
<TextView
android:id="@+id/average_stars5"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/average_stars4"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/average_stars4"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/average_stars3"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/average_stars3"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/average_stars2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/average_stars2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/average_stars1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
<TextView
android:id="@+id/average_stars1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
<LinearLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
@@ -190,16 +184,16 @@
android:layout_weight="1"
android:orientation="vertical" />
<ImageButton
android:id="@+id/reviews_next"
android:layout_width="24dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:background="#0000"
android:contentDescription="@string/content_description_review_next_page"
android:src="@drawable/ic_chevron_right" />
</LinearLayout>
</LinearLayout>
<ImageButton
android:id="@+id/reviews_next"
android:layout_width="24dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:background="#0000"
android:contentDescription="@string/content_description_review_next_page"
android:src="@drawable/ic_chevron_right" />
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>

View File

@@ -1,12 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<android.support.design.widget.CoordinatorLayout 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"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:showIn="@layout/app_bar_main">
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
@@ -140,6 +135,16 @@
android:layout_height="wrap_content"
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout>
</android.support.constraint.ConstraintLayout>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
android:backgroundTint="@color/colorAccent"
android:tint="@color/white"
app:borderWidth="0dp"
app:srcCompat="@drawable/ic_search" />
</android.support.design.widget.CoordinatorLayout>

View File

@@ -1,128 +1,87 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
<android.support.v4.widget.NestedScrollView 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"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="in.dragons.galaxy.AboutActivity"
tools:openDrawer="start">
android:fadeScrollbars="true"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<android.support.design.widget.CoordinatorLayout
android:id="@+id/main_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
android:orientation="vertical">
<android.support.design.widget.AppBarLayout
<LinearLayout
android:id="@+id/cat_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
android:orientation="vertical"
android:visibility="gone">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
<TextView
android:id="@+id/top_cat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
android:theme="@style/MyToolbarStyle"
app:layout_scrollFlags="scroll|enterAlways" />
</android.support.design.widget.AppBarLayout>
android:layout_marginStart="15dp"
android:layout_marginTop="15dp"
android:gravity="start"
android:text="@string/top_categories"
android:textSize="15sp"
android:textStyle="bold" />
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fadeScrollbars="true"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<android.support.v7.widget.RecyclerView
android:id="@+id/top_cat_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layoutManager="android.support.v7.widget.LinearLayoutManager" />
<LinearLayout
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_height="wrap_content"
android:padding="6dp">
<LinearLayout
android:id="@+id/cat_container"
<TextView
android:id="@+id/all_cat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
android:layout_margin="10dp"
android:gravity="start"
android:text="@string/all_categories"
android:textSize="15sp"
android:textStyle="bold" />
<TextView
android:id="@+id/top_cat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="15dp"
android:gravity="start"
android:text="@string/top_categories"
android:textSize="15sp"
android:textStyle="bold" />
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/all_cat"
android:layout_margin="5dp"
app:cardCornerRadius="2dp"
app:cardElevation="2dp"
app:contentPadding="5dp">
<android.support.v7.widget.RecyclerView
android:id="@+id/top_cat_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layoutManager="android.support.v7.widget.LinearLayoutManager" />
<RelativeLayout
android:id="@+id/all_cat_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="6dp">
app:layoutManager="android.support.v7.widget.LinearLayoutManager" />
<TextView
android:id="@+id/all_cat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:gravity="start"
android:text="@string/all_categories"
android:textSize="15sp"
android:textStyle="bold" />
<TextView
android:id="@+id/empty"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceLarge" />
</android.support.v7.widget.CardView>
</RelativeLayout>
</LinearLayout>
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/all_cat"
android:layout_margin="5dp"
app:cardCornerRadius="2dp"
app:cardElevation="2dp"
app:contentPadding="5dp">
<android.support.v7.widget.RecyclerView
android:id="@+id/all_cat_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layoutManager="android.support.v7.widget.LinearLayoutManager" />
<TextView
android:id="@+id/empty"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceLarge" />
</android.support.v7.widget.CardView>
</RelativeLayout>
</LinearLayout>
<ProgressBar
android:id="@+id/progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:indeterminate="true"
android:padding="5dp"
android:visibility="gone" />
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</android.support.design.widget.CoordinatorLayout>
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/nav_menu" />
</android.support.v4.widget.DrawerLayout>
<ProgressBar
android:id="@+id/progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:indeterminate="true"
android:padding="5dp"
android:visibility="gone" />
</LinearLayout>
</android.support.v4.widget.NestedScrollView>

View File

@@ -4,11 +4,11 @@
android:layout_height="match_parent">
<RelativeLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="25dp"
android:padding="25dp" >
android:orientation="vertical"
android:padding="25dp">
<ImageView
android:id="@+id/google_logo"
@@ -18,115 +18,110 @@
<TextView
android:id="@+id/signtext"
android:layout_below="@id/google_logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/google_logo"
android:layout_marginTop="5dp"
android:text="@string/credentials_logo_txt"
android:textSize="18sp"/>
android:textSize="18sp" />
<TextView
android:id="@+id/textview"
android:layout_below="@id/signtext"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/signtext"
android:layout_marginTop="25dp"
android:text="@string/credentials_message"/>
android:text="@string/credentials_message" />
<android.support.v7.widget.AppCompatAutoCompleteTextView
android:id="@+id/email"
android:layout_below="@id/textview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textEmailAddress"
android:layout_below="@id/textview"
android:autofillHints="emailAddress"
android:completionThreshold="1"
android:hint="@string/credentials_hint_email" />
android:hint="@string/credentials_hint_email"
android:inputType="textEmailAddress" />
<RelativeLayout
android:id="@+id/password_layout"
android:layout_below="@+id/email"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:layout_below="@+id/email">
<android.support.v7.widget.AppCompatEditText
android:id="@+id/password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autofillHints="password"
android:fontFamily="normal"
android:hint="@string/credentials_hint_password"
android:inputType="textPassword"
android:fontFamily="normal" />
android:inputType="textPassword" />
<ImageView
android:id="@+id/toggle_password_visibility"
android:padding="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_alignRight="@+id/password"
android:layout_alignEnd="@+id/password"
android:layout_centerVertical="true"
android:padding="5dp"
android:src="@drawable/ic_visibility_on"
android:tint="@color/darkgray"/>
android:tint="@color/darkGray" />
</RelativeLayout>
<LinearLayout
android:id="@+id/password_layout_ext"
android:layout_below="@id/password_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/password_layout"
android:layout_margin="5dp"
android:gravity="end"
android:orientation="horizontal"
android:weightSum="2"
android:layout_margin="5dp">
</LinearLayout>
android:weightSum="2" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/password_layout_ext"
android:layout_marginTop="10dp"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:orientation="horizontal">
<android.support.v7.widget.AppCompatButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@android:string/cancel"
android:id="@+id/button_exit"
android:theme="@style/Widget.AppCompat.Button.Borderless.Colored"
android:background="@drawable/button_bg_outine"
android:textColor="@color/button_bg" />
<android.support.v7.widget.AppCompatButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@android:string/ok"
android:background="@drawable/button_bg_outine"
android:text="@android:string/cancel"
android:textColor="@color/button_bg"
android:theme="@style/Widget.AppCompat.Button.Borderless.Colored" />
<android.support.v7.widget.AppCompatButton
android:id="@+id/button_ok"
android:theme="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/button_bg"
android:textColor="@color/white" />
android:text="@android:string/ok"
android:textColor="@color/white"
android:theme="@style/Widget.AppCompat.Button.Borderless.Colored" />
</LinearLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
android:alpha="0.3"
android:clickable="false"
android:background="#000000"
android:gravity="center" >
android:clickable="false"
android:gravity="center"
android:visibility="gone">
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true" />
</RelativeLayout>
</merge>

View File

@@ -1,337 +1,296 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
<android.support.v4.widget.NestedScrollView 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"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="in.dragons.galaxy.AboutActivity"
tools:openDrawer="start">
android:scrollbars="none"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<android.support.design.widget.CoordinatorLayout
android:id="@+id/main_content"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
<!--App Video -->
<RelativeLayout
android:id="@+id/app_video"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
android:visibility="gone">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
<ImageView
android:id="@+id/thumbnail"
android:layout_width="match_parent"
android:layout_height="256dp"
android:scaleType="centerCrop"
android:src="@color/gray" />
<ImageView
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:alpha="0.7"
android:src="@drawable/ic_play" />
</RelativeLayout>
<!-- App Icon & Name -->
<LinearLayout
android:id="@+id/main"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/app_video"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="5dp"
android:gravity="center_vertical">
<ImageButton
android:id="@+id/icon"
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:layout_marginEnd="6dp"
android:background="@null"
android:contentDescription="@string/content_description_app_icon"
android:scaleType="fitXY"
android:src="@drawable/ic_placeholder" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
android:theme="@style/MyToolbarStyle"
app:layout_scrollFlags="scroll|enterAlways" />
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="none"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<!--App Video -->
<RelativeLayout
android:id="@+id/app_video"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone">
<ImageView
android:id="@+id/thumbnail"
android:layout_width="match_parent"
android:layout_height="256dp"
android:scaleType="centerCrop"
android:src="@color/gray" />
<ImageView
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:alpha="0.7"
android:src="@drawable/ic_play" />
</RelativeLayout>
<!-- App Icon & Name -->
<LinearLayout
android:id="@+id/main"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/app_video"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="5dp"
android:gravity="center_vertical">
<ImageButton
android:id="@+id/icon"
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:layout_marginEnd="6dp"
android:background="@null"
android:contentDescription="@string/content_description_app_icon"
android:scaleType="fitXY"
android:src="@drawable/ic_placeholder" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:orientation="vertical">
<TextView
android:id="@+id/displayName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/packageName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="1"
android:textSize="14sp" />
<TextView
android:id="@+id/versionString"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="1"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
<!-- Action : Download, Update, Uninstall -->
<LinearLayout
android:id="@+id/main_action"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/main"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:gravity="end"
android:orientation="horizontal"
android:weightSum="3">
<android.support.v7.widget.AppCompatButton
android:id="@+id/uninstall"
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_weight="1"
android:background="@drawable/button_bg_outine"
android:maxLines="1"
android:text="@string/details_uninstall"
android:textColor="@color/button_bg"
android:theme="@style/Widget.AppCompat.Button.Borderless.Colored"
android:visibility="gone" />
<android.support.v7.widget.AppCompatButton
android:id="@+id/download"
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_weight="1"
android:background="@drawable/button_bg"
android:contentDescription="@string/content_description_download_options"
android:maxLines="1"
android:text="@string/details_download"
android:textColor="@color/white"
android:theme="@style/Widget.AppCompat.Button.Borderless.Colored"
android:visibility="gone" />
<android.support.v7.widget.AppCompatButton
android:id="@+id/cancel"
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_weight="1"
android:background="@drawable/button_bg_outine"
android:maxLines="1"
android:text="@string/details_cancel"
android:textColor="@color/colorPrimary"
android:theme="@style/Widget.AppCompat.Button.Borderless.Colored"
android:visibility="gone" />
<android.support.v7.widget.AppCompatButton
android:id="@+id/install"
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_weight="1"
android:background="@drawable/button_bg_outine"
android:maxLines="1"
android:text="@string/details_install"
android:textColor="@color/button_bg"
android:theme="@style/Widget.AppCompat.Button.Borderless.Colored"
android:visibility="gone" />
<android.support.v7.widget.AppCompatButton
android:id="@+id/run"
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_weight="1"
android:background="@drawable/button_bg"
android:maxLines="1"
android:text="@string/details_run"
android:textColor="@color/white"
android:theme="@style/Widget.AppCompat.Button.Borderless.Colored"
android:visibility="gone" />
</LinearLayout>
<in.dragons.galaxy.NumberProgressBar
android:id="@+id/download_progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/main_action"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="5dp"
android:visibility="gone"
app:progress_reached_bar_height="2.5dp"
app:progress_reached_color="@color/colorPrimary"
app:progress_text_color="@color/colorAccent"
app:progress_text_size="12sp"
app:progress_unreached_bar_height="2dp"
app:progress_unreached_color="@color/lightgray" />
android:layout_gravity="center_vertical"
android:orientation="vertical">
<TextView
android:id="@+id/contains_ads"
android:id="@+id/displayName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/download_progress"
android:layout_marginEnd="15dp"
android:gravity="end" />
android:textSize="18sp"
android:textStyle="bold" />
<View
android:id="@+id/divider_top"
<TextView
android:id="@+id/packageName"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="@id/contains_ads"
android:layout_marginBottom="5dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="10dp"
android:background="@color/gray"
android:layout_height="wrap_content"
android:maxLines="1"
android:textSize="14sp" />
<TextView
android:id="@+id/versionString"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="1"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
<!-- Action : Download, Update, Uninstall -->
<LinearLayout
android:id="@+id/main_action"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/main"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:gravity="end"
android:orientation="horizontal"
android:weightSum="3">
<android.support.v7.widget.AppCompatButton
android:id="@+id/uninstall"
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_weight="1"
android:background="@drawable/button_bg_outine"
android:maxLines="1"
android:text="@string/details_uninstall"
android:textColor="@color/button_bg"
android:theme="@style/Widget.AppCompat.Button.Borderless.Colored"
android:visibility="gone" />
<android.support.v7.widget.AppCompatButton
android:id="@+id/download"
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_weight="1"
android:background="@drawable/button_bg"
android:contentDescription="@string/content_description_download_options"
android:maxLines="1"
android:text="@string/details_download"
android:textColor="@color/white"
android:theme="@style/Widget.AppCompat.Button.Borderless.Colored"
android:visibility="gone" />
<android.support.v7.widget.AppCompatButton
android:id="@+id/cancel"
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_weight="1"
android:background="@drawable/button_bg_outine"
android:maxLines="1"
android:text="@string/details_cancel"
android:textColor="@color/colorPrimary"
android:theme="@style/Widget.AppCompat.Button.Borderless.Colored"
android:visibility="gone" />
<android.support.v7.widget.AppCompatButton
android:id="@+id/install"
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_weight="1"
android:background="@drawable/button_bg_outine"
android:maxLines="1"
android:text="@string/details_install"
android:textColor="@color/button_bg"
android:theme="@style/Widget.AppCompat.Button.Borderless.Colored"
android:visibility="gone" />
<android.support.v7.widget.AppCompatButton
android:id="@+id/run"
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_weight="1"
android:background="@drawable/button_bg"
android:maxLines="1"
android:text="@string/details_run"
android:textColor="@color/white"
android:theme="@style/Widget.AppCompat.Button.Borderless.Colored"
android:visibility="gone" />
</LinearLayout>
<in.dragons.galaxy.NumberProgressBar
android:id="@+id/download_progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/main_action"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="5dp"
android:visibility="gone"
app:progress_reached_bar_height="2.5dp"
app:progress_reached_color="@color/colorPrimary"
app:progress_text_color="@color/colorAccent"
app:progress_text_size="12sp"
app:progress_unreached_bar_height="2dp"
app:progress_unreached_color="@color/lightGray" />
<TextView
android:id="@+id/contains_ads"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/download_progress"
android:layout_marginEnd="15dp"
android:gravity="end" />
<View
android:id="@+id/divider_top"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="@id/contains_ads"
android:layout_marginBottom="5dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="10dp"
android:background="@color/gray"
android:visibility="gone" />
<!-- App details -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/divider_top"
android:orientation="vertical">
<!-- App Details : Type, Size, Rating -->
<include layout="@layout/app_details_inc" />
<View
android:id="@+id/divider_bottom"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="5dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="10dp"
android:background="@color/gray"
android:visibility="gone" />
<!-- Changelog -->
<include layout="@layout/app_changelog_inc" />
<!-- Read More -->
<include layout="@layout/app_more_inc" />
<!-- Screenshot -->
<Gallery
android:id="@+id/screenshots_gallery"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:spacing="15dp" />
<!-- Reviews -->
<include layout="@layout/app_reviews_inc" />
<!-- Permissions -->
<include layout="@layout/app_perm_inc" />
<!-- Beta -->
<include layout="@layout/app_beta_inc" />
<!-- General -->
<include layout="@layout/app_gen_inc" />
<!-- Related Apps -->
<LinearLayout
android:id="@+id/related_links"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="visible" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="horizontal">
<!-- Playstore link -->
<ImageButton
android:id="@+id/to_play_store"
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:background="@drawable/round_bg"
android:src="@drawable/app_playstore" />
<!-- App by same dev -->
<ImageButton
android:id="@+id/apps_by_same_developer"
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:background="@drawable/round_bg"
android:src="@drawable/app_dev"
android:visibility="gone" />
<!-- App details -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/divider_top"
android:orientation="vertical">
<!-- Share -->
<ImageButton
android:id="@+id/share"
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:background="@drawable/round_bg"
android:src="@drawable/app_share" />
<!-- App Details : Type, Size, Rating -->
<include layout="@layout/app_details_inc" />
<!-- System detail -->
<ImageButton
android:id="@+id/system_app_info"
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:background="@drawable/round_bg"
android:src="@drawable/app_settings" />
</LinearLayout>
<View
android:id="@+id/divider_bottom"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="5dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="10dp"
android:background="@color/gray"
android:visibility="gone" />
<!-- Changelog -->
<include layout="@layout/app_changelog_inc" />
<!-- Read More -->
<include layout="@layout/app_more_inc" />
<!-- Screenshot -->
<Gallery
android:id="@+id/screenshots_gallery"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:spacing="15dp" />
<!-- Reviews -->
<include layout="@layout/app_reviews_inc" />
<!-- Permissions -->
<include layout="@layout/app_perm_inc" />
<!-- Beta -->
<include layout="@layout/app_beta_inc" />
<!-- General -->
<include layout="@layout/app_gen_inc" />
<!-- Related Apps -->
<LinearLayout
android:id="@+id/related_links"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="visible"/>
<ProgressBar
android:id="@+id/progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:indeterminate="true"
android:padding="5dp"
android:visibility="gone" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="horizontal">
<!-- Playstore link -->
<ImageButton
android:id="@+id/to_play_store"
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:background="@drawable/round_bg"
android:src="@drawable/app_playstore" />
<!-- App by same dev -->
<ImageButton
android:id="@+id/apps_by_same_developer"
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:background="@drawable/round_bg"
android:src="@drawable/app_dev"
android:visibility="gone" />
<!-- Share -->
<ImageButton
android:id="@+id/share"
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:background="@drawable/round_bg"
android:src="@drawable/app_share" />
<!-- System detail -->
<ImageButton
android:id="@+id/system_app_info"
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:background="@drawable/round_bg"
android:src="@drawable/app_settings" />
</LinearLayout>
<ProgressBar
android:id="@+id/progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:indeterminate="true"
android:padding="5dp"
android:visibility="gone" />
</LinearLayout>
</RelativeLayout>
</android.support.v4.widget.NestedScrollView>
</android.support.design.widget.CoordinatorLayout>
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/nav_menu" />
</android.support.v4.widget.DrawerLayout>
</LinearLayout>
</RelativeLayout>
</android.support.v4.widget.NestedScrollView>

View File

@@ -1,6 +1,6 @@
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
android:layout_height="match_parent">
<TableLayout
android:id="@+id/device_info"

View File

@@ -1,15 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:gravity="center"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<Gallery
android:id="@+id/gallery"
android:adjustViewBounds="true"
android:spacing="10dp"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:spacing="10dp" />l
</LinearLayout>

View File

@@ -56,16 +56,7 @@
android:paddingTop="15dp"
android:text="@string/manual_download_incompatible" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
</LinearLayout>
</LinearLayout>
</ScrollView>
<EditText
@@ -88,7 +79,7 @@
app:progress_text_color="@color/colorAccent"
app:progress_text_size="12sp"
app:progress_unreached_bar_height="2dp"
app:progress_unreached_color="@color/lightgray" />
app:progress_unreached_color="@color/lightGray" />
<LinearLayout
android:layout_width="match_parent"

View File

@@ -29,7 +29,7 @@
android:text="@string/header_usr_name"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textColor="@color/white"
android:textSize="18dp" />
android:textSize="18sp" />
<TextView
android:id="@+id/usr_email"
@@ -39,6 +39,6 @@
android:text="@string/header_usr_noEmail"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textColor="@color/white"
android:textSize="16dp" />
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>

View File

@@ -1,54 +1,54 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center"
android:orientation="vertical"
android:paddingBottom="15dip"
android:paddingLeft="15dip"
android:paddingRight="15dip"
android:paddingBottom="15dip" >
android:paddingRight="15dip">
<TextView
android:text="@string/details_review_dialog_fields_optional"
android:textSize="18sp"
android:paddingBottom="6dp"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:paddingBottom="6dp"
android:text="@string/details_review_dialog_fields_optional"
android:textSize="18sp" />
<EditText
android:id="@+id/review_dialog_review_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/details_review_dialog_review_title_hint"
android:inputType="textCapSentences"
android:lines="1"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:lines="1" />
<EditText
android:id="@+id/review_dialog_review_comment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/details_review_dialog_review_comment_hint"
android:inputType="textCapSentences|textMultiLine"
android:maxLines="8"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:maxLines="8" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
android:layout_height="wrap_content">
<Button
android:id="@+id/review_dialog_cancel"
android:text="@android:string/cancel"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/white"/>
android:layout_weight="1"
android:text="@android:string/cancel"
android:textColor="@color/white" />
<Button
android:id="@+id/review_dialog_done"
android:text="@android:string/ok"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/white"/>
android:layout_weight="1"
android:text="@android:string/ok"
android:textColor="@color/white" />
</LinearLayout>
</LinearLayout>

View File

@@ -1,44 +1,44 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="top"
android:padding="6dip" >
android:orientation="vertical"
android:padding="6dip">
<LinearLayout
android:orientation="horizontal"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:id="@+id/avatar"
android:contentDescription="@string/content_description_review_author_avatar"
android:layout_width="48dip"
android:layout_height="48dip"
android:layout_marginRight="6dip"
android:layout_marginEnd="6dip" />
android:layout_marginEnd="6dip"
android:layout_marginStart="6dip"
android:contentDescription="@string/content_description_review_author_avatar" />
<LinearLayout
android:orientation="vertical"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:orientation="vertical">
<TextView
android:id="@+id/author"
android:textSize="16sp"
android:textStyle="bold"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textAllCaps="true" />
android:textAllCaps="true"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:id="@+id/title"
android:textSize="14sp"
android:textStyle="bold"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
@@ -46,8 +46,8 @@
<TextView
android:id="@+id/comment"
android:textSize="12sp"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:textSize="12sp" />
</LinearLayout>

View File

@@ -3,6 +3,7 @@
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="vertical"
android:paddingBottom="6dp"
android:paddingTop="6dp">
<LinearLayout
@@ -20,7 +21,7 @@
android:layout_width="0dp"
android:layout_height="@dimen/icon_size_med"
android:layout_marginEnd="6dp"
android:layout_marginRight="6dp"
android:layout_marginStart="3dp"
android:layout_weight="2"
android:contentDescription="@string/content_description_app_icon"
android:src="@drawable/ic_placeholder" />
@@ -57,7 +58,7 @@
android:layout_height="wrap_content"
android:ellipsize="end"
android:singleLine="true"
android:textSize="10sp"
android:textSize="12sp"
android:visibility="gone" />
<LinearLayout
@@ -103,23 +104,16 @@
android:id="@+id/menu_3dot"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="top"
android:layout_weight="1"
android:src="@drawable/ic_3dots"
android:tint="?android:textColor" />
</LinearLayout>
<!--View
android:layout_width="match_parent"
android:layout_height="1.5dp"
android:layout_gravity="bottom"
android:layout_marginTop="5dp"
android:background="?colorPrimary" /-->
<ProgressBar
android:id="@+id/progress"
android:layout_width="wrap_content"
android:layout_gravity="center"
android:layout_height="wrap_content" />
<ProgressBar
android:id="@+id/progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center" />
</LinearLayout>

View File

@@ -2,43 +2,43 @@
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_filter"
android:icon="@drawable/ic_filter"
android:title="@string/action_filter"
app:showAsAction="ifRoom"
android:visible="false"
android:icon="@drawable/ic_filter">
app:showAsAction="ifRoom">
<menu>
<item
android:id="@+id/filter_system_apps"
android:checkable="true"
android:title="@string/action_filter_system_apps"
android:visible="false"
android:checkable="true"/>
android:visible="false" />
<item
android:id="@+id/filter_apps_with_ads"
android:checkable="true"
android:title="@string/action_filter_apps_with_ads"
android:visible="false"
android:checkable="true"/>
android:visible="false" />
<item
android:id="@+id/filter_paid_apps"
android:checkable="true"
android:title="@string/action_filter_paid_apps"
android:visible="false"
android:checkable="true"/>
android:visible="false" />
<item
android:id="@+id/filter_gsf_dependent_apps"
android:checkable="true"
android:title="@string/action_filter_gsf_dependent_apps"
android:visible="false"
android:checkable="true"/>
android:visible="false" />
<item
android:id="@+id/filter_category"
android:visible="false"
android:title="@string/action_filter_category"/>
android:title="@string/action_filter_category"
android:visible="false" />
<item
android:id="@+id/filter_rating"
android:visible="false"
android:title="@string/action_filter_rating"/>
android:title="@string/action_filter_rating"
android:visible="false" />
<item
android:id="@+id/filter_downloads"
android:visible="false"
android:title="@string/action_filter_downloads"/>
android:title="@string/action_filter_downloads"
android:visible="false" />
</menu>
</item>
</menu>

View File

@@ -27,6 +27,4 @@
android:icon="@drawable/ic_about"
android:title="@string/action_about" />
</group>
</menu>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array translatable="false" name="blackOrWhiteValues">
<string-array name="blackOrWhiteValues" translatable="false">
<item>black</item>
<item>white</item>
</string-array>
@@ -8,7 +8,7 @@
<item>@string/pref_update_list_white_or_black_black</item>
<item>@string/pref_update_list_white_or_black_white</item>
</string-array>
<string-array translatable="false" name="updateIntervalValues">
<string-array name="updateIntervalValues" translatable="false">
<item>-1</item>
<item>3600000</item>
<item>86400000</item>
@@ -24,7 +24,7 @@
<item>@string/dialog_account_type_provided_by_user</item>
<item>@string/dialog_account_type_predefined</item>
</string-array>
<string-array translatable="false" name="installationMethodValues">
<string-array name="installationMethodValues" translatable="false">
<item>default</item>
<item>root</item>
<item>privileged</item>
@@ -34,19 +34,19 @@
<item>@string/pref_installation_method_root</item>
<item>@string/pref_installation_method_privileged</item>
</string-array>
<string-array translatable="false" name="filterRatingValues">
<string-array name="filterRatingValues" translatable="false">
<item>0</item>
<item>3</item>
<item>4</item>
<item>4.5</item>
</string-array>
<string-array translatable="false" name="filterRatingLabels">
<string-array name="filterRatingLabels" translatable="false">
<item>@string/search_filter</item>
<item> > 3 ★★☆☆☆</item>
<item> > 4 ★★★☆☆</item>
<item> > 4.5 ★★★★☆</item>
</string-array>
<string-array translatable="false" name="filterDownloadsValues">
<string-array name="filterDownloadsValues" translatable="false">
<item>0</item>
<item>100</item>
<item>1000</item>
@@ -56,7 +56,7 @@
<item>10000000</item>
<item>100000000</item>
</string-array>
<string-array translatable="false" name="filterDownloadsLabels">
<string-array name="filterDownloadsLabels" translatable="false">
<item>@string/search_filter</item>
<item> > 100 ↓</item>
<item> > 1 K ↓</item>

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="MultiSelectListPreference">
<attr name="android:entries" />
<attr name="android:entryValues" />

View File

@@ -10,8 +10,8 @@
<color name="black">#000000</color>
<color name="transparent">#0000</color>
<color name="gray">#BDBDBD</color>
<color name="darkgray">#616161</color>
<color name="lightgray">#EEEEEE</color>
<color name="darkGray">#616161</color>
<color name="lightGray">#EEEEEE</color>
<!--Buttons-->
<color name="button_bg">#3F51B5</color>

View File

@@ -3,9 +3,12 @@
<dimen name="icon_size">64dp</dimen>
<dimen name="icon_size_cat_top">78dp</dimen>
<dimen name="icon_size_big">72dp</dimen>
<dimen name="icon_size_med">48dp</dimen>
<dimen name="icon_size_med">52dp</dimen>
<dimen name="icon_size_cat">36dp</dimen>
<dimen name="icon_size_small">24dp</dimen>
<dimen name="card_height">220dp</dimen>
<dimen name="card_height_small">100dp</dimen>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>

View File

@@ -4,6 +4,9 @@
<string name="about_opensource">Open source libaries</string>
<string name="about_contributors">Contributors</string>
<string name="about_devs">Developers</string>
<string name="about_github">GitHub</string>
<string name="about_xda">Dev Thread</string>
<string name="about_telegram">Telegram</string>
<string name="about_copied_to_clipboard">Copied to clipboard</string>
<string name="list_line_2_updatable">"Updated on %1$s"</string>
<string name="list_empty_updates">No apps need to be updated</string>
@@ -36,6 +39,8 @@
<string name="action_login">Log in</string>
<string name="action_usedummy">Use Dummy</string>
<string name="action_usegoogle">Use Google</string>
<string name="acc_dummy">Login using Dummy Account</string>
<string name="acc_google">Login using Google Account</string>
<string name="action_switch">Switch Dummy</string>
<string name="action_accounts">Accounts</string>
<string name="action_search">Search</string>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:colorPrimary">@color/colorPrimary</item>
<item name="android:colorPrimaryDark">@color/colorPrimaryDark</item>

View File

@@ -1,4 +1,8 @@
<paths>
<root-path name="apks" path="." />
<cache-path name="cache" path="." />
<root-path
name="apks"
path="." />
<cache-path
name="cache"
path="." />
</paths>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<searchable xmlns:android="http://schemas.android.com/apk/res/android"
android:hint="@string/search_title"
android:label="@string/app_name"
android:searchSuggestAuthority="in.dragons.galaxy.GalaxySuggestionProvider"
android:searchSuggestIntentAction="android.intent.action.VIEW"
android:hint="@string/search_title" />
android:searchSuggestIntentAction="android.intent.action.VIEW" />

View File

@@ -6,7 +6,7 @@
android:key="PREFERENCE_DOWNLOAD_DIRECTORY"
android:selectAllOnFocus="true"
android:singleLine="true"
android:title="@string/pref_download_directory"/>
android:title="@string/pref_download_directory" />
<PreferenceCategory android:title="@string/pref_category_updates">
<CheckBoxPreference
android:defaultValue="false"
@@ -16,10 +16,10 @@
android:title="@string/pref_download_deltas" />
<ListPreference
android:defaultValue="-1"
android:key="PREFERENCE_BACKGROUND_UPDATE_INTERVAL"
android:title="@string/pref_background_update_interval"
android:entries="@array/updateIntervalLabels"
android:entryValues="@array/updateIntervalValues" />
android:entryValues="@array/updateIntervalValues"
android:key="PREFERENCE_BACKGROUND_UPDATE_INTERVAL"
android:title="@string/pref_background_update_interval" />
<CheckBoxPreference
android:defaultValue="false"
android:key="PREFERENCE_BACKGROUND_UPDATE_DOWNLOAD"
@@ -27,33 +27,33 @@
android:summaryOn="@string/pref_background_update_download_summary_on"
android:title="@string/pref_background_update_download" />
<CheckBoxPreference
android:dependency="PREFERENCE_BACKGROUND_UPDATE_DOWNLOAD"
android:defaultValue="true"
android:dependency="PREFERENCE_BACKGROUND_UPDATE_DOWNLOAD"
android:key="PREFERENCE_BACKGROUND_UPDATE_WIFI_ONLY"
android:title="@string/pref_background_update_wifi_only" />
<CheckBoxPreference
android:dependency="PREFERENCE_BACKGROUND_UPDATE_DOWNLOAD"
android:defaultValue="false"
android:dependency="PREFERENCE_BACKGROUND_UPDATE_DOWNLOAD"
android:key="PREFERENCE_BACKGROUND_UPDATE_INSTALL"
android:summaryOff="@string/pref_background_update_install_summary_off"
android:summaryOn="@string/pref_background_update_install_summary_on"
android:title="@string/pref_background_update_install" />
<ListPreference
android:defaultValue="black"
android:key="PREFERENCE_UPDATE_LIST_WHITE_OR_BLACK"
android:title="@string/pref_update_list_white_or_black"
android:entries="@array/blackOrWhiteLabels"
android:entryValues="@array/blackOrWhiteValues"/>
android:entryValues="@array/blackOrWhiteValues"
android:key="PREFERENCE_UPDATE_LIST_WHITE_OR_BLACK"
android:title="@string/pref_update_list_white_or_black" />
<CheckBoxPreference
android:enabled="false"
android:defaultValue="false"
android:enabled="false"
android:key="PREFERENCE_AUTO_WHITELIST"
android:summaryOff="@string/pref_auto_whitelist_summary_off"
android:summaryOn="@string/pref_auto_whitelist_summary_on"
android:title="@string/pref_auto_whitelist" />
<in.dragons.galaxy.MultiSelectListPreference
android:persistent="true"
android:key="PREFERENCE_UPDATE_LIST"
android:persistent="true"
android:title="@string/pref_update_list_black" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/pref_category_installation">
@@ -71,28 +71,28 @@
android:title="@string/pref_delete_apk_after_install" />
<ListPreference
android:defaultValue="default"
android:key="PREFERENCE_INSTALLATION_METHOD"
android:title="@string/pref_installation_method"
android:entries="@array/installationMethodLabels"
android:entryValues="@array/installationMethodValues"/>
android:entryValues="@array/installationMethodValues"
android:key="PREFERENCE_INSTALLATION_METHOD"
android:title="@string/pref_installation_method" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/pref_category_spoofing">
<ListPreference
android:defaultValue=""
android:key="PREFERENCE_REQUESTED_LANGUAGE"
android:title="@string/pref_requested_language"/>
android:title="@string/pref_requested_language" />
<ListPreference
android:defaultValue=""
android:key="PREFERENCE_DEVICE_TO_PRETEND_TO_BE"
android:title="@string/pref_device_to_pretend_to_be"/>
android:title="@string/pref_device_to_pretend_to_be" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/pref_category_ui">
<SwitchPreference
android:key="THEME"
android:title="@string/pref_dark_theme"
android:defaultValue="true"
android:key="THEME"
android:summaryOff="@string/pref_dark_theme_summary_off"
android:summaryOn="@string/pref_dark_theme_summary_on" />
android:summaryOn="@string/pref_dark_theme_summary_on"
android:title="@string/pref_dark_theme" />
<CheckBoxPreference
android:defaultValue="false"
android:key="PREFERENCE_NO_IMAGES"