A cleaner looking XDA - About xda-developers.com

Hello, I've been a gui dev for a long time, a huge fan of XDA. It is a little painful for me to visit this site as it causes a twitch in my brain. I did a quick refresh mock-up of a cleaner XDA version. A full white bg, removed borders and drop shadows. It is a little more pleasing to the eye and maybe if you like it as well you can implement changes.
//imgur.com/42GKLtr
Thank you
Code:
/*XDA QUICK MOCKUP PAGE CSS CHANGES*/
BODY {
background: #fff !important;
}
#header {
background: #fff !important;
border-bottom: none !important;
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
-o-box-shadow: none !important;
box-shadow: none !important;
}
#xda-nav LI A {
border-right: none !important;
}
.header-input {
border: none !important;
}
#search-input, .devdbSearch, #gsc-input, .search-input, #gsc-input-top {
border: none !important;
}
#header #advancedsearch {
border: none !important;
}
#navigation {
background-color: #fff !important;
border-bottom: none !important;
}
#himg LI A {
border-left: none !important;
}
#social-links LI A {
border-left: none !important;
}
.device-info-wrapper {
border: none !important;
}
.pagenav A, .pagenav-curpage {
background-color: #fff !important;
border-right: none !important;
border-top: none !important;
border-bottom: none !important;
}
.forum-head {
background: #fff!important;
box-shadow: none!important;
}
.threadbox {
border: none !important;
background-color: #fff !important;
}
.threadbit-announcement {
background-color: #fff !important;
border-bottom: none !important;
}
.thread-row>DIV {
border-bottom: none !important;
}
.thread-info-cell {
border-right: none !important;
}
.count-cell {
border-left: none !important;
}
#footer {
background: #f9f9f9 !important;
}

westcoasturf said:
I did a quick refresh mock-up of a cleaner XDA version. A full white bg, removed borders and drop shadows. It is a little more pleasing to the eye and maybe if you like it as well you can implement changes
Click to expand...
Click to collapse
Actually when we first released this version (2015), it was a pure white but everyone complained that it was too white. It's really hard to make everyone happy.
I recommend submitting this as a userstyle. This would allow visitors who want to have a 'lighter' experience do so.
Thanks for taking the time to contribute!

Related

Testing m-Form Pro on Excalibur

Dear XDA developers,
The next version of Aidmas m-Form Pro is going to be released soon and we are looking for users to carry out compatibility testing of our application on their Exclibur. There’s no software to install as m-Form Pro is delivered using the Software-as-a-service (SaaS) model. This application utilizes your mobile web browser and wireless data connection. If you’re interested in learning more about our developer program, please visit:
http://www.aidmas.com/index.php?id=117,155,0,0,1,0
Regards,
Ken
Developer of Aidmas m-Form Pro
www.aidmas.com
Question to those who are helping out in testing the Aidmas m-Form Pro on their HTC S621/620, "Do you think font size at 8px is too small for you to read?". How about typeface? I'm trying to understand the best combination that you have experienced.
.....................................
/* CCS Style: WHITE */
.CssFormBackground
{
background: white;
}
.CssFormCaption
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 8px;
color: #202020;
TEXT-DECORATION: none;
width:80px;
}
.CssFormField
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 8px;
color: #202020;
TEXT-DECORATION: none;
}
.CssFormButton
{
font-family: Arial, Helvetica, sans-serif;
font-size: 8px;
font-weight: Bold;
color: #FFFFFF;
text-decoration: none;
background-color: #666666;
vertical-align: middle;
cursor: hand;
border: 1px solid #CCCCCC;
}
.CssFormDropDownList
{
font-family: Arial, Helvetica, sans-serif;
font-size: 8px;
font-weight: normal;
color: #202020;
text-decoration: none;
border: 1px solid #FFFFFF;
}
.CssFormTextBox
{
font-family: Arial, Helvetica, sans-serif;
font-size: 8px;
font-weight: normal;
color: #202020;
text-decoration: none;
background-color: #f1f1f1;
vertical-align: middle;
border: 1px solid #969696;
}
.CssFormCheckBoxList
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 8px;
color : #202020;
}
.CssFormSuccessMessage
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 8px;
background : blue;
color : white;
}
.CssFormFailureMessage
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 8px;
background : red;
color : white;
}
.CssFatalErrorMessage
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 8px;
background : red;
color : white;
}
.CssFormMessageBox {
background-color: #F8F8F8;
border: 1px solid #D06C42;
width: 200px;
MARGIN-LEFT: 3px;
MARGIN-RIGHT: 3px;
MARGIN-TOP: 5px;
MARGIN-BOTTOM: 5px;
padding: 3px;
}
.CssFormRequiredAsterisk
{
color : red;
}
.CssFormValidatorErrorMessage
{
color : red;
}
BODY, TD {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 8px;
}
You might want to state that you have to pay $10.00 to be a member before you test this product out. Title is kind of misleading.
Why would someone want to pay $10.00 to test YOUR program. Kinda seems a bit backwards, don't ya think?
Thanks for your note. For those who want to help out but not join the developer connection you can sign up for a FREE 90-day fully functional account at:
http://www.aidmas.com/index.php?id=117,0,0,1,0,0
For those who want to get extra benefits from the developer connection program, please apply at the following site; there is a membership application fee (US$10) and you'll get a permenant, fully-functional account from us including all future upgrades.
http://www.aidmas.com/index.php?id=117,155,0,0,1,0
We value your feedback to our product, thank you.
- Ken
Developer of Aidmas m-Form Pro

[App] QuickSnap - Makes up for no hardware camera button

Very simple application that makes up (slightly) for not having a dedicated camera button.
Install the app, put a shortcut to it on your homepage. Shortcut will open (as quickly as possible) a preview window. Tapping anywhere on the screen will take a photo. Back button to exit.
QuickSnapNoAutofocus.apk - Takes pictures instantly, but you need a steady hand or your picture will be blurred!
QuickSnapAutoFocus.apk - Takes pictures using autofocus, so there is a delay while it focuses, but the pictures can't be blurred.
Saves the images to internal sd card as $DT.jpg on a seperate thread. Multiple taps on the screen to take lots of pictures quickly. (Supports multitouch! )
Source is in the next post - if anybody knows how to override the home or power button, give a shout!
Code:
package com.rc.QuickSnap;
import java.io.FileOutputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import android.app.Activity;
import android.hardware.Camera;
import android.hardware.Camera.AutoFocusCallback;
import android.hardware.Camera.PictureCallback;
import android.hardware.Camera.ShutterCallback;
import android.os.Bundle;
import android.util.Log;
import android.view.MotionEvent;
import android.view.SurfaceHolder;
import android.view.SurfaceHolder.Callback;
import android.view.SurfaceView;
public class QuickSnap extends Activity {
Camera cam;
ExecutorService executorService;
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd_HHmmss");
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
@Override
protected void onPause() {
super.onPause();
try {
cam.stopPreview();
} catch (Exception ex) {
ex.printStackTrace();
}
try {
cam.release();
} catch (Exception ex) {
ex.printStackTrace();
}
try {
executorService.shutdown();
} catch (Exception ex) {
ex.printStackTrace();
}
}
@Override
protected void onResume() {
super.onResume();
executorService = Executors.newSingleThreadExecutor();
try {
SurfaceView surface = (SurfaceView) findViewById(R.id.surface);
SurfaceHolder sh = surface.getHolder();
sh.setKeepScreenOn(true);
sh.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
sh.addCallback(new Callback() {
@Override
public void surfaceDestroyed(SurfaceHolder holder) {
Log.i("QuickSnap", "surfaceDestroyed");
}
@Override
public void surfaceCreated(SurfaceHolder holder) {
Log.i("QuickSnap", "surfaceCreated");
try {
cam = Camera.open();
cam.setPreviewDisplay(holder);
cam.startPreview();
} catch (Exception ex) {
ex.printStackTrace();
}
}
@Override
public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
Log.i("QuickSnap", "surfaceChanged");
try {
cam.setPreviewDisplay(holder);
} catch (Exception ex) {
ex.printStackTrace();
}
}
});
} catch (Exception ex) {
ex.printStackTrace();
}
}
@Override
public boolean onTouchEvent(MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_DOWN) {
Log.i("QuickSnap", "TouchEvent");
cam.autoFocus(new AutoFocusCallback() {
@Override
public void onAutoFocus(boolean success, Camera camera) {
cam.takePicture(new ShutterCallback() {
@Override
public void onShutter() {
Log.i("QuickSnap", "Shutter");
}
}, null, new PictureCallback() {
@Override
public void onPictureTaken(byte[] data, Camera camera) {
Log.i("QuickSnap", "JPEG");
final byte[] finaldata = data;
executorService.submit(new Runnable() {
@Override
public void run() {
try {
FileOutputStream fileOutputStream = new FileOutputStream("/sdcard/" + sdf.format(new Date()) + ".jpg");
fileOutputStream.write(finaldata);
fileOutputStream.close();
} catch (Exception ex) {
ex.printStackTrace();
}
}
});
camera.startPreview();
}
});
}
});
}
return true;
}
}
thx a lot !!
Looks great, gotta try. Thanks!
Has anyone got a mod that takes control of the Vol+ key for use with a camera?

XClasses - A Xposed Library

Hello guys,
I want to share my library XClasses.
My idea was to see every XClass as an extension of the original class.
My aim was to improve the user experience during the development.
Also I wanted to increase the readability of xposed code.
So it's nothing special.
It's just my personal opinion how readable code should look like.
A small example:
Code:
public class XposedMain implements IXposedHookLoadPackage
{
@Override
public void handleLoadPackage(XC_LoadPackage.LoadPackageParam lpparam)
throws Throwable {
if(lpparam.packageName.equals("com.android.systemui"))
{
XposedHelpers.findAndHookMethod(TextView.class, "setText", CharSequence.class, TextView.BufferType.class, boolean.class, int.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(MethodHookParam param)
throws Throwable {
TextView tv = (TextView)param.thisObject;
CharSequence text = (CharSequence)param.args[0];
TextView.BufferType type = (TextView.BufferType)param.args[1];
boolean notifyBefore = (Boolean)param.args[2];
int oldlen = (Integer)param.args[3];
XposedBridge.log("setText "+text+" with size "+tv.getTextSize());
}
});
}
}
}
The same code with XClasses:
Code:
// class 1
public class XposedMain implements IXposedHookLoadPackage
{
@Override
public void handleLoadPackage(XC_LoadPackage.LoadPackageParam lpparam)
throws Throwable {
if(lpparam.packageName.equals("com.android.systemui"))
{
setup(lpparam.classLoader);
hook(XTextView.class);
}
}
}
// class 2
public class XTextView
extends AbstractXClass<TextView>
{
public static String getOriginalClassName() { return TextView.class.getCanonicalName(); }
public XTextView(TextView objectThis) { super(objectThis); }
@BeforeOriginalMethod
private void setText_Before(CharSequence text, TextView.BufferType type,
boolean notifyBefore, int oldlen) throws Throwable {
XposedBridge.log("setText "+text+" with size "+getThis().getTextSize());
}
}
If you would like to know more you should visit the following site: https://github.com/seebye/XClasses
Regards,
Seebye

[Q] How to use a variable from one hook in another? (Why is this an NPE?)

Hello, I have made this code
Link : http://hastebin.com/hiyupafibi.java
Duplicated here :
Code:
//In my module, I have this activity MainActivity, which has a function to generate random number
private int randomNumber() {
return (new Random()).nextInt(3);
}
//Toast this random number somewhere in the main activity
Toast.makeText(MainActivity.this, " " + randomNumber(), Toast.LENGTH_LONG).show();
//In XposedMod, make a hook
public class XposedMod implements IXposedHookLoadPackage {
private TextView tv;
public static final String PACKAGE_NAME = ".......";
@Override
public void handleLoadPackage(LoadPackageParam lpparam) throws Throwable {
if (lpparam.packageName.equals(PACKAGE_NAME)) {
Class<?> MainActivityClass = XposedHelpers.findClass(PACKAGE_NAME + ".MainActivity", lpparam.classLoader);
XposedHelpers.findAndHookMethod(MainActivityClass, "randomNumber", new XC_MethodReplacement() {
@Override
protected Object replaceHookedMethod(MethodHookParam methodHookParam) throws Throwable {
try {
tv.setText("No NPE");
return 45;
} catch (NullPointerException e) {
return 44;
}
}
});
} else if (lpparam.packageName.equals("com.android.systemui")) {
Class<?> someClass = XposedHelpers.findClass("com.android.systemui.SomeClass", lpparam.classLoader);
XposedHelpers.findAndHookMethod(someClass, "someMethod", Context.class, new XC_MethodHook() {
@Override
protected Object beforeHookedMethod(MethodHookParam methodHookParam) throws Throwable {
tv = new TextView((Context) param.args[0]);
if (tv==null)
XposedBridge.log("tv is null, apologies!");
}
});
}
}
}
Everytime that toast is supposed to be shown, I get the answer to be 44 (that is, tv is null), but that should not be the case, because the log statement when tv is null is not shown. What am I doing wrong?
Thanks for the help, I appreciate it.
Cheers!

Can't login into XDA Labs

Hey Guys,
I was trying to download some APK from XDA Labs and I just can't login into Labs even though I am logged into the Main site.
Whenever I click on Login in Labs, It is redirecting me to some broken page and if it helps, I tried to login into XDA via my device and failed 5/5 times so i am still under the 15 mins waiting but I am logged in my PC though.
The URL it shows : https://api.xda-developers.com/oaut...rect_uri=https://labs.xda-developers.com/auth
Content :
<html lang="en">
<head>
<link href="//cdn2.xda-developers.com/css/2015/2015.min.css?v=1424112994" rel="stylesheet" type="text/css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js" type="5d950566124479665e4c1584-text/javascript"></script>
<style>
body{background: #ffffff !important; min-width: 0 !important;}
.wrapper{
min-height: 100%;
}
.header-bar{
text-align: center;
margin-left: 10px;
margin-right: 10px;
}
#logo{
margin-top: 20px;
margin-bottom: 20px;
}
.banner-text
{
text-align: center;
margin-bottom: 20px;
}
.banner-text h2
{
margin: 0;
font-weight: 900;
font: 16px / 16px 'Open Sans',sans-serif;
}
.signin-card
{
width: 260px;
margin: auto;
background: #ebebeb;
border: 1px solid #d8d8d8;
padding: 20px;
margin-bottom: 20px;
}
#login
{
margin-bottom: 0;
}
#login input
{
width: 100%;
margin-bottom: 5px;
}
.signin-submit{
border: 1px solid #d8d8d8;
background-color: #f9f9f9;
}
.signin-submit:hover
{
background-color: #F7F7F7;
}
input, input.signin-submit{
font: 16px / 16px 'Open Sans',sans-serif;
}
#authorize
{
background: #12911d;
color: #f9f9f9!important;
}
#authorize:hover
{
color: #454545!important;
background-color: #ebebeb;
}
</style>
</head>
<body>
<div class="wrapper">
<div class="header-bar">
<script src="https://ajax.cloudflare.com/cdn-cgi/scripts/2448a7bd/cloudflare-static/rocket-loader.min.js" data-cf-nonce="5d950566124479665e4c1584-"></script><img id="logo" src="//cdn1.xda-developers.com/images/2015/xda-logo.svg" alt="xda-developers" onerror="this.src='//cdn1.xda-developers.com/images/2015/xda-logo.png'" height="28" width="207" title="xda-developers">
</div>
<div class="banner-text">
<h2>Do you authorize access to your XDA Account?</h2>
</div>
<div class="signin-card">
<form id="login" action="authorize?/oauth2/authorize&response_type=code&client_id=XDA-AMC-LB&redirect_uri=https://labs.xda-developers.com/auth" method="post">
<input type="hidden" name="authorize" value="1" />
<input id="authorize" class="signin-submit" type="submit" value="Authorize" />
<input id="cancel" class="signin-submit" type="submit" value="Cancel" />
</form>
</div>
</div>
<script src="https://ajax.cloudflare.com/cdn-cgi/scripts/2448a7bd/cloudflare-static/rocket-loader.min.js" data-cf-nonce="5d950566124479665e4c1584-" defer=""></script></body>
<script type="5d950566124479665e4c1584-text/javascript">
$(document).ready(function()
{
$("#cancel").click(function(e)
{
e.preventDefault();
window.location = "https://forum.xda-developers.com";
});
});
</script>
</html>
P.S : Sorry for any mistakes, First Post ^.^
Hi,
next time, you can post in the dedicated XDA Labs thread here: https://forum.xda-developers.com/android/apps-games/labs-t3241866/
To answer to your post, if you read THIS POST, you will see that it has been reported multiple times already but we have no answer from the dev blk_jack so far.
Now, if you read the next post - THIS POST - you will learn a possible workaround. Please tell us in the XDA Labs thread if it works for you
Edit: also, as a second workaround to login, you can try to use the G+ button available from the login screen.
Good luck!

Categories

Resources