mirror of https://github.com/grpc/grpc-java.git
examples: Android helloworld to pass Google lint (#10518)
These changes allow the Android helloworld example to pass the lint checks of the Google internal build system.
This commit is contained in:
parent
3fad52129f
commit
5559d54f5d
|
@ -50,6 +50,13 @@ public class HelloworldActivity extends AppCompatActivity {
|
|||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_helloworld);
|
||||
sendButton = (Button) findViewById(R.id.send_button);
|
||||
sendButton.setOnClickListener(
|
||||
new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
sendMessage(v);
|
||||
}
|
||||
});
|
||||
hostEdit = (EditText) findViewById(R.id.host_edit_text);
|
||||
portEdit = (EditText) findViewById(R.id.port_edit_text);
|
||||
messageEdit = (EditText) findViewById(R.id.message_edit_text);
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
android:layout_weight="2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="text"
|
||||
android:hint="Enter Host" />
|
||||
<EditText
|
||||
android:id="@+id/port_edit_text"
|
||||
|
@ -28,13 +29,13 @@
|
|||
android:id="@+id/message_edit_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="text"
|
||||
android:hint="Enter message to send" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/send_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="sendMessage"
|
||||
android:text="Send Grpc Request" />
|
||||
|
||||
<TextView
|
||||
|
|
Loading…
Reference in New Issue