Showing posts with label add. Show all posts
Showing posts with label add. Show all posts

Windows 10 add Administrator account in login screen

| 0 comments |
To add Administrator account in login screen:

  • Run Command Prompt as Administrator
  • Enter the command:
    net user administrator /active:yes





Read More..

Docs Sheets and Forms add ons now open to all developers

| 0 comments |

Posted by Saurabh Gupta, Product Manager

Back in 2014, we introduced add-ons for Google Docs, Sheets, and Forms in developer preview. Since then, the developer community has built a wide variety of features to help millions of Docs, Sheets and Forms users become more productive. Over the last few months, we launched a number of developer-friendly features that made it easier to build, test, deploy and distribute add-ons. Some key capabilities include:

  • Ability to publish add-ons in Google Apps Marketplace
  • Ability to bundle your add-on with existing Apps Marketplace listing
  • Availability of Apps Script triggers in add-ons
  • Testing tools for add-ons
  • Using standalone scripts to publish add-ons
  • Option to use your own Google Developers console project
  • Iframe sandbox mode for faster UI

With these features under our belt, we are ready to graduate add-ons out of developer preview. Starting today, any developer can publish an add-on. To ensure users find the best tools for them, every new add-on will undergo a review for adherence to our guidelines before it’s available in the add-ons store.

We can’t wait to see what you will build!

Read More..

Add OptionsMenu to Toolbar

| 0 comments |

Modify from last example of "Set title, subtitle and logo of Toolbar", to add OptionsMenu to Toolbar.


Create /res/menu/menu_main.xml to define our OptionsMenu.
<?xml version="1.0" encoding="utf-8"?>
<menu
>
<item
android_id="@+id/menu_camera"
android_icon="@android:drawable/ic_menu_camera"
android_orderInCategory="100"
android_title="camera"
app_showAsAction="always"/>
<item
android_id="@+id/menu_compass"
android_icon="@android:drawable/ic_menu_compass"
android_orderInCategory="100"
android_title="compass"
app_showAsAction="always"/>
<item
android_id="@+id/menu_agenda"
android_icon="@android:drawable/ic_menu_agenda"
android_orderInCategory="100"
android_title="agenda"
app_showAsAction="always"/>
<item
android_id="@+id/menu_gallery"
android_icon="@android:drawable/ic_menu_gallery"
android_orderInCategory="100"
android_title="gallery"
app_showAsAction="always"/>
<item
android_id="@+id/menu_calendar"
android_icon="@android:drawable/ic_menu_my_calendar"
android_orderInCategory="100"
android_title="calendar"
app_showAsAction="always"/>
</menu>

Modify MainActivity.java, override onCreateOptionsMenu() and onOptionsItemSelected().
package com.blogspot.android_er.androidtoolbar;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar)findViewById(R.id.toolbar);
setSupportActionBar(toolbar);

getSupportActionBar().setTitle("Toolbar example");
toolbar.setSubtitle("Android-er.blogspot.com");
toolbar.setLogo(android.R.drawable.ic_menu_info_details);

}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main, menu);
return super.onCreateOptionsMenu(menu);
}


@Override
public boolean onOptionsItemSelected(MenuItem item) {
Toast.makeText(this, item.getTitle(), Toast.LENGTH_LONG).show();
return super.onOptionsItemSelected(item);
}

}


Next:
- Set image on Toolbar

Read More..

Add and Remove view dynamically keep track of child views

| 0 comments |
I have a old example of "Add and Remove view dynamically". Somebody ask how the Remove button keep track of the views. So I modify the example to explain in more details.


In this example, when user click on the Add button, it will create a child View, addView. The addView have a Button, buttonRemove. The buttonRemove have its own OnClickListener object. The OnClickListener object refer to the specified addView when it is created.

That means the OnClickListener object of the buttonRemove in the first child view("abc") not the same object in the second child view("abcdef"), not the same object in the third child view("abcdefghi")...All have its own individual OnClickListener object. And each OnClickListener object refer to a specified addView object. Such that it can keep track of the child Views, addView.


MainActivity.java
package com.blogspot.android_er.androiddynamicview;

import android.content.Context;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.method.ScrollingMovementMethod;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {

EditText textIn;
Button buttonAdd;
LinearLayout container;
TextView reList, info;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

textIn = (EditText)findViewById(R.id.textin);
buttonAdd = (Button)findViewById(R.id.add);
container = (LinearLayout)findViewById(R.id.container);
reList = (TextView)findViewById(R.id.relist);
info = (TextView)findViewById(R.id.info);
info.setMovementMethod(new ScrollingMovementMethod());

buttonAdd.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v) {
LayoutInflater layoutInflater =
(LayoutInflater) getBaseContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
final View addView = layoutInflater.inflate(R.layout.row, null);
TextView textOut = (TextView)addView.findViewById(R.id.textout);
textOut.setText(textIn.getText().toString());
Button buttonRemove = (Button)addView.findViewById(R.id.remove);

final View.OnClickListener thisListener = new View.OnClickListener(){
@Override
public void onClick(View v) {
info.append("thisListener called: " + this + " ");
info.append("Remove addView: " + addView + " ");
((LinearLayout)addView.getParent()).removeView(addView);

listAllAddView();
}
};

buttonRemove.setOnClickListener(thisListener);
container.addView(addView);

info.append(
"thisListener: " + thisListener + " "
+ "addView: " + addView + " "
);

listAllAddView();
}
});
}

private void listAllAddView(){
reList.setText("");

int childCount = container.getChildCount();
for(int i=0; i<childCount; i++){
View thisChild = container.getChildAt(i);
reList.append(thisChild + " ");
}
}
}


layout/activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout

android_layout_width="match_parent"
android_layout_height="match_parent"
android_orientation="horizontal"
android_padding="16dp"
tools_context="com.blogspot.android_er.androiddynamicview.MainActivity">


<LinearLayout
android_layout_width="0dp"
android_layout_height="match_parent"
android_layout_weight="1"
android_orientation="vertical">

<RelativeLayout
android_layout_width="match_parent"
android_layout_height="wrap_content">

<Button
android_id="@+id/add"
android_layout_width="wrap_content"
android_layout_height="wrap_content"
android_layout_alignParentRight="true"
android_text="Add" />

<EditText
android_id="@+id/textin"
android_layout_width="match_parent"
android_layout_height="wrap_content"
android_layout_alignParentLeft="true"
android_layout_toLeftOf="@id/add" />
</RelativeLayout>

<LinearLayout
android_id="@+id/container"
android_layout_width="match_parent"
android_layout_height="wrap_content"
android_orientation="vertical"></LinearLayout>

</LinearLayout>

<LinearLayout
android_layout_width="0dp"
android_layout_height="match_parent"
android_layout_weight="1"
android_orientation="vertical">

<TextView
android_layout_width="wrap_content"
android_layout_height="wrap_content"
android_layout_gravity="center_horizontal"
android_autoLink="web"
android_text="http://android-er.blogspot.com/"
android_textStyle="bold" />

<TextView
android_id="@+id/relist"
android_layout_width="match_parent"
android_layout_height="0dp"
android_layout_weight="1"
android_textStyle="bold"
android_background="#E0E0E0"/>
<TextView
android_id="@+id/info"
android_layout_width="match_parent"
android_layout_height="0dp"
android_layout_weight="1"
android_textStyle="italic"
android_background="#D0D0D0"
android_gravity="bottom"/>

</LinearLayout>
</LinearLayout>


layout/row.xml, the layout of the child views.
<RelativeLayout 

android_layout_width="match_parent"
android_layout_height="wrap_content">
<Button
android_id="@+id/remove"
android_layout_width="wrap_content"
android_layout_height="wrap_content"
android_layout_alignParentRight="true"
android_text="Remove"/>
<TextView
android_id="@+id/textout"
android_layout_width="match_parent"
android_layout_height="wrap_content"
android_layout_alignParentLeft="true"
android_layout_toLeftOf="@id/remove"/>
</RelativeLayout>


download filesDownload the files (Android Studio Format) .

Its another approach to share a common OnClickListener between all buttonRemove.

more:
- Add and Remove view dynamically, with EditText/AutoCompleteTextView inside

Read More..

Add and Remove view dynamically with EditText AutoCompleteTextView inside

| 0 comments |

My previous post a example of "Add and Remove view dynamically", It is another version to have a EditText (AutoCompleteTextView actually) inside the dynamic view.


MainActivity.java
package com.blogspot.android_er.androiddynamicview;

import android.content.Context;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.method.ScrollingMovementMethod;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.AutoCompleteTextView;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {

AutoCompleteTextView textIn;
Button buttonAdd;
LinearLayout container;
TextView reList, info;

private static final String[] NUMBER = new String[] {
"One", "Two", "Three", "Four", "Five",
"Six", "Seven", "Eight", "Nine", "Ten"
};
ArrayAdapter<String> adapter;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

adapter = new ArrayAdapter<String>(this,
android.R.layout.simple_dropdown_item_1line, NUMBER);

textIn = (AutoCompleteTextView)findViewById(R.id.textin);
textIn.setAdapter(adapter);

buttonAdd = (Button)findViewById(R.id.add);
container = (LinearLayout) findViewById(R.id.container);
reList = (TextView)findViewById(R.id.relist);
reList.setMovementMethod(new ScrollingMovementMethod());
info = (TextView)findViewById(R.id.info);
info.setMovementMethod(new ScrollingMovementMethod());

buttonAdd.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v) {
LayoutInflater layoutInflater =
(LayoutInflater) getBaseContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
final View addView = layoutInflater.inflate(R.layout.row, null);
AutoCompleteTextView textOut = (AutoCompleteTextView)addView.findViewById(R.id.textout);
textOut.setAdapter(adapter);
textOut.setText(textIn.getText().toString());
Button buttonRemove = (Button)addView.findViewById(R.id.remove);

final View.OnClickListener thisListener = new View.OnClickListener(){
@Override
public void onClick(View v) {
info.append("thisListener called: " + this + " ");
info.append("Remove addView: " + addView + " ");
((LinearLayout)addView.getParent()).removeView(addView);

listAllAddView();
}
};

buttonRemove.setOnClickListener(thisListener);
container.addView(addView);

info.append(
"thisListener: " + thisListener + " "
+ "addView: " + addView + " "
);

listAllAddView();
}
});
}

private void listAllAddView(){
reList.setText("");

int childCount = container.getChildCount();
for(int i=0; i<childCount; i++){
View thisChild = container.getChildAt(i);
reList.append(thisChild + " ");

AutoCompleteTextView childTextView = (AutoCompleteTextView) thisChild.findViewById(R.id.textout);
String childTextViewValue = childTextView.getText().toString();
reList.append("= " + childTextViewValue + " ");
}
}

}


layout/activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout

android_layout_width="match_parent"
android_layout_height="match_parent"
android_orientation="horizontal"
android_padding="16dp"
tools_context="com.blogspot.android_er.androiddynamicview.MainActivity">


<LinearLayout
android_layout_width="0dp"
android_layout_height="match_parent"
android_layout_weight="1"
android_orientation="vertical">

<RelativeLayout
android_layout_width="match_parent"
android_layout_height="wrap_content">

<Button
android_id="@+id/add"
android_layout_width="wrap_content"
android_layout_height="wrap_content"
android_layout_alignParentRight="true"
android_text="Add" />

<AutoCompleteTextView
android_id="@+id/textin"
android_layout_width="match_parent"
android_layout_height="wrap_content"
android_layout_alignParentLeft="true"
android_layout_toLeftOf="@id/add" />
</RelativeLayout>

<LinearLayout
android_id="@+id/container"
android_layout_width="match_parent"
android_layout_height="wrap_content"
android_orientation="vertical"></LinearLayout>

</LinearLayout>

<LinearLayout
android_layout_width="0dp"
android_layout_height="match_parent"
android_layout_weight="1"
android_orientation="vertical">

<TextView
android_layout_width="wrap_content"
android_layout_height="wrap_content"
android_layout_gravity="center_horizontal"
android_autoLink="web"
android_text="http://android-er.blogspot.com/"
android_textStyle="bold" />

<TextView
android_id="@+id/relist"
android_layout_width="match_parent"
android_layout_height="0dp"
android_layout_weight="1"
android_textStyle="bold"
android_background="#E0E0E0"/>
<TextView
android_id="@+id/info"
android_layout_width="match_parent"
android_layout_height="0dp"
android_layout_weight="1"
android_textStyle="italic"
android_background="#D0D0D0"
android_gravity="bottom"/>

</LinearLayout>
</LinearLayout>


layout/row.xml
<RelativeLayout 

android_layout_width="match_parent"
android_layout_height="wrap_content">
<Button
android_id="@+id/remove"
android_layout_width="wrap_content"
android_layout_height="wrap_content"
android_layout_alignParentRight="true"
android_text="Remove"/>
<AutoCompleteTextView
android_id="@+id/textout"
android_layout_width="match_parent"
android_layout_height="wrap_content"
android_layout_alignParentLeft="true"
android_layout_toLeftOf="@id/remove"/>
</RelativeLayout>

download filesDownload the files (Android Studio Format) .

Read More..

How to Add RAM Android Phone With Micro SD Card

| 0 comments |

How to Add RAM Android Phone With Micro SD Card
How to Add RAM Android Phone With Micro SD Card
Ok it was a very interesting title for Android phone users
REMEMBER! REMEMBER!
This is a great site I hahahah ..
all tested …
take it easy …
hahah ..
Could it be the added RAM android?????


Answer: MAY ONCE, in a language called in VIRTUALKAN

Android is the Operating System also Category LINUX
This has advantages SWAP

If you’ve heard in the language of its windows is Virtual Memory

Swap / Virtual Memory are the empty parts of something that will replace the work room aka RAM Random Access Memory.

Why I write this way?????? Because now a lot of gadgets android that has even a very small RAM Small

REMEMBER EVERY ARTICLE ON THIS SITE ARE TESTED GOOD

How to Add RAM Android Phone With Micro SD Card
How to Add RAM Android Phone With Micro SD Card
Ok Immediately!

Tools needed:
1. Surely the HP android itself
2. Laptop
3. Mini Tool Partition software on a computer <<<< can be found in Google search
4. I suggest a minimum of a micro SD 8GB with Class 10 Class <<< Remember not underneath

Step-by-Step:

Micro SD backups of the contents of his

1. Micro SD input to the computer to be detected
2. Open Mini Tool Partition
3. Click Right on Disk Micro SD which looks at Mini Tool Partition Delete >>>> YES >>>
4. Click Right On Disk Micro SD which looks at Mini Tool Partition into Unallocated already
5. Then select the CREATE

6. My question is What is the capacity of your SD Micro?????
To create a Virtual Ram because we had to sacrifice his capacity as needed
According to my experiments 300MB victims would be around 15-20 mb Virtual Ram

So if you are android Ram 200MB and 300MB capacities clicking sacrifice Micro SD Card then it became like my calculation is:

200 + 15 = 215MB RAM

Therefore I suggest to Have Micro SD Card More than 4 GB / minimal 8 GB with Class 10
Why do I say Class 10 >>> because RAM requires that EXTRA Speed ​​to run the application.

Once you Think We then further steps

7. NO we Pricing of Step 5. If you choose to forego 1 GB or 1024MB
Then after you choose create the data contents with the following

Create As: Primary
Drive Letter: (blank)
File System: Linux Swap
Cluster Size: Default

Size And Location: (drag to position the one you want according to the example above 1gb pull up volume)

8. Click OK and YES and wait a few moments

Click on the right after the partition just created and then click the Modify followed by click the Set Active

9. Do it again that way as above right click the drive that was unallocated and click Create
But the contents of the following settings:

Create As: Primary
Drive Letter: D
File System: FAT
Cluster Size: Default

Size And Location: (not change)

10. Then OK and YES

AS THEY APPLY TO ALL THEN CLICK RIGHT CORNER MINI SOFTWARE TOOL PARTITION and the klick YES WAIT A WHILE

11. Back to the Data Input Micro SD you have a backup that was in the
12. Micro SD input to HP Android all friends

13. After HP flame Wait for about 1-3 minutes each is to enhance

14. TARAAAA!!!!!!! I’ve tried AND SUCCESSFUL
CURRENT APPLICATIONS OPEN TO OPENING GAME
WHEN MY ORIGINAL ONLY 152mb RAM

ASK IF LESS CLEAR IN THE COMMENT field below

Note: Sometimes a little bit of lag if you suddenly decrease the speed of Micro SD! Therefore make sure you are actually using class 10
How to Add RAM Android Phone With Micro SD Card
Read More..